Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:geometry:mesh:3d

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:user:geometry:mesh:3d [2014/08/08 17:40] jorisdoc:user:geometry:mesh:3d [2021/11/19 14:52] (current) papeleux
Line 1: Line 1:
-====== 3D meshers ======+====== 3D Meshers (Volumes) ======
  
  
-===== Transfinite mesher =====+===== Transfinite Mesher =====
  
-Metafor possess a simple transfinite mesher, which is able to mesh hexahedra (object with 6 sides, such as a cube). For more complex geometries, it is necessary to divide it into hexaedra or use external meshers ([[doc:user:general:glossaire#Samcef]], [[http://tetgen.berlios.de/|TetGen]], ...) and import the mesh in Metafor (see [[doc:user:geometry:import:tuto2]]).+Metafor possesses a simple transfinite mesher, which is able to mesh hexahedra (object with 6 sides, such as a cube). For more complex geometries, it is necessary to divide it into hexaedra or use external meshers ([[doc:user:general:glossaire#Samcef]], [[http://tetgen.berlios.de/|TetGen]], ...) and import the mesh in Metafor (see [[doc:user:geometry:import:tuto2]]).
  
 __Preliminary note:__ To mesh a ''[[doc:user:geometry:user:volumes|Volume]]'', all its ''[[doc:user:geometry:user:faces|Sides]]'' and ''[[doc:user:geometry:user:courbes|Curves]]'' must be meshed first ! __Preliminary note:__ To mesh a ''[[doc:user:geometry:user:volumes|Volume]]'', all its ''[[doc:user:geometry:user:faces|Sides]]'' and ''[[doc:user:geometry:user:courbes|Curves]]'' must be meshed first !
Line 19: Line 19:
 | ''type''   | = ''True'' if mesh elements must be generated (''CELL_HEXA'')\\ = ''False''  if only nodes must be generated (useful to debug only)      | | ''type''   | = ''True'' if mesh elements must be generated (''CELL_HEXA'')\\ = ''False''  if only nodes must be generated (useful to debug only)      |
  
-In this case, the ''[[doc:user:geometry:user:peaux|Skin]]'' must be defined tith the orientation shown below:+In this case, the ''[[doc:user:geometry:user:peaux|Skin]]'' must be defined with the orientation shown below:
  
 {{ doc:user:mesh-3d-2.gif |Définition de la skin du domaine pour l'autodétection}} {{ doc:user:mesh-3d-2.gif |Définition de la skin du domaine pour l'autodétection}}
Line 79: Line 79:
 ===== Mesher by extrusion ===== ===== Mesher by extrusion =====
  
-This method can be used, but could be improved upon: density non-constant along the extrusion direction, improvement of meshing speed, giving the extruded nodes as groups (internal ones, external surface, ...). For now on, a [[doc:user:geometry:user:faces|Side]]'', a ''[[doc:user:geometry:user:peaux|Skin]]'' or a ''[[doc:user:geometry:user:selections|Group]]'' can be extruded along any direction, with any number of elements.+This method can be used, but could be improved upon: density non-constant along the extrusion direction, improvement of meshing speed, giving the extruded nodes as groups (internal ones, external surface, ...). For now on, a ''[[doc:user:geometry:user:faces|Side]]'', a ''[[doc:user:geometry:user:peaux|Skin]]'' or a ''[[doc:user:geometry:user:selections|Group]]'' can be extruded along any direction, with any number of elements.
  
-The geometry associated to the extrusion can also be created (only for a ''[[doc:user:geometry:user:faces|Side]]''). For a ''[[doc:user:geometry:peaux|Skin]]'' or a ''Group'', we can create the ''[[doc:user:geometry:user:points|Points]]'' and ''[[doc:user:geometry:user:Courbes|Curves]]'' associated by extrusion to the ''[[doc:user:geometry:user:points|Points]]'' and ''[[doc:user:geometry:user:Courbes|Curves]]'' of the object.+The geometry associated to the extrusion can also be created (only for a ''[[doc:user:geometry:user:faces|Side]]''). For a ''[[doc:user:geometry:user:peaux|Skin]]'' or a ''Group'', we can create the ''[[doc:user:geometry:user:points|Points]]'' and ''[[doc:user:geometry:user:Courbes|Curves]]'' associated by extrusion to the ''[[doc:user:geometry:user:points|Points]]'' and ''[[doc:user:geometry:user:Courbes|Curves]]'' of the object.
  
 === Example ==== === Example ====
  
-Extrusion of a circle pierced by a square (see''apps.qs.extruMesher3d'').+Extrusion of a circle pierced by a square (see ''apps.qs.extruMesher3d'' and ''apps.qs.extruMesher3dTx'' or ''apps.qs.extruMesher3dTorsion'' ''apps.qs.extruMesher3dDist03'' for modified extrusions).
  
-{{ commit:2006:extru2_000.jpg?200 |Extrusion d'un cercle troué}}+{{commit:2006:extru2_000.jpg?200|Extrusion d'un cercle troué}} 
 +{{:doc:user:geometry:mesh:extrusionmeshertx.jpg?150|setXfct(fctX) }} 
 +{{:doc:user:geometry:mesh:extrusionmesherrot.jpg?150|setAnglefct(fctAngle)}} 
 +{{:doc:user:geometry:mesh:extrusionmesherDist.png?100|setNbOfLayers(10,0.3)}}
  
 The definition and meshing of the circle can be seen in the the file. To extrude the result (''[[doc:user:geometry:user:faces|Side]]'' #1): The definition and meshing of the circle can be seen in the the file. To extrude the result (''[[doc:user:geometry:user:faces|Side]]'' #1):
Line 94: Line 97:
   mesher.setFillGroup(True)   mesher.setFillGroup(True)
   mesher.setDirection(0.0,0.0,1.0)   mesher.setDirection(0.0,0.0,1.0)
-  mesher.setLength(8+  mesher.setLength(length
-  mesher.setNbOfLayers(10)+  mesher.setNbOfLayers(nLayers, dist = 1.0) 
 +  mesher.setAnglefct(fctAngle)  
 +  mesher.setXfct(fctX)  
 +  mesher.setYfct(fctY)
   mesher.execute()   mesher.execute()
   grpNo = mesher.getLastLayer(no)   grpNo = mesher.getLastLayer(no)
Line 104: Line 110:
 | setLength        | length of the extrusion | | setLength        | length of the extrusion |
  
-| setNbOfLayers    | number of extruded elements                                                         |+| setNbOfLayers    | nLayers : number of extruded elements                                          | 
 +|                  | dist  : ratio between the length of the last and first element (default : dist = 1.0) | 
 +| setAnglefct(fctAngle) | Application of a rotation of slices around extrusion vector (direction 'z' but starting from origin!!!) |  
 +| fctAngle | One parameter defining rotation of slices function in degrees (t) - t=[0,1] ATTENTION : fctAngle(0) = 0 | 
 +| setXfct(fctX) | Application of a modification of the generatrice direction in X Direction |  
 +| setYfct(fctY) | Application of a modification of the generatrice direction in Y Direction |  
 +| fctX/fctY | One parameter defining modification of generatrice : fct(t) - ATTENTION t=[0,Length] and fctX/fctY(0) = 0 |
 | execute          | execute the extrusion                                                               | | execute          | execute the extrusion                                                               |
 | getLastLayer(no) | returns the group grpNo (number ''no'') which contains the nodes of the last layer  | | getLastLayer(no) | returns the group grpNo (number ''no'') which contains the nodes of the last layer  |
Line 114: Line 126:
 === Example 2 ==== === Example 2 ====
  
-De la même manièreune face plane maillée en triangles peut être extrudée en 3D pour un maillage en prismes (voir le cas ''apps.monosMeca.monoTrac3dPenta'')+In a same waya planar face meshed with triangles can be extruded in 3D to be meshed with prisms (see ''apps.monosMeca.monoTrac3dPenta'').
  
 {{ commit:2007:cube_prismes.jpg?200 |Maillage d'un cube en prismes}} {{ commit:2007:cube_prismes.jpg?200 |Maillage d'un cube en prismes}}
  
  
-==== Création de la géométrie ====+==== Creation of the geometry ====
  
  
-=== Cas général: Extrusion d'une ''Side'', d'une ''Skin'' ou d'un ''Group'' ===+=== General case: Extrusion of a''Side'', ''Skin'' or a ''Group'' ===
  
-Après l'extrusion d'une ''[[doc:user:geometry:user:faces|Side]]'', d'une ''[[doc:user:geometry:user:peaux|Skin]]'' ou d'un ''[[doc:user:geometry:user:selections|Group]]'', on peut créer la géométrie extrudée à partir d'une ''[[doc:user:geometry:user:faces|Side]]'' avec la fonction :+After the extrusion of a ''[[doc:user:geometry:user:faces|Side]]'', ''[[doc:user:geometry:user:peaux|Skin]]'' or a ''[[doc:user:geometry:user:selections|Group]]'', the geometry can also be extruded from a ''[[doc:user:geometry:user:faces|Side]]'' with the function:
   mesher.createGeometryOn(Side, NoGObject, geometry)   mesher.createGeometryOn(Side, NoGObject, geometry)
-Les objets géométriques créés sont numérotés à partir de NoGObject.+Geometrical objects are created and numbered starting from NoGObject. 
 + 
 +The function ''createLineAbove'' can create only one ''[[doc:user:geometry:user:Courbes|Line]]'' corresponding to the extrusion of a ''[[doc:user:geometry:user:Points|Point]]'' :
  
-Une fonction permet de créer uniquement une ''[[doc:user:geometry:user:Courbes|Line]]'' correspondant à l'extrusion d'un ''[[doc:user:geometry:user:Points|Point]]'' : 
   line = createLineAbove(pt1, NumLine, NumPtOnTop, geometry)   line = createLineAbove(pt1, NumLine, NumPtOnTop, geometry)
  
-| line       | ''[[doc:user:geometry:user:Courbes|Line]]'' créée (numérotée : NumLine)             | +| line       | ''[[doc:user:geometry:user:Courbes|Line]]'' created (numbered: NumLine)             | 
-| pt1        | ''[[doc:user:geometry:user:Points|Point]]'' de référence                             | +| pt1        | reference ''[[doc:user:geometry:user:Points|Point]]''                             | 
-| NumPtOnTop | numéro du ''[[doc:user:geometry:user:Points|Point]]'' à l'autre extrémité du segment |+| NumPtOnTop | number of the ''[[doc:user:geometry:user:Points|Point]]'' situated at the other line extremity |
  
  
-=== Cas particulier: extrusion d'une Side ===+=== Particular case : extrusion of a Side ===
  
- +To create a geometry after the extrusion of a ''[[doc:user:geometry:user:faces|Side]]'', this function is used:
-Pour créer la géométrie après l'extrusion d'une ''[[doc:user:geometry:user:faces|Side]]'', on utilise la fonction :+
   mesher.createGeometry(NoGObject, geometry)   mesher.createGeometry(NoGObject, geometry)
-:!: Pour utiliser cette fonction il faut que la cible à extruder soit de type ''[[doc:user:geometry:user:faces|Side]]'' :!:+:!: To use this function, the target to extrude must be of type ''[[doc:user:geometry:user:faces|Side]]'' :!:
  
-Les objets géométriques créés sont numérotés à partir de NoGObject.+Geometrical objects are created and numbered starting from NoGObject.
  
  
 === Récupération des objets géométrique === === Récupération des objets géométrique ===
  
- +The retrieval of the created geometrical objetcs is done with the functions:
-La récupération des objets géométrique créés se fait avec les fonctions:+
  
   Vol1  = mesher.getVolumeOnTop(side1)   Vol1  = mesher.getVolumeOnTop(side1)
Line 156: Line 167:
   point = mesher.getPointOnTop(ptref)   point = mesher.getPointOnTop(ptref)
  
-| Vol1  | ''[[doc:user:geometry:user:volumes|Volume]]'' créé à partir de la ''Side 1'', celle extrudée+| Vol1  | ''[[doc:user:geometry:user:volumes|Volume]]'' created from ''Side 1'', the one which is extruded
-| side  | ''[[doc:user:geometry:user:faces|Side]]'' créée à partir de l'objet ''curveOrSide'' (qui correspond à une ''[[doc:user:geometry:user:Courbes|Curve]]'' ou une ''[[doc:user:geometry:user:faces|Side]]'' de l'objet extrudé). \\ Si : ''curveOrSide'' = ''[[doc:user:geometry:user:Courbes|Curve]]'' -> la ''Side'' renvoyée est tangente à la direction d'extrusion. \\ Si : ''curveOrSide'' = ''[[doc:user:geometry:user:faces|Side]]''     -> la direction d'extrusion est un vecteur normale à la ''Side'' renvoyée +| side  | ''[[doc:user:geometry:user:faces|Side]]'' created from the object ''curveOrSide'' (which corresponds to a ''[[doc:user:geometry:user:Courbes|Curve]]'' or a ''[[doc:user:geometry:user:faces|Side]]'' of the extruded object). \\ If : ''curveOrSide'' = ''[[doc:user:geometry:user:courbes|Curve]]'' -> the returned ''Side'' is tangent to the extrusion direction. \\ If: ''curveOrSide'' = ''[[doc:user:geometry:user:faces|Side]]''     -> the extrusion direction is a vector which is normal to the returned ''Side''
-| curve | ''[[doc:user:geometry:user:Courbes|Curve]]'' créée à partir de ''pointOrCurve'' (qui correspond à un ''[[doc:user:geometry:user:Points|Point]]'' ou une ''[[doc:user:geometry:user:Courbes|Curve]]'' de l'objet extrudé) \\ Si : ''pointOrCurve'' = ''[[doc:user:geometry:user:Points|Point]]'' -> la ''Curve'' renvoyée est tangente à la direction d'extrusion. \\ Si : ''pointOrCurve'' = ''[[doc:user:geometry:user:Courbes|Curve]]''     -> la direction d'extrusion est un vecteur normal à la ''Curve'' renvoyée+| curve | ''[[doc:user:geometry:user:Courbes|Curve]]'' created from ''pointOrCurve'' (which corresponds to a ''[[doc:user:geometry:user:Points|Point]]'' or a ''[[doc:user:geometry:user:Courbes|Curve]]'' of the extruded object) \\ If : ''pointOrCurve'' = ''[[doc:user:geometry:user:Points|Point]]'' -> the returned ''Curve'' is tangent to the extrusion direction. \\ If: ''pointOrCurve'' = ''[[doc:user:geometry:user:Courbes|Curve]]''     -> the extrusion direction is a vector which is normal to the returned ''Curve''
-| point | ''[[doc:user:geometry:user:Points|Point]]'' créé à partir de ''ptref'' (''[[doc:user:geometry:user:Points|Point]]'' de l'objet extrudé) | +| point | ''[[doc:user:geometry:user:Points|Point]]'' created from ''ptref'' (''[[doc:user:geometry:user:Points|Point]]'' of the extruded object) |
  
-La géométrie est crée dans le cas test ''apps.welding.welding'' et ''aspCrushing.tests.threeD.smoothStripRoughTool''.+The geometry is created in the test cases ''apps.welding.welding'' and ''aspCrushing.tests.threeD.smoothStripRoughTool''.
  
-<note important> +<important note
-ATTENTIONaprès la création de la géométrieil faut ajouter le ''Volume'' (renvoyer par la fonction mesher.getVolumeOnTop(side)) à l'aide de la commande ''push'' dans le FieldApplicator à la place du groupe (groupset(1) du constructeur de l'objet ExtrusionMesher3D). Dans **le cas particulier** d'une seule couche d'éléments dans la direction d'extrusion, nous sommes obligés d'ajouter le groupe (groupset(1) du constructeur de l'objet ExtrusionMesher3D) à l'aide de la commande ''push'' dans le FieldApplicator, quelle que soit l'entité géométrique extrudée (''[[doc:user:geometry:user:faces|Side]]'', ''[[doc:user:geometry:user:peaux|Skin]]'' ou ''[[doc:user:geometry:user:selections|Group]]'').+CAREFULafter creating the geometrythe ''Volume'', returned by the function ''mesher.getVolumeOnTop(side)'' must be added with the ''push'' command to the ''FieldApplicator'' in place of the group (groupset(1) of the constructor of the object ''ExtrusionMesher3D''). In the case where only one layer of elements is found in the extrusion directionthe group (groupset(1) of the constructor of the object ''ExtrusionMesher3D'') must be added with the ''push'' command in the ''FieldApplicator'', whichever the extruded entity (''[[doc:user:geometry:user:faces|Side]]'', ''[[doc:user:geometry:user:peaux|Skin]]'' or ''[[doc:user:geometry:user:selections|Group]]''). 
 </note> </note>
  
  
 +===== Mesher by extrusion of revolution =====
  
-===== Mailleur par extrusion de révolution =====+Axisymmetric extrusion of a meshed side. 
 +The extrusion can be open ($0 < \mbox{angle} < 360^\circ$) or close ($\mbox{angle} 360^\circ$).
  
-Extrusion axisymétrique d'une face maillée. +To this dayno reconstruction of the extruded geometry exists. ''Groups'' should be used to set boundary conditions
-L'extrusion peut être ouverte ($0 < \mbox{angle} < 360^\circ$) ou fermée ($\mbox{angle} = 360^\circ$). +
-A ce jouril n'y a pas de reconstruction de la géométrie extrudée (utilisez les ''Group'' pour gérer vos fixations).+
  
   mesher = RevolutionExtrusionMesher3D(gobject, group, axe, angle=180.0)   mesher = RevolutionExtrusionMesher3D(gobject, group, axe, angle=180.0)
Line 181: Line 191:
   mesher.execute()   mesher.execute()
  
-| gobject          | Objet géométrique 2DMaillé                                                              +| gobject          | Meshed 2D geometrical entity                                                            
-| group            | Group father des mailles 3D                                                             +| group            | Group father of the 3D mesh elements                                                    
-| axe              | Ligne géométrique définissant l'axe de révolution                                       +| axe              | Line which defines the revolution axis                                                  
-setLength        longueur d'extrusion                                                                    +setAngle         Angle of the extrusion (in degrees 0.0 < angle <= 360.0 - default = 180.0)              
-| setNbOfLayers    | nombre d'éléments extrudés                                                              +| setNbOfLayers    | number of extruded elements                                                             | 
-| execute          | effectue l'extrusion                                                                    |+| setFillGroup     | fill the reference group with all nodes (base & generated)                              
 +| execute          | executes the extrusion                                                                  | 
 +| getLastLayer     | return the group of the last layer (if not closed extrusion)                            |
  
-==== Exemple ====+==== Example ====
  
 {{:commit:2012:revolutionextusion1.png?200|}} {{:commit:2012:revolutionextrusion2.png?200|}} {{:commit:2012:revolutionextrusion3.png?200|}} {{:commit:2012:revolutionextusion1.png?200|}} {{:commit:2012:revolutionextrusion2.png?200|}} {{:commit:2012:revolutionextrusion3.png?200|}}
doc/user/geometry/mesh/3d.1407512403.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki