tutorial
Transcription
tutorial
tutorial How To extrude 2D mesh into 3D in Calculix – pipe mesh example Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Previous steps: The 2D mesh was created in Blender with the use of the fbd export script. The generation of the 2D mesh itself is the subject of an other Tutorial document. Starting up and opening the 2D mesh: Start up CalculiX: cgx b cylinder3.fbd The next step is to swep the 2D mesh in 3D among a strait line. Let's call the other end of the pipe “top”. All the entities (points, lines, surfaces imported) are stored in the “all” selection at the beginning. We will use a translation vector of [0,0,18] – z direction: swep all top tra 0 0 18 1 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Check what is the default division for the lines. We would like to use hexahedron cells, all the 2 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh lines will be divided due to its division definition. The division definition can be visulaized for example for all the lines in the model: plot ld all Note that the new lines – the ones parallel to the z axis - have 4 as division! Change the division of these lines! Switch the “+x” view: 3 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Now change the division: qdiv Selection mode “all”: a Define the opposite corners of the selection rectangle: r r 4 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Hit “r”! Hit “r”! Type in the new division definition (for two digit definitions type a <SPACE> before the numbers!): 99 Quit the division definition command: q Now define the cell type which the mesher should use as hexahedrons elty all he8 Start meshing: mesh all The reply is the following: please wait for 'ready' 5 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh numFaces:456192 numElems:76032 size:32845824 ready Visualize the newly created elements: plot e all Toggle on “Element Edges”: 6 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Switch visualization for element face visualization for smaller memory usage: plot f all Now create selections for inlet, outlet and wall. To do the selection the first letter of the element name should be typed in – p for points, l for lines, s for surfaces, etc.. For the boundary conditions element faces should be selected (f). Let's begin with the inlet boundary (“in”): qadd in a r r f q 7 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Check what was selected (with green color): plot f all plus f in g 8 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Remove non necessary faces from selection: qrem in a r r f q Create the outlet (“out”) and wall (“wall”) selections on the similar way. Visulizing the result “in” with green, “out” with red and “wall” with blue: plot f all plus f in g plus f out r plus f wall b 9 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh Check what selections are existing with what content: prnt se The reply is the following: 1 all stat:o n:80100 e:76032 f:7872 p:1602 l:3937 s:3104 b:768 L:0 S:0 se:0 2 top stat:c n:801 e:0 f:768 p:801 l:1568 s:768 b:0 L:0 S:0 se:0 3 in stat:c n:0 e:0 f:768 p:0 l:0 s:0 b:0 L:0 S:0 se:0 4 NJBY stat:c n:0 e:0 f:0 p:0 l:0 s:0 b:0 L:0 S:0 se:0 5 out stat:c n:0 e:0 f:768 p:0 l:0 s:0 b:0 L:0 S:0 se:0 6 wall stat:c n:0 e:0 f:6336 p:0 l:0 s:0 b:0 L:0 S:0 se:0 Export mesh in OpenFOAM format with the existing face selections (“in” - patch type, “out” patch type and “wall” - wall type): send all foam patch in patch out wall wall Reply: please wait for 'ready' use boundary: type:patch set:in use boundary: type:patch set:out use boundary: type:wall set:wall 10 Tutorial – CalculiX meshing for OpenFOAM: pipe mesh wrote foam mesh ready The mesh is ready to be used in OpenFOAM now! You can quit CalculiX: quit 11