Metafor

ULiege - Aerospace & Mechanical Engineering

User Tools

Site Tools


doc:user:geometry:user:selections

This is an old revision of the document!


Node Groups

Node selections are used to apply boundary conditions (Prescribed Displacements) or to extract curves (Saving history curves to disk) 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.

''Group'' Creation

A Group is defined as any other geometric entity.

groupset.add( Group(number) )

Information on the nodes of a ''Group''

Some functions can be used to obtain data on some nodes of a Group:

grp = groupset(number)

grp.getNo()                 # Returns the number of the group grp 
grp.getNumberOfMeshPoints() # Returns the number of meshedPoints in the ''Group'' grp 
grp.getMeshPoint(idx)       # Returns a reference towards the idxth MeshedPoint of the group grp.

Adding nodes (simple)

groupset(number).add(GObject)
groupset(number).addMeshPoint(no)
groupset(number).addMeshPointsInBox(xmin, xmax, ymin, ymax, zmin, zmax)
groupset(number).addMeshPointsFromObject(target, selector)
groupset(number).addInnerMeshPointsFromObject(target, selector) (does not add nodes on boundary of target)

where

number group number
no number of the node 1) to add to the group
xmin, ymin, zmin lower corner of the selection box
xmax, ymax, zmax upper corner of the selection box
target geometric entity used as support
selector selection operator which reduces the number of MeshPoints in the group

Sorting the selected nodes

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 selection. This is done done with Node Sorting Operators.

groupset(number).selectMeshPoints(sorter,nbMeshPoints)

where

number group number
sorter sorting operator
nbMeshPoints number of MeshPoints which will remain in the group

Example:

group.addMeshPointsFromObject(sideset(1))
group.selectMeshPoints(SortByNo(),3) 

These lines sort the nodes by user number and conservation of three values.

Advanced features (Selectors)

Adding nodes from the geometric object target:

groupset(number).addMeshPointsFromObject(target, selector)

where selector is an object of the Selector type. Here are some of its derived classes:

  • BoxSelector (selection within a bow),
  • RangeSelector (selection in a given area),
  • DistSelector (spherical selection),
  • SectorSphericalSelector (selection in a spherical sector),
  • AnnealedSelector (selection of a ring along the x, y or z direction),
  • SectorAnnealedSelector (selection of a part or a ring, defined by two angles, along the x, y or z direction),
  • InverseSelector (inverse the selection criterion passed in argument).

Examples:

group.addMeshPointsFromObject(sideset(1), RangeSelector(TX, xmin, xmax))  

gets all nodes from side #1 whose x coordinate is between xmin et xmax.

group.addMeshPointsFromObject(sideset(1), BoxSelector(xmin, xmax, ymin, ymax, zmin, zmax))

gets all nodes from side #1 in the rectangular box defined by xmin, xmax, ymin, ymax, zmin, zmax.

 group.addMeshPoints(DistSelector(x, y, z, 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)) 

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.

Note : angles are computed with respect to the structural frame translated toward the center or the sphere. The 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))

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))

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.

Selectors

1)
it is more of a MeshPoint, so a mesh point which can be found in domain.getTopology().getPointSet()
doc/user/geometry/user/selections.1517325829.txt.gz · Last modified: 2018/01/30 16:23 by papeleux

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki