usnistgov / fipy

FiPy is a Finite Volume PDE solver written in Python
http://pages.nist.gov/fipy/en/latest
Other
504 stars 148 forks source link

Is there any example for fluid dynamic simulation? #892

Closed zhang-qiang-github closed 1 year ago

zhang-qiang-github commented 1 year ago

I want to simulate the blood flow in a 3D vessel. Input a 3D vessel surface, and the velocity in the boundary. I want to obtain the pressure in the surface. Is there any example to guide me?

Any suggestion is appreciated~~~

guyer commented 1 year ago

We do have a moving lid Stokes flow example.

I also have an attempt to implement a Stokes flow problem in a tube, with and without an obstruction, as described in this benchmark description. At a minimum, there are problems with the outflow condition in my implementation.

Finally, flow is incorporated in our reactive wetting examples. There's a lot else going on in those examples. Hopefully @wd15 can confirm what flow regime they're in; I think it's full Navier-Stokes, but I'm not a flow guy.

If you actually want to model the pressure in the vessel wall, then the multi-phase reactive wetting example is probably what you'll want to work from. If, on the other hand, the vessel wall is just a boundary condition, then it should not be a problem to extract the pressure at that boundary from the Stokes example.

As to describing the 3D vessel surface, you'll want to do that with Gmsh and then import the domains and boundaries of interest as described for Gmsh2D. While that example is in 2D, it works the same way for Gmsh3D.