hello
i have the problem to modelling the interface between 2 bodies so that i can calculate the heatflux between this 2 bodies (i attached the mesh-file). What can i do to create the heatflux from body 1 to body 2? Regards, Axel
interface between bodies
interface between bodies
- Attachments
-
- body12.msh
- (18.31 KiB) Downloaded 418 times
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: interface between bodies
Hi Axel
If you compute the heat equation in the two bodies you will automaticially have a continuous flux over the boundary. Then there are many options on how to evaluate the flux on internal boundaries:
- FluxSolver: computes flux (vector) in all nodes
- SaveLine (with "Save Flux"): normal flux on nodes of given boundary
- SaveScalars (with "diffusive flux"): total flux over given boundary
The 1st one is the most accurate for computing the nodal flux. See Elmer Models Manual for more details.
-Peter
If you compute the heat equation in the two bodies you will automaticially have a continuous flux over the boundary. Then there are many options on how to evaluate the flux on internal boundaries:
- FluxSolver: computes flux (vector) in all nodes
- SaveLine (with "Save Flux"): normal flux on nodes of given boundary
- SaveScalars (with "diffusive flux"): total flux over given boundary
The 1st one is the most accurate for computing the nodal flux. See Elmer Models Manual for more details.
-Peter
Re: interface between bodies
Dear Peter,
thank you for the reply. But my problem is, how can i connect surface 1 with surface 2 (see file attached). I'm a new user and i can't find any example for this problem. Can you help me?
Regards, Axel
thank you for the reply. But my problem is, how can i connect surface 1 with surface 2 (see file attached). I'm a new user and i can't find any example for this problem. Can you help me?
Regards, Axel
- Attachments
-
- problem.jpg (34.28 KiB) Viewed 6997 times
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: interface between bodies
When you make a mesh in one piece the surfaces will be automatically the same. So the elements on different sides of the boundary share the nodes. It is actually a special problem if you want to have a discontinuous temperature over the interface. Then you need a second set of nodes at the same positions.
Re: interface between bodies
Thank you for help. It was possible to made the mesh with gmesh and it works with multiple bodies.
Axel
Axel
Re: interface between bodies
fil69, did you make the mesh in Gmsh so that Elmer identifies 2 bodies? If so, I'd like to know how your Gmsh was setup (.geo file) so that multiple bodies are seen in Elmer.
Thanks
Thanks
Re: interface between bodies
pamakela,
I had the same issue. Below the geo file for two cubes that load in as two different bodies. You may need to leave out items that are not supported (Shell elements). To do that, add the command "-autoclean" in the ElmerGUI (Mesh>Configure> elmergrid String: -autoclean -relh 1.0). I noticed that if you do not generate Physical Volumes in Gmsh (Geometry>Physical Groups>Add>Volume) you end up with some additional body. Also, note that you will need to do a Save As (*.msh; Version 2.0, Ascii) in Gmsh and then use the "Open" command in Elmer, not "Load Mesh".
Let me know if this works for you. I'm still playing around and learning myself (when I get the time)...
geo File (before meshing: simply Mesh>3D):
Point(1) = {0, 0, 0, 1e+022};
Point(2) = {1, 0, 0, 1e+022};
Point(3) = {1, 1, 0, 1e+022};
Point(4) = {0, 1, 0, 1e+022};
Point(5) = {0, 0, 1, 1e+022};
Point(6) = {1, 0, 1, 1e+022};
Point(7) = {1, 1, 1, 1e+022};
Point(8) = {0, 1, 1, 1e+022};
Point(9) = {0, 0, 2, 1e+022};
Point(10) = {1, 0, 2, 1e+022};
Point(11) = {1, 1, 2, 1e+022};
Point(12) = {0, 1, 2, 1e+022};
Line(1) = {4, 1};
Line(2) = {1, 2};
Line(3) = {2, 3};
Line(4) = {3, 4};
Line(5) = {8, 7};
Line(6) = {7, 6};
Line(7) = {6, 5};
Line(8) = {8, 5};
Line(9) = {8, 4};
Line(10) = {5, 1};
Line(11) = {7, 3};
Line(12) = {6, 2};
Line(13) = {12, 8};
Line(14) = {9, 5};
Line(15) = {10, 6};
Line(16) = {9, 10};
Line(17) = {10, 11};
Line(18) = {11, 12};
Line(19) = {12, 9};
Line(20) = {11, 7};
Line Loop(22) = {2, 3, 4, 1};
Plane Surface(22) = {22};
Line Loop(24) = {2, -12, 7, 10};
Plane Surface(24) = {24};
Line Loop(26) = {12, 3, -11, 6};
Plane Surface(26) = {26};
Line Loop(28) = {5, 11, 4, -9};
Plane Surface(28) = {28};
Line Loop(30) = {8, 10, -1, -9};
Plane Surface(30) = {30};
Line Loop(32) = {7, -8, 5, 6};
Plane Surface(32) = {32};
Line Loop(33) = {7, -8, 5, 6};
Plane Surface(33) = {33};
Line Loop(35) = {7, -14, 16, 15};
Plane Surface(35) = {35};
Line Loop(37) = {15, -6, -20, -17};
Plane Surface(37) = {37};
Line Loop(39) = {20, -5, -13, -18};
Plane Surface(39) = {39};
Line Loop(41) = {19, 14, -8, -13};
Plane Surface(41) = {41};
Line Loop(43) = {16, 17, 18, 19};
Plane Surface(43) = {43};
Surface Loop(45) = {22, 24, 26, 28, 30, 32};
Volume(45) = {45};
Surface Loop(47) = {35, 41, 43, 37, 39, 32};
Volume(47) = {47};
Physical Volume(48) = {45};
Physical Volume(49) = {47};
I had the same issue. Below the geo file for two cubes that load in as two different bodies. You may need to leave out items that are not supported (Shell elements). To do that, add the command "-autoclean" in the ElmerGUI (Mesh>Configure> elmergrid String: -autoclean -relh 1.0). I noticed that if you do not generate Physical Volumes in Gmsh (Geometry>Physical Groups>Add>Volume) you end up with some additional body. Also, note that you will need to do a Save As (*.msh; Version 2.0, Ascii) in Gmsh and then use the "Open" command in Elmer, not "Load Mesh".
Let me know if this works for you. I'm still playing around and learning myself (when I get the time)...
geo File (before meshing: simply Mesh>3D):
Point(1) = {0, 0, 0, 1e+022};
Point(2) = {1, 0, 0, 1e+022};
Point(3) = {1, 1, 0, 1e+022};
Point(4) = {0, 1, 0, 1e+022};
Point(5) = {0, 0, 1, 1e+022};
Point(6) = {1, 0, 1, 1e+022};
Point(7) = {1, 1, 1, 1e+022};
Point(8) = {0, 1, 1, 1e+022};
Point(9) = {0, 0, 2, 1e+022};
Point(10) = {1, 0, 2, 1e+022};
Point(11) = {1, 1, 2, 1e+022};
Point(12) = {0, 1, 2, 1e+022};
Line(1) = {4, 1};
Line(2) = {1, 2};
Line(3) = {2, 3};
Line(4) = {3, 4};
Line(5) = {8, 7};
Line(6) = {7, 6};
Line(7) = {6, 5};
Line(8) = {8, 5};
Line(9) = {8, 4};
Line(10) = {5, 1};
Line(11) = {7, 3};
Line(12) = {6, 2};
Line(13) = {12, 8};
Line(14) = {9, 5};
Line(15) = {10, 6};
Line(16) = {9, 10};
Line(17) = {10, 11};
Line(18) = {11, 12};
Line(19) = {12, 9};
Line(20) = {11, 7};
Line Loop(22) = {2, 3, 4, 1};
Plane Surface(22) = {22};
Line Loop(24) = {2, -12, 7, 10};
Plane Surface(24) = {24};
Line Loop(26) = {12, 3, -11, 6};
Plane Surface(26) = {26};
Line Loop(28) = {5, 11, 4, -9};
Plane Surface(28) = {28};
Line Loop(30) = {8, 10, -1, -9};
Plane Surface(30) = {30};
Line Loop(32) = {7, -8, 5, 6};
Plane Surface(32) = {32};
Line Loop(33) = {7, -8, 5, 6};
Plane Surface(33) = {33};
Line Loop(35) = {7, -14, 16, 15};
Plane Surface(35) = {35};
Line Loop(37) = {15, -6, -20, -17};
Plane Surface(37) = {37};
Line Loop(39) = {20, -5, -13, -18};
Plane Surface(39) = {39};
Line Loop(41) = {19, 14, -8, -13};
Plane Surface(41) = {41};
Line Loop(43) = {16, 17, 18, 19};
Plane Surface(43) = {43};
Surface Loop(45) = {22, 24, 26, 28, 30, 32};
Volume(45) = {45};
Surface Loop(47) = {35, 41, 43, 37, 39, 32};
Volume(47) = {47};
Physical Volume(48) = {45};
Physical Volume(49) = {47};
Re: interface between bodies
Thanks for the reply, I took this example and accordingly modified another one, and came up with this:
That generates two bodies in Elmer. The 'pumppu.stl' is just 'pump_carter_sup.stp' (in samples/step) meshed in 2D in Gmsh.
I tried running the Vortex Shedding tutorial using these two bodies, but always get divergence. Could somebody show how this setup is turned into a functioning air flow case (with cube being air and .stl model being whatever solid) in Elmer ?
Code: Select all
//
// Modified .geo example from Dolfyn CFD package (www.dolfyn.net)
//
Geometry.Tolerance = 1.e-6;
// This affects the surrounding cube's mesh density
MeshSize = 50. ;
// StdSize = size of the surrounding box
// YOffset = offset in y axis
// (todo: x, z offsets)
StdSize = 275. ;
YOffset = -400. ;
// Models. This .stl will become 'Surface 1'..
Merge "pumppu.stl" ;
// ..which turns into a volume:
Surface Loop(2) = {1};
Volume(2) = {2};
//
// Generate surrounding cube:
//
Point(3) = { 1.5 * StdSize, YOffset, 1 * StdSize, MeshSize};
Point(4) = {-1.5 * StdSize, YOffset, 1 * StdSize, MeshSize};
Point(5) = {-1.5 * StdSize, YOffset,-2 * StdSize, MeshSize};
Point(6) = { 1.5 * StdSize, YOffset,-2 * StdSize, MeshSize};
Line(7) = {3 , 4};
Line(8) = {4 , 5};
Line(9) = {5 , 6};
Line(10) = {6 , 3};
Line Loop(11) = {7, 8, 9, 10};
Plane Surface(12) = {11};
// is this really legal? Gives error.. but works:
Extrude{0, 3.0 * StdSize, 0 }{ Surface{12}; }
// Array is the output of Extrude as seen in gmsh
Surface Loop (3) = {12, 21, 25, 29, 33, 34};
// Turn cube into volume:
Volume(13) = { 3 };
// Bind volumes
Volume(14) = {2,3};
// Finally, assign physical volumes:
Physical Volume(15) = {2};
Physical Volume(16) = {14};
I tried running the Vortex Shedding tutorial using these two bodies, but always get divergence. Could somebody show how this setup is turned into a functioning air flow case (with cube being air and .stl model being whatever solid) in Elmer ?