cardiac pumping

121 views
Skip to first unread message

Victor Tsai

unread,
Jan 8, 2014, 7:15:46 AM1/8/14
to sailfi...@googlegroups.com
Dear Sailfish developers,

I would like to ask is it possible to use sailfish to simulate blood flow in cardiac pumping, which is featured by an oscillatory/moving boundary (walls of atrium and ventricles) with a heart beat cycle of 1 second.

Thank you

Victor

Michal Januszewski

unread,
Jan 8, 2014, 9:19:58 AM1/8/14
to sailfi...@googlegroups.com
Hi Victor,

Sailfish does not yet support moving boundaries. We do support time-dependent boundary conditions though, so it's possible to simulate pulsatile flows in stationary geometries.

Best regards,
Michal


--
 
---
You received this message because you are subscribed to the Google Groups "sailfish-cfd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sailfish-cfd...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Michal Januszewski

Hoang Giang Bui

unread,
Oct 10, 2014, 4:47:15 AM10/10/14
to sailfi...@googlegroups.com
Hi Michal,

Do you have any examples demonstrating time-dependent boundary conditions? In my case, I want to simulate a rotating blade within a container, how could it be difficult to doing that?

Best regards,
Giang Bui

Michal Januszewski

unread,
Oct 12, 2014, 11:56:10 AM10/12/14
to sailfi...@googlegroups.com
Yes, we do have https://github.com/sailfish-team/sailfish/blob/master/examples/poiseuille_pulsatile.py which shows how simulate a pulsatile flow, though I'm not sure how useful this will be for the problem you want to tackle.

Simulating a rotating blade will be doable, but tricky. There are at least two different ways of approaching the problem:
1) When the blade moves, voxelize it at its new position and update the simulation geometry to reflect the changes. This would use standard bounce-back nodes to represent the blade.
2) Use the immersed boundary method (for which Sailfish has some basic support) to implement the blade in the simulation.

Both of these will require some custom code to be written to handle the dynamics of the rotating blade.

Please let me know if you want to pursue this further and have any additional questions,
Michal

For more options, visit https://groups.google.com/d/optout.

Hoang Giang Bui

unread,
May 31, 2015, 11:53:46 AM5/31/15
to sailfi...@googlegroups.com
Hi Michal

Definitely I want to try a moving boundary example with LBM. In the example in the attached file, I redefine the after_step of LBFluidSim class

    def after_step(self, runner):
        wall_bc = NTFullBBWall
        if self.iteration % 1000 == 0:
            print('we are at the step ' + str(self.iteration))
            new_wall_map = np.sqrt(np.power(runner._subdomain.hx - 60 - self.iteration/1000*20, 2) + np.power(runner._subdomain.hy - LY/2, 2)) <= 20
            runner._subdomain.update_node(new_wall_map, wall_bc)

This doesn't help, since an error was thrown

raise ValueError('Node orientation not specified.')

Do you have any suggestion?

Giang
flow2_moving.py

Mohammadreza Alipour

unread,
Aug 3, 2022, 1:06:56 PM8/3/22
to sailfish-cfd
same problem here! 
May I ask if you found a solution, please??

Message has been deleted

Mohammadreza Alipour

unread,
Aug 3, 2022, 3:46:34 PM8/3/22
to sailfish-cfd
found the solution: 
           hx, hy, hz = runner._subdomain._get_mgrid()
           whr = (np.square(hx - 80) + np.square(hy - 16) + np.square(hz - 32)) <= np.square(8) 

            runner._subdomain.update_node(whr,wall_bc(orientation=np.int32(0)))

And, you need to add the following line after update_node:
             runner.backend.to_buf(runner._gpu_geo_map)

On Sunday, May 31, 2015 at 4:53:46 PM UTC+1 hgbk...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages