I wish to use Fipy for a network made of 1D branches. Does Fipy allow that kind of mesh? I have not been able to find a similar example. Thank you for your help.
Asked
Active
Viewed 37 times
1 Answers
1
FiPy's 1D meshes don't support branched topologies, but you can get the same effective result by concatenating 2D or 3D meshes that are only one cell wide, e.g.,
mesh1 = fp.Grid2D(nx=10, ny=1)
mesh2 = fp.Grid2D(nx=1, ny=7) + [[4.], [1.]]
mesh3 = fp.Grid2D(nx=5, ny=1) + [[5.], [4.]]
mesh4 = fp.Grid2D(nx=4, ny=1) + [[0.], [6.]]
mesh = mesh1 + mesh2 + mesh3 + mesh4

jeguyer
- 2,379
- 1
- 11
- 15
-
Many thanks for your help! Then, there is no simple way of allowing a face to link more than two cells? Or could that be implemented (in a way that does not involve triplicating the face at the intersection to link the 3 cells two by two)? – rbtlm640 Sep 09 '21 at 14:36
-
No, a face is the boundary between two cells, by definition. In the 2D case I show above, you could have two branches off from the same cell, rather than staggered the way I illustrated. You could also make polygonal cells that allowed more branches from the same cell. – jeguyer Sep 09 '21 at 15:05