doc:user:geometry:user:selections
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
doc:user:geometry:user:selections [2013/07/12 13:31] – external edit 127.0.0.1 | doc:user:geometry:user:selections [2018/01/30 18:46] (current) – papeleux | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Node Groups ====== | ||
+ | Node selections are used to apply boundary conditions ([[doc: | ||
+ | |||
+ | ===== '' | ||
+ | |||
+ | A '' | ||
+ | |||
+ | groupset.add( Group(number) ) | ||
+ | |||
+ | ===== Information on the nodes of a '' | ||
+ | |||
+ | Some functions can be used to obtain data on some nodes of a '' | ||
+ | |||
+ | grp = groupset(number) | ||
+ | | ||
+ | grp.getNo() | ||
+ | grp.getNumberOfMeshPoints() # Returns the number of meshedPoints in the '' | ||
+ | grp.getMeshPoint(idx) | ||
+ | |||
+ | ===== Adding nodes (simple) ===== | ||
+ | |||
+ | groupset(number).add(GObject) | ||
+ | groupset(number).addMeshPoint(no) | ||
+ | groupset(number).addMeshPointsInBox(xmin, | ||
+ | groupset(number).addMeshPointsFromObject(target, | ||
+ | groupset(number).addInnerMeshPointsFromObject(target, | ||
+ | | ||
+ | where | ||
+ | |||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | nb : addInnerMeshPointsFromObject does not add nodes on boundary of '' | ||
+ | |||
+ | ===== 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 [[doc: | ||
+ | |||
+ | groupset(number).selectMeshPoints(sorter, | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | __Example: | ||
+ | |||
+ | group.addMeshPointsFromObject(sideset(1)) | ||
+ | group.selectMeshPoints(SortByNo(), | ||
+ | |||
+ | These lines sort the nodes by user number and conservation of three values. | ||
+ | |||
+ | ===== Advanced features (Selectors) ===== | ||
+ | |||
+ | Adding nodes from the geometric object '' | ||
+ | |||
+ | groupset(number).addMeshPointsFromObject(target, | ||
+ | |||
+ | where '' | ||
+ | |||
+ | === BoxSelector=== | ||
+ | |||
+ | Selection within a box : | ||
+ | |||
+ | BoxSelector(xMin, | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === RangeSelector === | ||
+ | |||
+ | Selection in a given area : | ||
+ | |||
+ | RangeSelector(lock, | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === DistSelector === | ||
+ | |||
+ | Spherical selection : | ||
+ | |||
+ | DistSelector (Cx, Cy, Cz, R) | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === SectorSphericalSelector === | ||
+ | |||
+ | Selection in a spherical sector : | ||
+ | |||
+ | SectorSphericalSelector (Cx, Cy, Cz, rMin, rMax, thetaMin, thetaMax, phiMin, phiMax) | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | __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 '' | ||
+ | |||
+ | AnnealedSelector(lock, | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | gets all nodes situated from the two cylinders of axis '' | ||
+ | |||
+ | === SectorAnnealedSelector === | ||
+ | |||
+ | Selection of a part or a ring, defined by two angles, along the '' | ||
+ | |||
+ | SectorAnnealedSelector(lock, | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === TorrusSelector === | ||
+ | |||
+ | Selection of nodes inside a torus : | ||
+ | |||
+ | TorrusSelector(axe, | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === EllipseSelector === | ||
+ | |||
+ | Selection within an ellipse : | ||
+ | |||
+ | EllipseSelector (lock, Cx, Cy, CZ, a, b) | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | |||
+ | === PlaneSelector === | ||
+ | |||
+ | Selection on one side of a plane : | ||
+ | |||
+ | PlaneSelector (plane, dir) | ||
+ | |||
+ | where | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | === 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 | ||
+ | | '' | ||
+ | |||
+ | __Examples: | ||
+ | |||
+ | group.addMeshPointsFromObject(sideset(1), | ||
+ | |||
+ | gets all nodes from side #1 whose '' | ||
+ | |||
+ | group.addMeshPointsFromObject(sideset(1), | ||
+ | |||
+ | gets all nodes from side #1 in the rectangular box defined by '' | ||
+ | |||
+ | | ||
+ | |||
+ | gets all nodes situated in a sphere of center '' | ||
+ | |||
+ | | ||
+ | |||
+ | 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)), | ||
+ | | ||
+ | gets all nodes in the toroidal sector defined by the revolution axis Axe(curveset(1)), | ||
+ | |||
+ | group.addMeshPoints(AnnealedSelector(TX, | ||
+ | |||
+ | gets all nodes situated from the two cylinders of axis '' | ||
+ | |||
+ | group.addMeshPoints(SectorAnnealedSelector(TX, | ||
+ | |||
+ | gets all nodes situated within two parts of cylinders of axis '' | ||
+ | |||
+ | {{ doc: |