Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:geometry:user:selections

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:user:selections [2014/08/07 19:18] jorisdoc:user:geometry:user:selections [2018/01/30 18:46] (current) papeleux
Line 1: Line 1:
-====== Node selection - Groups ======+====== Node Groups ======
  
 Node selections are used to apply boundary conditions ([[doc:user:conditions:displacements]]) or to extract curves ([[doc:user:results:courbes_res]]) on a specific node set which does not initially come from a geometric entity. In Metafor, a selection is represented by a ''Group''. This object is a virtual geometric entity which can possess nodes, in the same way as other entities receive them when they are meshed. Node selections are used to apply boundary conditions ([[doc:user:conditions:displacements]]) or to extract curves ([[doc:user:results:courbes_res]]) on a specific node set which does not initially come from a geometric entity. In Metafor, a selection is represented by a ''Group''. This object is a virtual geometric entity which can possess nodes, in the same way as other entities receive them when they are meshed.
Line 5: Line 5:
 ===== ''Group'' Creation ===== ===== ''Group'' Creation =====
  
-A''Group'' is defined as any other geometric entity.+A ''Group'' is defined as any other geometric entity.
  
   groupset.add( Group(number) )   groupset.add( Group(number) )
Line 20: Line 20:
  
 ===== Adding nodes (simple) ===== ===== Adding nodes (simple) =====
- 
  
   groupset(number).add(GObject)   groupset(number).add(GObject)
Line 26: Line 25:
   groupset(number).addMeshPointsInBox(xmin, xmax, ymin, ymax, zmin, zmax)   groupset(number).addMeshPointsInBox(xmin, xmax, ymin, ymax, zmin, zmax)
   groupset(number).addMeshPointsFromObject(target, selector)   groupset(number).addMeshPointsFromObject(target, selector)
 +  groupset(number).addInnerMeshPointsFromObject(target, selector) 
      
 where where
  
 | ''number'' | group number |  | ''number'' | group number | 
-| ''no'' | number of the node ((it is more of a ''MeshPoint'', so a mesh point which can be found in ''domain.getTopology().getPointSet()'')) to add to the group| +| ''no''     | number of the node ((it is more of a ''MeshPoint'', so a mesh point which can be found in ''domain.getTopology().getPointSet()'')) to add to the group| 
 | ''xmin'', ''ymin'', ''zmin'' | lower corner of the selection box|  | ''xmin'', ''ymin'', ''zmin'' | lower corner of the selection box| 
 | ''xmax'', ''ymax'', ''zmax'' | upper corner of the selection box|  | ''xmax'', ''ymax'', ''zmax'' | upper corner of the selection box| 
-| ''target'' | geometric entity used as support |  +| ''target''   | geometric entity used as support |  
-| ''selector'' | selection operator which reduces the number of MeshPoints in the group| +| ''selector'' | selection operator which reduces the number of MeshPoints in the group | 
  
 +nb : addInnerMeshPointsFromObject does not add nodes on boundary of ''target'' if ''target'' is a real geometrical object (meaning : not a group)
  
-===== Tri des noeuds sélectionnés (sorter) =====+===== Sorting the selected nodes =====
  
-Il n'est pas toujours aisé de construire la sélection des noeuds sur les seuls noeuds dont on veut disposer (sur des tests paramétriques par exemples). Il est possible après sélection des noeuds de les trier et de n'en sélectionner qu'un nombre plus réduit que à l'origineLe tri se fait à l'aide des operateurs de tri : [[doc:user:general:sortingoperator|''SortingOperator'']].+It is not always easy to select only the required nodes (on parametric studies for example). Therefore, it is possible to sort a selection, in order to select a subset of this first selectionThis is done done with [[doc:user:general:sortingoperator]].
  
   groupset(number).selectMeshPoints(sorter,nbMeshPoints)   groupset(number).selectMeshPoints(sorter,nbMeshPoints)
  
- +where 
-| ''number''numéro du groupe|  +| ''number''group number|  
-| ''sorter''opérateur de tri|  +| ''sorter''sorting operator|  
-| ''nbMeshPoints''nombre de ''MeshPoints'' conservés dans le groupe +| ''nbMeshPoints''number of ''MeshPoints'' which will remain in the group 
  
-__Exemple:__+__Example:__
  
   group.addMeshPointsFromObject(sideset(1))   group.addMeshPointsFromObject(sideset(1))
   group.selectMeshPoints(SortByNo(),3)    group.selectMeshPoints(SortByNo(),3) 
  
-Tri des noeuds par leur numero et conservation de 3 valeurs.+These lines sort the nodes by user number and conservation of three values.
  
-===== Utilisation avancée (Selectors) =====+===== Advanced features (Selectors) =====
  
-Ajout de noeuds depuis l'objet géométrique ''target'':+Adding nodes from the geometric object ''target'' (target can be a group):
  
   groupset(number).addMeshPointsFromObject(target, selector)   groupset(number).addMeshPointsFromObject(target, selector)
  
-où ''selector'' est un objet de type ''Selector'' dont voici quelques classes dérivées:+where ''selector'' is an object of the ''Selector'' type. Here are some of its derived classes:
  
-    * ''BoxSelector'' (sélection dans une boîte), +=== BoxSelector===
-    * ''RangeSelector'' (sélection dans une zone de l'espace), +
-    * ''DistSelector'' (sélection sphérique), +
-    * ''SectorSphericalSelector'' (sélection dans un secteur sphérique), +
-    * ''AnnealedSelector'' (sélection en anneau selon la direction ''x'', ''y'' ou ''z''), +
-    * ''SectorAnnealedSelector'' (sélection d'un quartier d'anneau défini par deux angles selon la direction ''x'', ''y'' ou ''z''), +
-    * ''InverseSelector'' (inverse le critère de sélection donné en argument).+
  
-__Exemples:__+Selection within a box :  
 + 
 +  BoxSelector(xMin, xMax, yMin, yMax, zMin, zMax) 
 + 
 +where 
 +| ''xMin'' | minimal X value |  
 +| ''xMax'' | maximal X value |  
 +| ''yMin'' | minimal Y value |  
 +| ''yMax'' | maximal Y value |  
 +| ''zMin'' | minimal Z value |  
 +| ''zMax'' | maximal Z value |  
 + 
 +=== RangeSelector === 
 + 
 +Selection in a given area :  
 + 
 +  RangeSelector(lock, vMin, vMax) 
 + 
 +where 
 +| ''lock'' | direction of the selector : ''TX'', ''TY'' or ''TZ'' |  
 +| ''vMin'' | minimal value in lock direction |  
 +| ''vMax'' | maximal value in lock direction |  
 + 
 +=== DistSelector === 
 + 
 +Spherical selection :  
 + 
 +  DistSelector (Cx, Cy, Cz, R) 
 + 
 +where 
 +| ''Cx, Cy, Cz'' | center of the sphere |  
 +| ''R'' | radius of the sphere |  
 + 
 +=== SectorSphericalSelector === 
 + 
 +Selection in a spherical sector :  
 + 
 +  SectorSphericalSelector (Cx, Cy, Cz, rMin, rMax, thetaMin, thetaMax, phiMin, phiMax) 
 + 
 +where 
 +| ''Cx, Cy, Cz'' | center of the spherical sector |  
 +| ''rMin''- ''rMax'' | minimal - maximal radius of the spherical sector |  
 +| ''thetaMin''-''thetaMax'' | minimal-maximal azimuth angle (from $0.0$ to $2 \pi$) |  
 +| ''phiMin''-''phiMax'' | minimal-maximal elevation angle (from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$) |  
 + 
 +__Note__ : angles are computed with respect to the structural frame translated toward the center or the sphere.  
 + 
 +=== AnnealedSelector === 
 + 
 +Selection selection of a ring along the ''x'', ''y'' or ''z'' direction :  
 + 
 +  AnnealedSelector(lock, x, y, z, rMin, rMax, hMin, hMax) 
 + 
 +where 
 +| ''lock''  | direction of the axe of the ring (''TX'', ''TY'' or ''TZ'') |  
 +| ''x,y,z'' | center of the ring |  
 +| ''rMin,rMax'' | minimal - maximal radius of the ring |  
 +| ''hMin,hMax'' | minimal - maximal height of the ring |  
 + 
 +gets all nodes situated from the two cylinders of axis ''lock'', of radii ''rMin'' and ''rMax'', and of height between ''hMin'' and ''hMax''
 + 
 +=== SectorAnnealedSelector === 
 + 
 +Selection of a part or a ring, defined by two angles, along the ''x'', ''y'' or ''z'' direction :  
 + 
 +  SectorAnnealedSelector(lock, x, y, z, rMin, rMax, thetaMin, thetaMax, hMin, hMax) 
 + 
 +where 
 +| ''lock''  | direction of the axe of the ring (''TX'', ''TY'' or ''TZ'') |  
 +| ''x,y,z'' | center of the ring |  
 +| ''rMin, rMax'' | minimal - maximal radius of the ring sector |  
 +| ''thetaMin, thetaMax'' | minimal - maximal angle of the sector (from $-\pi$ to $\pi$) |  
 +| ''hMin, hMax'' | minimal - maximal height of the ring sector |  
 + 
 +=== TorrusSelector === 
 + 
 +Selection of nodes inside a torus : 
 + 
 +  TorrusSelector(axe, Cx, Cy, Cz, rMin, rMax) 
 + 
 +where 
 +| ''axe'' | [[doc:user:geometry:user:axes|Axe]] of the torus  |  
 +| ''Cx, Cy, Cz'' | center of the torrus |  
 +| ''rMin'' | minimal Radius (to be explained) |  
 +| ''rMax'' | maximal Radius (to be explained) |  
 + 
 +=== EllipseSelector === 
 + 
 +Selection within an ellipse : 
 + 
 +  EllipseSelector (lock, Cx, Cy, CZ, a, b) 
 + 
 +where 
 +| ''lock'' | direction of axe perpendicular to the plane of the ellipse : ''TX'', ''TY'' or ''TZ'' |  
 +| ''Cx, Cy, Cz'' | center of the ellipse | 
 +| ''a'' | small radius |  
 +| ''b'' | big radius |  
 + 
 + 
 +=== PlaneSelector === 
 + 
 +Selection on one side of a plane : 
 + 
 +  PlaneSelector (plane, dir) 
 + 
 +where 
 +| ''plane'' | [[doc:user:geometry:user:surfaces#plane|Plane]] surface object |  
 +| ''dir'' | boolean (True / False) defining the side of the plane (depending to the normal) | 
 + 
 +=== BoundarySelector === 
 + 
 +Select nodes that are on the surface of a meshed object (3D Models only)  : 
 +  BoundarySelector () 
 + 
 +=== Boundary2DSelector === 
 + 
 +Select nodes that are on the surface of a meshed object (2D Models only)  : 
 + 
 +  Boundary2DSelector () 
 + 
 +=== InverseSelector === 
 + 
 +Revert the effect of a selector 
 + 
 +  InverseSelector (selector) 
 + 
 +where 
 +| ''selector'' | selector whose effect will be inverted |  
 + 
 +__Examples:__
  
   group.addMeshPointsFromObject(sideset(1), RangeSelector(TX, xmin, xmax))     group.addMeshPointsFromObject(sideset(1), RangeSelector(TX, xmin, xmax))  
  
-récupère tous les noeuds de la face numéro dont la coordonnée ''x'' est comprise entre ''xmin'' et ''xmax''.+gets all nodes from side #whose ''x'' coordinate is between ''xmin'' et ''xmax''.
  
   group.addMeshPointsFromObject(sideset(1), BoxSelector(xmin, xmax, ymin, ymax, zmin, zmax))   group.addMeshPointsFromObject(sideset(1), BoxSelector(xmin, xmax, ymin, ymax, zmin, zmax))
  
-récupère tous les noeuds de la face numéro de la boite rectangulaire définie par ''xmin'', ''xmax'', ''ymin'', ''ymax'', ''zmin'', ''zmax''.+gets all nodes from side #in the rectangular box defined by ''xmin'', ''xmax'', ''ymin'', ''ymax'', ''zmin'', ''zmax''.
  
    group.addMeshPoints(DistSelector(x, y, z, R))    group.addMeshPoints(DistSelector(x, y, z, R))
  
-récupère tous les noeuds situés dans la sphère de centre ''(x,y,z)'' et de rayon ''R''.+gets all nodes situated in a sphere of center ''(x,y,z)'' and radius ''R''.
  
    group.addMeshPoints(SectorSphericalSelector(Cx, Cy, Cz, rMin, rMax, thetaMin, thetaMax, phiMin, phiMax))     group.addMeshPoints(SectorSphericalSelector(Cx, Cy, Cz, rMin, rMax, thetaMin, thetaMax, phiMin, phiMax)) 
  
-récupère tous les nœuds dans le secteur sphérique de centre (Cx,Cy,Cz), de rayon minimum rMin et maximum rMax, d'angle azimutale minimum thetaMin et maximum thetaMax, et d'angle d'élévation minimum phiMin et maximum phiMax :+gets all nodes in the spherical sector of center (Cx,Cy,Cz), of minimal and maximal radii rMin and rMax, of minimal and maximal azimuth angle thetaMin and thetaMax, and of minimal and maximal elevation angle pHiMin and phiMax.
  
-__Remarque__ les angles sont calculés par rapport au système d'axes structuraux translatés au centre de la sphèreL'angle d'élévation varie de $-\frac{\pi}{2}$ à $\frac{\pi}{2}$ et l'angle azimutale varie de $0.0$ à $2 \pi$.+__Note__ : angles are computed with respect to the structural frame translated toward the center or the sphereThe elevation angle varies from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$ and the azimuth angle from $0.0$ to $2 \pi$.
  
 +  group.addMeshPoints(TorrusSelector(Axe(curveset(1)), Cx, Cy, Cz, rMin, rMax))
 +  
 +gets all nodes in the toroidal sector defined by the revolution axis Axe(curveset(1)), the annular cross section centroid is (Cx, Cy, Cz) (This is the cross section used in the revolution mesher.) and the minimal and maximal radii rMin and rMax.
 + 
   group.addMeshPoints(AnnealedSelector(TX, x, y, z, rMin, rMax, zMin, zMax))   group.addMeshPoints(AnnealedSelector(TX, x, y, z, rMin, rMax, zMin, zMax))
  
-récupère tous les noeuds situés entre les deux cylindres d'axe ''TX'', de rayons ''rMin'' et ''rMax'' et compris entre de hauteur comprises entre ''zMin'' et ''zMax''.+gets all nodes situated from the two cylinders of axis ''TX'', of radii ''rMin'' and ''rMax'', and of height between ''zMin'' and ''zMax''.
  
   group.addMeshPoints(SectorAnnealedSelector(TX, x, y, z, rMin, rMax, thetaMin, thetaMax, zMin, zMax))   group.addMeshPoints(SectorAnnealedSelector(TX, x, y, z, rMin, rMax, thetaMin, thetaMax, zMin, zMax))
  
-récupère tous les noeuds situés entre les deux quartier de cylindres d'axe ''TX'', d'ouverture comprise entre ''thetaMin'' et ''thetaMax'', de rayons ''rMin'' et ''rMax'' et compris entre de hauteur comprises entre ''zMin'' et ''zMax''.+gets all nodes situated within two parts of cylinders of axis ''TX'', of opening angle between ''thetaMin'' and ''thetaMax'', of radii ''rMin'' and ''rMax'', and of height between ''zMin'' and ''zMax''.
  
 {{ doc:user:selectors.gif |Selectors}} {{ doc:user:selectors.gif |Selectors}}
doc/user/geometry/user/selections.1407431883.txt.gz · Last modified: 2016/03/30 15:22 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki