Below the gmsh geo file:
SetFactory(“OpenCASCADE”);
// Parameters
r_cylinder = 0.2; // Radius of the main cylinder
h_cylinder = 1.0; // Height of the main cylinder
r_inlet = 0.05; // Radius of the inlet pipe
h_inlet = 0.3; // Length of the inlet pipe
r_outlet_gas = 0.04; // Radius of the gas outlet pipe
h_outlet_gas = 0.4; // Length of the gas outlet pipe
r_outlet_liquid = 0.04; // Radius of the liquid outlet pipe
h_outlet_liquid = 0.3; // Length of the liquid outlet pipe
// Main cylinder
Cylinder(1) = {0, 0, 0, 0, 0, h_cylinder, r_cylinder, 2*Pi};
// Tangential inlet pipe
inlet_offset = r_cylinder - r_inlet; // Offset to ensure tangential alignment
Cylinder(2) = {0, inlet_offset, 2 * h_cylinder / 3, h_inlet, 0, 0, r_inlet, 2*Pi};
// Gas outlet pipe
//Cylinder(3) = {0, 0, h_cylinder + h_outlet_gas, 0, 0, -h_outlet_gas, r_outlet_gas, 2Pi};
Cylinder(3) = {0, 0, h_cylinder, 0, 0, h_outlet_gas, r_outlet_gas, 2Pi};
// Liquid outlet pipe
Cylinder(4) = {0, 0, -h_outlet_liquid, 0, 0, h_outlet_liquid, r_outlet_liquid, 2*Pi};
BooleanUnion(20) = { Volume{1}; Delete; }{ Volume{2}; Delete; };
BooleanUnion(21) = { Volume{20}; Delete; }{ Volume{3}; Delete; };
BooleanUnion(22) = { Volume{21}; Delete; }{ Volume{4}; Delete; };
Physical Surface(“inlet”, 26) = {7};
Physical Surface(“liqoutlet”, 28) = {8};
Physical Surface(“gasoutlet”, 23) = {9};
In freefem, I tried to read directly the msh file:
mesh3 Th = gmshload3(“glcc.msh”);
or to generate it:
lockOrientation = false;
system(“gmsh -format msh22 -3 -o glcc.msh glcc.geo”);
mesh3 Th = gmshload3(“glcc.msh”);
lockOrientation = true;
Thanks