[Gmsh] Unit cell with periodic mesh
Sergej Tarasov
tarasov at pmi.lv
Fri May 17 23:56:59 CEST 2019
Hi,
I need to create cubic unit cell containing many particles crossing the walls
with periodic mesh (the geometry itself is periodic). I do it like this:
SetFactory("OpenCASCADE");
Mesh.MinimumCurvePoints = 2;
Box(1) = { 0, 0, 0, 1, 1, 1 };
Cylinder(2) = { 0.669103076524392, 0.926238630543764, 0.380445067549797, -0.00436647701608499, -0.00549592479612254, 0.0071224075356137, 0.25, 2*Pi };
Cylinder(3) = { 0.669103076524392, -0.0737613694562362, 0.380445067549797, -0.00436647701608499, -0.00549592479612254, 0.0071224075356137, 0.25, 2*Pi };
BooleanIntersection{ Volume{ 2:3 }; Delete; } { Volume{ 1 }; }
BooleanDifference{ Volume{ 1 }; Delete; } { Volume{ 2:3 }; }
Periodic Surface{ 21 } = { 16 } Translate{ 1,0,0 };
Periodic Surface{ 9, 19 } = { 14, 17 } Translate{ 0,1,0 };
Periodic Surface{ 18 } = { 20 } Translate{ 0,0,1 };
which works perfectly. But in case of many particles (50-100) I need
to know the ID of each opposite surface. What is the best way to do it in Gmsh?
Or there is better way to achieve this?
--
Best regards,
Sergej Tarasov mailto:tarasov at pmi.lv
More information about the gmsh
mailing list