Home
Generator 2.0 - User Guide - - elsA
Contents
1. enforceX array import Generator as G import Converter as C 39 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB Ni 50 Nj 50 a G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni N3 1 Monotonic distribution b G enforceX a 0 3 0 001 13 25 C convertArrays2File b out plt Example file Examples Generator enforceXPT py enforceX pyTree import Generator PyTree as G import Converter PyTree as C Ni 50 Nj 50 Nk 2 a G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni NJ Nk a G enforceX a 0 3 0 001 13 25 t C newPyTree Base t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator enforce py enforceX enforceY monotonic array import Converter as C import Generator as G a G cart 0 0 0 1 1 1 20 20 10 b G enforceX a 5 0 2 10 5 b G enforceX b 15 0 2 10 5 b G enforceY b 10 0 1 5 5 b G enforcePlusY b 0 01 20 5 C convertArrays2File a b out plt Example file Examples Generator enforcePT py enforceX enforceY monotonic pyTree import Generator PyTree as G import Converter PyTree as C cart 0 0 0 1 1 1 20 20 10 enforceX a 5 0 2 10 5 enforcex b 15 0 2 10 5 enforceY b 10 0 1 5 5 C newPyTree Base t 2 1 2 append b convertPyTree2File t out cgns aQaaan a b b b E Cs
2. Base t 2 1 2 a C convertPyTree2File t out cgns Example file Examples Generator gencartmb py gencartmb array import Generator as G import Converter as C body grid a G cylinder 0 0 0 0 5 1 360 0 10 50 50 30 h 1 e 1 Step of finest Cartesian grid Dfar 10 Extension of far boundaries nlvl 5 5 5 Nb of points per level except the 4th level automatic cartGrids G gencartmb a h Dfar nlvl C convertArrays2File cartGrids out plt Example file Examples Generator gencartmbPT py gencartmb pyTree import Generator PyTree as G import Converter PyTree as C import Transform PyTree as T body mesh a G cylinder 0 0 0 0 5 1 360 0 10 50 50 201 h 1l e 1 Step of finest Cartesian grid Dfar 20 Distance to far boundaries Nb of points per level Here 4 levels but last one is computed automatically nlvl 10 10 5 nlv1 0 coarse grid t C newPyTree Bodies CARTESIAN t 2 1 2 append a zones G gencartmb t 2 1 h Dfar nlvl t 2 2 2 zones C convertPyTree2File t out cgns Example file Examples Generator octree py octree array import Generator as G import Converter as C import Geom as D s D circle 0 0 0 1 N 100 snear 0 01 res G octree s snear dfar 5 balancing 1 C convertArrays2File res out plt Example file Examples Generator octreePT
3. 0 0 1 0 5 distrib T translate distrib 0 5 0 0 C convertArrays2File distrib distrib plt msh T reorder msh 1 2 3 msh G hyper2D msh distrib C C convertArrays2File msh out plt 43 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB
4. C convertArrays2File x out plt Example file Examples Generator booleanMinusPT py boolean difference pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close s1 s2 C convertArray2Tetra s2 s2 G close s2 x G booleanMinus sl s2 tolerance 0 t C newPyTree Base 2 t 2 1 2 append x C convertPyTree2File t out cgns Example file Examples Generator booleanIntersection py boolean intersection array import Generator as G import Converter as C import Geom as D sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close s1 s2 C convertArray2Tetra s2 s2 G close s2 x G booleanIntersection sl s2 tolerance 0 C convertArrays2File x out plt Example file Examples Generator booleanIntersectionPT py boolean intersection pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close sl s2 C convertArray2Tetra s2 s2 G close s2 x G booleanIntersection sl s2 tolerance 0 t C newPyTree Base 2 t 2 1 2 append x C convertPyTree2File t out cgns Example file Examples G
5. User definition of parametric curve def f t u x t u y txt l uxu zz zs u return x y z Array definition of geometry a D surface f circle E LL 006 051 rotate c 1 2 1 7 0 6 0 1 0 90 reorder c 1 2 3 projectOrtho c a on an HHHOO bh Gear ee he DEL DL EK a 157171 r G surfaceWalk a c h niter 100 t C newPyTree Base t 2 1 2 r C convertPyTree2File t out cgns Example file Examples Generator collarMesh py collarMesh array import Converter as C import Geom as D import Transform as T import Generator as G sl D sphere 0 0 0 1 20 s2 T translate sl 1 2 0 0 s2 T homothety s2 0 0 0 0 5 dhj G cart 0 0 0 1 e 2 1 1 21 1 1 dhk Geart 0 0 90 lt Lee 2 e 1 1 5 1115151 a G collarMesh s1 s2 dhj dhk niterj 100 niterk 100 type union C convertArrays2File a out plt 19 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB Example file Examples Generator collarMeshPT py collarMesh pyTree import Converter PyTree as C import Geom PyTree as D import Transform PyTree as T import Generator PyTree as G sl D sphere 0 0 0 1 20 s2 T translate sl 1 2 0 0 s2 T homothety s2 0 0 0 0 5 dhj G cart 0 0 0 1 e 2 1 1 21 1 1 dhk G cart 0 0 0 1 e 2 1 1 11 1 1 a G collarMesh s1 s2 dhj dhk niterj 100 niterk 100 type union t C newPyTree
6. Z 2 G A G i g L G s o E a O as ES Ee O E Ca Q o O yo S a z 5 N O O bai Q DN 5 Ke mh Ti ka g O 5 5 et ot le Y O rd ke Z lt O Lei ya O e b G snapFront a S optimized 1 oN ELSA MU 09022 V2 0 O N E R STN THE FRENCH AEROSPACE LAB G snapSharpEdges snap a mesh to a surface S constrained by sharp edges and corners if step None sharp edges are refined with this step Sharp Edges are calculated depending on angle b G snapSharpEdges a S step None angle 30 See Examples Generator snapSharpEdges py See Examples Generator snapSharpEdgesPT py 1 6 Operations on surface meshes G fittingPlaster fit a surface structured patch to a curve a BumpFactor controls the curvature of the patch b G fittingPlaster a bumpFactor 0 See Examples Generator fittingPlaster py See Examples Generator fittingPlasterPT py G gapfixer fill a gap defined by a BAR contour a drawn on a surface c You can force the generated mesh to pass through HardPoints NODES If refine 0 no inside points are added b G gapfixer a c hardPoints None refine 1 See Examples Generator gapfixer py See Examples Generator gapfixerPT py G gapsmanager fill multiple gaps in a set of surface components A Also eliminate overlap regions between components if any Normals for all patches must be pointed outwards Set mode 0 for nodal mesh 1 for center mesh
7. addPointInDistribution pyTree import Generator PyTree as G import Converter PyTree as C Distribution Ni 50 Nj 50 a G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni Nj 2 b G addPointInDistribution a Ni t C newPyTree Base 2 t 2 1 2 append b C convertPyTree2File t out cgns Example file Examples Generator naca py naca array import Converter as C import Generator as G import Geom as D import Transform as T Put a naca profile in msh msh D naca 12 5001 11 D getLength msh Put a line in msh2 msh2 D line 1 0 0 20 0 0 5001 12 D getLength msh2 Join the two meshes msh T join msh msh2 Add another line msh2 D line 20 0 0 1 0 0 5001 13 D getLength msh2 msh T join msh2 msh C convertArrays2File msh naca plt distribution Ni 200 Nj 100 distrib G cart 0 0 0 1 Ni 1 20 N3 1 1 Ni N3 1 distrib G enforcePlusY distrib 2 e 3 50 30 distrib G enforceMoinsY distrib 2 80 60 distrib G enforcePlusX distrib 1 e 4 30 50 distrib G enforceMoinsX distrib 0 1 80 30 distrib G enforceX distrib 11 0 5 0 5 11 12 1 25e 3 30 20 distrib G enforcePoint distrib 11 0 5 0 5 11 12 distrib2 T symetrize distrib 0 0 0 0 1 0 0 0 1 distrib2 T reorder distrib2 1 2 3 distrib T join distrib2 distrib distrib T contract distrib 0 0 0 0 1 0
8. 50 50 10 a a G getOrthogonalityMap a t C newPyTree Base t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator getRegularityMap py getRegularityMap array import Generator as G import Converter as C a G cart A Dis D laty 150 0071 a G enforceX a 25 0 1 10 10 ac C node2Center a reg G getRegularityMap a reg C addVars ac reg C convertArrays2File reg out plt Example file Examples Generator getRegularityMapPT py getRegularityMapPT array import Generator PyTree as G import Converter PyTree as C a cart 0 0 0 1 1 1 50 50 1 a enforceX a 25 0 1 10 10 a G getRegularityMap a t Cy I aa a C newPyTree Base t 2 1 2 append a convertPyTree2File t out cgns Example file Examples Generator getTriQualityMap py 37 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB getTriQualitylityMap array import Generator as G import Converter as C import Geom as D a sphere 0 0 0 1 N 10 a convertArray2Tetra a a G close a n G getTriQualityMap a n Il Qa D C center2Node n n C addVars a n CconvertArrays2File n out plt Example file Examples Generator getTriQualityMapPT py getTriQualitylityMap PyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D sphere 0 0 0 1 N 10 c
9. Example file Examples Generator enforceMoinsX py enforceMoinsX array import Generator as G import Converter as C Ni 50 Nj 50 a G cart 0 0 0 1 Ni 1 0 5 N9 1 1 N1 NM3 1 b G enforceMoinsX a 1 e 3 10 15 C convertArrays2File b out plt Example file Examples Generator enforceMoinsXPT py enforceMoinsX pyTree import Converter PyTree as C import Generator PyTree as G Ni 50 Nj 50 Nk 1 G cart 0 0 0 1 M1 1 0 5 N3 1 1 Ni NJ Nk G enforceMoinsX a 1 e 3 10 15 C newPyTree Base 2 t 2 1 2 append b convertPyTree2File t out cgns atop Il 40 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB Example file Examples Generator enforcePlusX py enforcePlusX array import Generator as G import Converter as C Distribution Ni 50 Nj 50 a G cart 0 0 0 1 NMi 1 0 5 N3 1 1 N1 N3 1 b G enforcePlusX a 1 e 3 10 20 C convertArrays2File b out plt Example file Examples Generator enforcePlusXPT py enforcePlusX pyTree import Converter PyTree as C import Generator PyTree as G Distribution Ni 50 Nj 50 G cart 0 0 0 1 Ni 1 0 5 N3 1 1 N1 N3 1 G enforcePlusX a 1 e 3 10 20 C newPyTree Base 2 t 2 1 2 append b convertPyTree2File t out cgns CO er D o Il Example file Examples Generator enforceLine py enforceLine array impo
10. G mapSplit a dist 0 25 C convertArrays2File a out plt Example file Examples Generator mapSplitPT py mapSplit pyTree import Generator PyTree as G import Transform PyTree as T import Converter PyTree as C import Geom PyTree as D polyline a D polyline 0 0 0 1 0 0 1 1 0 2 3 0 1 5 3 0 1 1 5 0 0 0 0 distribution Ni 41 dist G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 dist G enforceX dist 15 5 Ni 1 0 005 2 5 dist G enforceX dist 27 5 Ni 1 0 005 2 5 zones G mapSplit a dist 0 25 t C newPyTree Base 1 t 2 1 2 zones C convertPyTree2File t out cgns Example file Examples Generator refine py refine array import Generator as G import Converter as C Di I G cart 0 0 0 0 1 0 1 0 1 20 20 1 a G refine a 1 5 1 C convertArrays2File a out plt Example file Examples Generator refinePT py refine pyTree import Generator PyTree as G import Converter PyTree as C a G cart 0 0 0 0 1 0 1 0 1 20 20 1 a G refine a 1 5 1 t C newPyTree Base t 2 1 2 appena a C convertPyTree2File t out cgns Example file Examples Generator mapCurvature py mapCurvature array import Generator as G import Converter as C import Geom as D ni 2 nj 3 a G cart 0 0 0 1 1 1 ni nj 1 C setValue a 1 1 1 1 1 2 C setValue a 1
11. import Transform as T 17 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB Read geometry C convertFil T homothety T reorder a D D D ll h 0 2 hp 0 m GP polyClMes for i in m 0 v G getVol min C getM if min lt 0 print n C convertArrays2 from svg file e2Arrays Data curve svg density 1 0 a 0 0 0 0 01 Ch 2 233 001 density 10 splitCrit 2 her a h hp density splitCrit umeMap i inValue v vol e egative volume detected File m 0 out plt Example file Examples Generator polyC1MesherPT py polyClMesher import Converter import Generator import Transform tb C convertFi pyTree PyTree as C PyTree as G PyTree as T le2PyTree curvel svg nptsCurve 100 nptsLine 400 z T homothety tb 2 1 2 0 0 0 0 0 01 z T reorder z 1 2 3 h 0 1 hf 0 001 density 100 splitCrit 10 res G polyClMesher z h hf density splitCrit zones res 0 h res 1 density res 2 t C newPyTree Base t 2 1 2 zones C convertPyTree2File t out cgns Example file Examples Generator pointedHat py pointedHat array import Geom as D import Generator as G import Converter as C ec D circle 0 0 0 l 360 0 100 surf G pointedHat c 0 0 1 C convertArrays2File surf out plt Example file Examples Generator pointedHatPT py poi
12. 1 M 1 1 N 1 L Ni N31 J enforceX d 0 5 0 01 10 20 enforceY d 0 5 0 01 10 20 G map b d CconvertArrays2File b out2 plt ni n3 1 21 A setValue setValue a a a 7 a GA b i GA b i 7 N NNEF ti NONNO st Do OO OO CO D ES pe Il aaqn CO DOG OO ll Map in a direction a G cylinder 0 0 0 0 5 2 0 60 1 20 20 1 Ni 10 d G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 d G enforcePlusX d 0 01 10 20 a G map a d 2 C convertArrays2File a out3 plt Example file Examples Generator mapPT py map pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C l D line 0 0 0 1 1 0 Ni 11 dist G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 1 G map 1 dist E C newPyTree Base 1 t 2 1 1 2 append 1 C convertPyTree2File t out cgns Example file Examples Generator mapSplit py mapSplit array import Generator as G import Transform as T import Converter as C import Geom as D polyline a D polyline 0 0 0 1 0 0 1 1 0 2 3 0 1 5 3 0 1 1 5 0 0 0 0 distribution Ni 41 dist G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 dist G enforceX dist 15 5 Ni 1 0 005 2 5 23 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB dist G enforceX dist 27 5 Ni 1 0 005 2 5 a
13. C convertArrays2File a out plt Example file Examples Generator closePT py close pyTree import Converter PyTree as C import Generator PyTree as G al G cart 0 0 0 1 1 1 10 10 1 a2 G cart 9 1 e 2 0 0 1 1 1 10 10 1 a3 G cart 0 5 01 0 1 1 1 19 6 1 a4 G cart 0 9 0001 0 1 1 1 10 6 1 a5 G cart 9 01 9 0002 0 1 1 1 10 6 1 t C newPyTree Base 2 t 2 1 2 al a2 a3 a4 a5 t G close t 1 e 1 C convertPyTree2File t out cgns Example file Examples Generator selectInsideElts py selectInsideElts array import Converter as C import Generator as G import Geom as D a G cart 0 0 0 1 1 1 10 10 1 a C convertArray2Tetra a b D circle 5 5 0 3 b C convertArray2Tetra b a G selectInsideElts a b C convertArrays2File a b out plt Example file Examples Generator map py 22 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB map array import Geom as D import Generator as G import Converter as C Map on a curve l D line 0 0 0 1 1 0 Ni 10 d G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 m G map l d C convertArrays2File m outl plt Map on a structured surface ni 2 nj 3 G cart 0 0 0 1 1 1 SsetValue a 1 1 1 1 setValue 1 2 1 Lariz 21 1 setValue 2 2 1 setValue a 2 3 1 D bezier a 10 10 50 Nj 30 rt 0 0 0
14. D D circle 0 0 0 1 10 G densify a 0 01 C newPyTree Base 1 t 2 1 2 append b convertPyTree2File t out cgns i t C Example file Examples Generator grow py grow array import Converter as C import Generator as G import Geom as D sphere 0 0 0 1 50 getNormalMap a center2Node n n 1 n 1 100 G grow a n Il CO oO D a n n b C convertArrays2File b out plt Example file Examples Generator growPT py grow pyTree import Converter PyTree as C import Generator PyTree as G import Geom PyTree as D a D sphere 0 0 0 1 50 G getNormalMap a Di Il 25 ELSA MU 09022 V 2 0 O N E R A THE FRENCH AEROSPACE LAB a C center2Node a C __FlowSolutionCenters__ a C rmVars a C __FlowSolutionCenters__ b G grow a sx sy sz t C newPyTree Basel 2 Base2 3 t 2 1 2 appenad a t 2 2 2 append b C convertPyTree2File t out cgns Example file Examples Generator stack py stack array import Generator as G Q import Converter as import Transform as T a G cylinder 0 0 0 1 1 3 360 0 1 50 10 1 b T rotate a 0 0 0 1 0 0 5 b T translate b 0 0 0 5 c G stack a b C convertArrays2File c out plt Example file Examples Generator stackPT py stack pyTree import Generator PyTree as G import Converter PyTree as C import Tra
15. E R A THE FRENCH AEROSPACE LAB See Examples Generator enforcePlusX py See Examples Generator enforcePlusXPT py G enforceLine enforce a curvilinear line defined by the array line in a distribution defined by y O D S pee lt b G enforceLine a line enforcedh supp add See Examples Generator enforceLine py See Examples Generator enforceLinePT py G enforcePoint enforce a point in the distribution The index of enforced point is returned ind G enforcePoint a x0 See Examples Generator enforcePoint py See Examples Generator enforcePointPT py G enforceCurvature enforce the curvature of an i curve in a distribution defined by a Power reflects the power of stretching b G enforceCurvature a curve power 0 5 See Examples Generator enforceCurvature py See Examples Generator enforceCurvaturePT py G addPointInDistribution add a point in a distribution at index ind b G addPointInDistribution a ind See Examples Generator addPointInDistribution py See Examples Generator addPointInDistributionPT 1 9 More general examples of use e See Examples Generator naca py 1 10 Example files Example file Examples Generator cart py cart array import Converter as C import Generator as G G cart 0 0 0 0 1 0 1 0 2 10 10 10 C convertArrays2File a out plt Di Example file Examples Generator cartPT py cart pyTree import Converter PyTree as
16. FRENCH AEROSPACE LAB import Generator as G import Converter as C import Geom as D import Connector as X import Transform as T s D circle 0 0 0 1 N 100 T addkplane s n I Grille cartesienne reguliere BB G bbox s ni 100 nj 100 nk 3 xmin BB 0 ymin BB 1 zmin BB 2 0 5 xmax BB 3 ymax BB 4 zmax BB 5 0 5 hi xmax xmin ni 1 hj ymax ymin nj 1 h min hi hj ni int xmax xmin h 7 nj int ymax ymin h 7 b G cart xmin 3xh ymin 3xh zmin h h 1 ni nj nk celln C array cellN ni nj nk celln C initVars celln cellN 1 Masquage cellno X blankCells b celln s blankingType 0 delta 0 dim 2 a C initVars s cellN 1 b C addVars b cellno 0 Adapte le front de la grille a la surface b T subzone b 1 1 2 b 21 b 3 2 b G snapFront b s C convertArrays2File a b out plt Example file Examples Generator snapFrontPT py snapFront pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D import Connector PyTree as X import Transform PyTree as T import Converter Internal as Internal s D circle 0 0 0 1 N 100 s2 T addkplane s Grille cartesienne reguliere BB G bbox s ni 100 nj 100 nk 3 xmin BB 0 ymin BB 1 zmin BB 2 0 5 xmax BB 3 ymax BB 4 zmax BB 5 0 5 hi xmax xmin ni 1 h
17. Nn O o m gt S yo O Go Q O 5 O jab o a ei O Si Q Gs 5 le E 3 Q Q Ga a D D Yo te os Loi O o mi gt o 3 yo O n Ki Q O O pee O bei oa O ei O a E O z Q Ch O Ga Es Ss Wei Y ES Yo Lei Nee G getInCircleMap return the map of inscribed circle radius of any cell of a TRI array b G getInCircleMap a or B G getInCircleMap A See Examples Generator getInCircleMap py See Examples Generator getInCircleMapPT py G getEdgeRatio return the ratio between the longest and the smallest edges of a cell r G getEdgeRatio a or B G getEdgeRatio A See Examples Generator getEdgeRatio py See Examples Generator getEdgeRatioPT py 1 8 Operations on distributions Distributions are Cartesian meshes that can be used to be mapped on profiles to make curvilinear meshes for instance Distributions in 2D x y distribution represent the length and height of each cell Distributions in 3D x y z represents the lengths in the three topological directions of each cell Distributions can be modified by the enforce functions The three following functions are also available in Y and Z directions replace suffix X by Y or Z in enforceX enforcePlusX or enforceMoinsX functions G enforceX enforce a region around a line x x0 The size of the cell around the line is en forcedh supp points are suppressed from the starting dist
18. TRI mesh is built from imin jmin diag boundaries Each boundary is a structured array with the same dimension PENTA mesh is built from Tmin Tmax triangles boundary and imin imax diag boundaries Tmin Tmax must be structured triangles of dimension nxn imin jmin diag must be structured n p arrays 2D struct a G TFI imin imax jmin jmax 3D struct a G TFI imin imax jmin jmax kmin kmax TRI a G TFI imin jmin diag PENTA a G TFI Tmin Tmax imin imax diag See Examples Generator TFI py See Examples Generator TFIPT py G hyper2D generate an hyperbolic mesh 2D of C or O type from a from a line defined by line a and from a distribution defined by distrib The resulting mesh is nearly orthogonal b G hyper2D line distrib CC See Examples Generator hyper2d py See Examples Generator hyper2dPT py G PolyLine polyLineMesher generate a 2D mesh around a 2D polyline B G PolyLine polyLineMesher a h hf density where a is the input polyline BAR array h is the height of the mesh hf is the height of the first cell and density is the number of points per unity of length In the array version it returns a list where B 0 is the list of generated meshes B 1 is the list of wall boundaries B 2 is the list of overlap boundaries B 3 is h B 4 is density eventually modified by the mesher In the pyTree version it returns a list zones hs densities where zones
19. and 2 otherwise Set coplanar 1 if all components are lying on B G gapsmanager A mode 0 coplanar 0 Ss 4 A Dal ol Il tri 20 es Bios 3 Z e Gill CH Lei Tas Q CH 5 CH le E gt O a E ga Lei z S 5 gq CH e PO lt Loi CH o tr Ka SI 9 O Nn Q CH 5 O be E O a KS yo Lei z S 5 09 O 4 ae E ge lt G booleanUnion perform a boolean union of two TRI surfaces b G booleanUnion al a2 See Examples Generator booleanUnion py See Examples Generator booleanUnionPT py G booleanMinus perform a boolean difference of two TRI surfaces b G booleanMinus al a2 Lei O o ies gt S yo ER CH Lei Q O i O Gei 9 S e O o O Zz i E Lei Yo Lei ons N O o mi gt D 3 yo ER O Lei Q O i O 2 z E O O 2 O Zz i Lei Y go Lei G booleanIntersection perform a boolean intersection of two TRI surfaces b G booleanIntersection al a2 See Examples Generator booleanIntersection py See Examples Generator booleanIntersectionPT py G intersection return the BAR contour defining the intersection between two TRI surfaces b G intersection al a2 See Examples Generator intersection py See Examples Generator intersectionPT py 1 7 Information on generated meshes G check check regularity orthogonality for a mesh defined by an arra
20. nj nk intersect G bboxIntersection al a2 print intersect Example file Examples Generator bboxIntersectionPT py bboxIntersection pyTree import Generator PyTree as G ni 11 nj 3 nk 11 al G cart 0 0 0 0 1 0 1 0 2 ni nj nk a2 G cart 0 5 0 05 0 01 0 1 0 1 0 2 ni nj nk intersect G bboxIntersection al a2 print intersect Example file Examples Generator checkPointInCEBB py checkPointInCEBB array import Generator as G import Transform as T import Converter as C Ni 20 Nj 20 al G cart 0 0 0 1 Ni 0 5 Nj 1 Ni NJ 2 a2 G cart 0 1 0 0 0 5 Ni 0 5 N3 1 Ni Nj 2 a2 T rotate a2 0 1 0 0 0 0 1 0 22 Check if point is in CEBB of mesh2 val G checkPointInCEBB a2 0 04839 0 03873 0 5 print val Example file Examples Generator checkPointInCEBBPT py checkPointInCEBB pyTree import Generator PyTree as G import Transform PyTree as T import Converter PyTree as C Ni 20 Nj 20 a2 G cart 0 1 0 0 0 5 Ni 0 5 N3 1 Ni Nj 2 a2 T rotate a2 0 1 0 0 0 0 1 0 22 Check if point is in CEBB of a2 val G checkPointInCEBB a2 0 04839 0 03873 0 5 print val Example file Examples Generator get VolumeMap py getVolumeMap array import Generator as G import Converter as C a G cart 0 0 0 0 1 0 1 0 2 10 10 3 vol G getVolumeMap a vol C center2Node vol vol C addVars a vol C c
21. py 20 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB octree pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D s D circle 0 0 0 1 N 100 snear 0 1 res G octree s snear dfar 5 t C newPyTree QUADTREE 2 t 2 1 2 append res C convertPyTree2File t out cgns Example file Examples Generator octree2Struct py octree2Struct array import Generator as G import Converter as C import Geom as D s D circle 0 0 0 1 N 100 snear 0 1 res G octree s snear dfar 5 balancing 1 res G octree2Struct res vmin 5 ext 2 optimized 1 C convertArrays2File s res out plt Example file Examples Generator octree2StructPT py octree2Struct pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D s D circle 0 0 0 1 N 100 snear 0 1 res G octree s snear dfar 5 balancing 1 res G octree2Struct res vmin 5 ext 2 merged 1 t C newPyTree CARTESIAN t 2 1 2 res C convertPyTree2File t out cgns Example file Examples Generator adaptOctree py adaptOctree array import Generator as G import Converter as C import Geom as D s D circle 0 0 0 1 N 100 snear 0 1 o G octree s snear dfar 5 balancing 1 indic C node2Center o indic C initVars indic indicator 1 res G adaptOctree o indic C
22. vifs s D polyline 0 02 0 0 17170 2 1 0 0 02 0 0 1 Grille cartesienne reguliere h 0 1 ni 30 nj 20 nk 1 b G cart 0 5 0 5 0 h h 1 ni nj nk b G snapSharpEdges b s h t C newPyTree Cart Surface t 2 1 2 appena b t 2 2 2 append s C convertPyTree2File t out cgns Example file Examples Generator fittingPlaster py fittingPlaster array import Generator as G import Converter as C 29 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB import Geom as D circle 0 0 0 1 N 50 convertArray2Tetra a Il Qa D close a a a a b G fittingPlaster a bumpFactor 0 5 C convertArrays2File a b out plt Example file Examples Generator fittingPlasterPT py fittingPlaster pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D circle 0 0 0 1 N 50 convertArray2Tetra a Close a Il Qaaav C newPyTree Base 2 t 2 1 2 append bi a a a b G fittingPlaster a bumpFactor 0 5 t C convertPyTree2File t out cgns Example file Examples Generator gapfixer py gapfixer array import Generator as G import Converter as C import Geom as D import numpy as np Fix the gap inside a circle drawn on a plane a D circle 0 0 0 1 N 100 a C convertArray2Tetra a a G close a b G cart 2 2 0 0
23. 0 2 20 L 30 cyl G cylinder3 xz 0 90 teta C convertArrays2File cyl out plt Example file Examples Generator cylinder3PT py cylinder3 pyTree import Converter PyTree as C import Generator PyTree as G teta G cart 0 0 0 O21 1 1 11 1 1 xz G cart 0 1 0 0 0 1 1 0 2 20 1 30 cyl G cylinder3 xz 0 90 teta t C newPyTree Base t 2 1 2 append cyl C convertPyTree2File t out cgns Example file Examples Generator delaunay py delaunay array import Generator as G import Converter as C ni 11 nj 11 nk 1 hi 1 ni 1 hj 1 n3 1 hk 1 a G cart 0 0 0 hi hj hk ni nj nk b G delaunay a C convertArrays2File a b out plt Example file Examples Generator delaunayPT py delaunay pyTree import Converter PyTree as C import Generator PyTree as G ni 11 nj 11 nk 1 hi 1 ni 1 hj 1 nj 1 hk 1 a G cart 0 0 0 hi hj hk ni nj nk b G delaunay a b 0 delaunay t C newPyTree Base 2 t 2 1 2 a b C convertPyTree2File t out cgns Example file Examples Generator constrainedDelaunay py constrainedDelaunay array import Converter as C import Generator as G import Transform as T import Geom as D A D text1D STEPHANIE A C convertArray2Tetra A a T join A Triangulation respecting given contour tri G
24. 1 0 1 1 50 50 1 al G gapfixer a b C convertArrays2File al out plt Fill the gap in the circle using one defined point hp D point 0 5 0 5 0 a2 G gapfixer a b hp refine 0 C convertArrays2File a2 outHP plt Example file Examples Generator gapfixerPT py gapfixer pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D Fix the gap inside a circle drawn on a plane D circle 0 0 0 1 N 100 convertArray2Tetra a a G close a G cart 2 2 0 0 1 0 1 1 50 50 1 1 G gapfixer a b t C newPyTree Base 2 t 2 1 2 append al C convertPyTree2File t out cgns D oO M D Il a Fill the gap in the circle using one defined point hp D point 0 5 0 5 0 a2 G gapfixer a b hp refine 0 C convertPyTree2File a2 outHP cgns Example file Examples Generator gapsmanager py 30 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB gapsmanager array import Geom as D import Converter as C import Generator as G sphere6 0 0 0 1 N 10 node2Center a Il qo E a a a convertArray2Tetra a b G gapsmanager a mode 2 C convertArrays2File b out plt Example file Examples Generator gapsmanagerPT py gapsmanager pyTree import Geom PyTree as D import Converter PyTree as C import Generator PyTree as G sphere6 0 0 0 1 N 10 node2Center a
25. 2 1 2 append a E Cx I E E E G getCircumCircleMap t convertPyTree2File t out cgns Example file Examples Generator getInCircleMap py getInCircleMap array import Geom as D import Generator as G import Converter as C sphere 0 0 0 1 50 convertArray2Tetra a Il oO CO D getInCircleMap a C center2Node n n C addVars a n CconvertArrays2File n out plt a a n n C Example file Examples Generator getInCircleMapPT py getInCircleMap pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C sphere 0 0 0 1 50 convertArray2Tetra a newPyTree Base 2 t 2 1 2 append a G getInCircleMap t convertPyTree2File t out cgns Il a ao t E E Example file Examples Generator getEdgeRatio py getEdgeRatio array import Generator as G import Converter as C a G cart 0 0 0 0 1 0 1 0 1 11 11 11 a G enforcePlusX a le 6 5 50 r G getEdgeRatio a r C center2Node r r C addVars a r C convertArrays2File r out plt Example file Examples Generator getEdgeRatioPT py getEdgeRatio pyTree import Generator PyTree as G import Converter PyTree as C a G dart 0 0 0 7 0 1 0 L 0 1 11 11 11 a G enforcePlusX a le 6 5 50 a G getEdgeRatio a C convertPyTree2File a out cgns Example file Examples Generator enforceX py
26. 2 1 1 2 4 C setValue a 1 3 1 1 3 2 C setValue a 2 1 1 2 1 2 C setValue a 2 2 1 2 2 5 C setValue a 2 3 1 2 3 2 b D bezier a density 10 b G mapCurvature b N 100 power 0 5 dir 1 C convertArrays2File b out plt Example file Examples Generator mapCurvaturePT py 24 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB mapCurvature pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D ni 2 nj 3 a G cart 0 0 0 1 1 1 ni nj 1 C setValue a GridCoordinates 1 1 1 1 1 2 C setValue a GridCoordinates 1 2 1 1 2 5 C setValue a GridCoordinates 1 3 1 1 3 2 C setValue a GridCoordinates 2 1 1 2 1 2 C setValue a GridCoordinates 2 2 1 2 2 5 C setValue a GridCoordinates 2 3 1 2 3 2 b D bezier a density 10 b G mapCurvature b N 100 power 0 5 dir 1 t C newPyTree Base t 2 1 2 append b C convertPyTree2File t out cgns Example file Examples Generator densify py densify array import Generator as G import Converter as C import Geom as D a D circle 0 0 0 1 10 b G densify a 0 01 C convertArrays2File b out plt Example file Examples Generator densifyPT py densify pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as
27. C import Generator PyTree as G Di G GarEL Et 2 Ae 10100 1 00 2 10 11 12 C newPyTree Base t 2 11 2 append a CconvertPyTree2File t out cgns iol QA t Example file Examples Generator cartHexa py cartHexa array import Generator as G import Converter as C Di G cartHexa 0 0 0 0 1 0 1 0 2 10 10 10 C convertArrays2File a out plt Example file Examples Generator cartHexaPT py 10 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB cartHexa pyTree import Generator PyTree as G import Converter PyTree as C E C newPyTree Base a G cartHexa 0 0 0 0 1 0 1 0 2 10 10 1 t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator cartTetra py cartTetra array import Generator as G import Converter as C a G cartTetra 0 0 0 0 1 0 1 0 2 10 10 1 C convertArrays2File a out plt Example file Examples Generator cartTetraPT py cartTetra pyTree import Generator PyTree as G import Converter PyTree as C t C newPyTree Base 2 a G cartTetra 0 0 0 0 1 0 1 0 2 10 10 1 t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator cartPenta py cartPenta array import Generator as G import Converter as C a G cartPenta 0 0 0 0 1 0 1 0 2 10 10 10 C convertArrays2File a out
28. CconvertArray2Tetra a I oO OO D C newPyTree Base t 2 1 2 b a a a b G gapsmanager a mode 2 E C convertPyTree2File t out cgns Example file Examples Generator booleanUnion py boolean union array import Generator as G import Converter as C import Geom as D sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close s1 s2 C convertArray2Tetra s2 s2 G close s2 x G booleanUnion sl s2 tolerance 0 C convertArrays2File x out plt Example file Examples Generator booleanUnionPT py boolean union pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close sl s2 C convertArray2Tetra s2 s2 G close s2 x G booleanUnion sl s2 tolerance 0 t C newPyTree Base 2 t 2 1 2 append x C convertPyTree2File t out cgns Example file Examples Generator booleanMinus py boolean difference array import Generator as G import Converter as C import Geom as D 31 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close sl G close s2 s2 C convertArray2Tetra s2 s2 x G booleanMinus sl s2 tolerance 0
29. F1 11 12 13 C convertArrays2File tri tfitri plt Example file Examples Generator TFIPT py TFI pyTree import Converter PyTree as C import Generator PyTree as G import Geom PyTree as D import numpy as N Geometry PO 0 0 0 P1 5 0 0 P2 0 7 0 P3 5 7 0 d1 D line P0 P1 d2 D line P2 P3 d3 D line P0 P2 d4 D line P1 P3 Regular discretisation of each line Ni 20 Nj 10 Y G cart 0 0 0 1 Ni 1 1 1 p N1 1 1 q G cart 0 0 0 1 N3 1 1 1 Nj 1 1 rl G map dl r r2 G map d2 r r3 G map d3 q r4 G map d4 q m GJTFI e1 12 23 14 t C newPyTree Base 2 t 2 1 2 append m C convertPyTree2File t out cgns Example file Examples Generator hyper2d py hyper2D array import Geom as D import Generator as G import Converter as C msh D naca 12 5001 Distribution Ni 300 Nj 50 distrib G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni Nj 1 a G hyper2D msh distrib C C convertArrays2File a out plt Example file Examples Generator hyper2dPT py hyper2D pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C 16 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB line D naca 12 5001 Distribution Ni 300 Nj 50 distrib G cart 0 0 0 1 Ni 1 0 5 1N3 1 1 Ni NM3 1 a G hyper2D line distrib C t C newPyTree Ba
30. Generator 2 0 User Guide C Benoit G Jeanfaivre S Peron P Raud S Landier B Rodriguez S Verley Onera DSNA 1 Generator Mesh generation module 1 1 Preamble This module is used to generate meshes from geometries A mesh is stored in a Converter array or in a zone node of a pyTree When using the array interface import the Generator module import Generator as G Then a is an array and A is a list of arrays When using the pyTree interface import the module import Generator PyTree as G Then a is a zone node and A is a list of zone nodes or a pyTree 1 2 Basic grid generation G cart create a structured Cartesian mesh with ni x nj x nk points starting from point xo yo zo and of step hi hj hk a G cart xo yo zo hi hj hk ni nj nk See Examples Generator cart py See Examples Generator cartPT py G cartHexa create an unstructured hexahedral mesh defined from a Cartesian grid of ni x nj x nk points starting from point xo yo zo and of step hi hj hk Type of elements are QUAD for 2D arrays and HES A for 3D arrays See Examples Generator cartHexa py See Examples Generator cartHexaPT py G cartTetra create an unstructured tetrahedral mesh defined from a Cartesian grid of ni x nj x nk points starting from point xo yo zo and of step hi hj hk Type of elements are TRP for 2D arrays and TETRA for 3D arrays a G cartTetra xo yo zo hi hj hk ni nj nk See Examples G
31. Geom as D import Generator as G Q import Converter as import Transform as T Naca profile with lines a D naca 12 501 EL D getLength a a2 D line 1 0 0 2 0 0 500 12 D getLength a2 join a a2 line 2 0 0 1 0 0 500 T join c bi K a oO nil I OH Distribution on the profile l 114 2 12 Ni 100 Nj 100 pl 12 1 p2 12 11 1 h p2 p1 Ni 1 distrib G cart p1 0 0 hz 0 25 N3 1 Ni Nj 1 distrib G enforceCurvature distrib res 0 6 C convertArrays2File distrib out plt Example file Examples Generator enforceCurvaturePT py enforceCurvature pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C a D naca 12 501 Distribution on the profile Ni 20 Nj 20 Nk 1 h 1 Ni 1 b G cart 0 0 0 h 0 25 N3 1 Ni Nj Nk b G enforceCurvature b a 0 6 t C newPyTree Base 2 t 2 1 2 append b C convertPyTree2File t out cgns Example file Examples Generator addPointInDistribution py addPointInDistribution array import Generator as G import Converter as C Distribution Ni 50 Nj 50 a G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni Nj 1 b G addPointInDistribution a Ni C convertArrays2File b out plt Example file Examples Generator addPointInDistributionPT py 42 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB
32. array The orthogonality map corresponds to the maximum deviation of all dihedral angles of an element The orthogonality map is expressed in degree and located at centers See Examples Generator getOrthogonalityMap py See Examples Generator getOrthogonalityMapPT py G getRegularityMap return the regularity map of an array The regularity map corresponds to the maximum deviation of the volume ratio of an element and all its neigbouring cells The regularity map is located at centers b G getRegularityMap a or B G getRegularityMap A See Examples Generator getRegularityMap py See Examples Generator getRegularityMapPT py G getTriQualityMap return the quality map of a TRI array The triangle quality is a value be 8 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB tween 0 degenerated triangle and 1 equilateral triangle The quality map is located at centers b G getTriQualityMap a or B G getTriQualityMap A See Examples Generator getTriQualityMap py See Examples Generator getTriQualityMapPT py G getCellPlanarity return a measure of cell planarity for each cell It is located at centers of cells b G getCellPlanarity a or B G getCellPlanarity A See Examples Generator getCellPlanarity py See Examples Generator getCellPlanarityPT py G getCircumCircleMap return the map of circum circle radius of any cell of a TRI array b G getCircumCircleMap a or B G getCircumCircleMap A
33. constrained Delaunay triangulation of the convex hull of a contour c Contour must be a BAR array and must be in the plane x y Tol is a geometric toler ance Points nearer than tol are merged If keepBB is set to 1 the bounding box is kept in the final triangulation ELSA MU 09022 V2 0 O N E R rN THE FRENCH AEROSPACE LAB b G constrainedDelaunay c tol 1 e 10 keepBB 0 See Examples Generator constrainedDelaunay py See Examples Generator constrainedDelaunayPT py G checkDelaunay check if the Delaunay triangulation defined in tri is inside the contour c c2 G checkDelaunay c tri See Examples Generator checkDelaunay py See Examples Generator checkDelaunayPT py G T3mesher2D create a 2D Delaunay mesh given a BAR defined in a If triangulateOnly 1 then only points of a are triangulated if triangulateOnly 0 then interior points are inserted b G T3mesher2D a triangulateOnly 0 See Examples Generator T3mesher2D py See Examples Generator T3mesher2DPT py G TFI generate a mesh by transfinite interpolation TFI Generated mesh can be 2D or 3D structured or unstructured TRI or PENTA mesh Warning the boundaries can be in a different order from the examples below except for the PENTA TFI meshes 2D structured mesh is built from imin imax jmin jmax boundaries 3D structured mesh is built from imin imax jmin jmax kmin kmax boundaries Dimensions must be equal for each pair imin imax jmin jmax
34. constrainedDelaunay a C convertArrays2File a tril out plt Example file Examples Generator constrainedDelaunayPT py constrainedDelaunay pyTree import Converter PyTree as C import Generator PyTree as G import Geom PyTree as D import Transform PyTree as T A D text1D STEPHANIE 13 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB A C convertArray2Tetra A a T join A Triangulation respecting given contour tri G constrainedDelaunay a t C newPyTree Base 2 t 2 1 2 append tri C convertPyTree2File t out cgns Example file Examples Generator checkDelaunay py checkDelaunay array import Converter as C import Generator as G import Transform as T import Geom as D A D text1D STEPHANIE A C convertArray2Tetra A a T join A Triangulation respecting given contour tri G constrainedDelaunay a res G checkDelaunay a tri C convertArrays2File res out plt Example file Examples Generator checkDelaunayPT py checkDelaunay pyTree import Converter PyTree as C import Generator PyTree as G import Geom PyTree as D import Transform PyTree as T A D text1D STEPHANIE A C convertArray2Tetra A a T join A Triangulation respecting given contour tri G constrainedDelaunay a res G checkDelaunay a tri t C newPyTree Base t 2 1 2 res C convertPyTree2File t out cgns Exam
35. convertArrays2File o res out plt Example file Examples Generator adaptOctreePT py adaptOctree pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D s D circle 0 0 0 1 N 100 snear 0 1 o G octree s snear dfar 5 balancing 1 o C initVars o centers indicator 1 res G adaptOctree o t C newPyTree OCTREE 2 t 2 1 2 res C convertPyTree2File t out cgns Example file Examples Generator expandLayer py 21 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB expandLayer array import Generator as G import Converter as C import Geom as D s D circle 0 0 0 1 N 100 o G octree s 0 1 dfar 1 balancing 1 o2 G expandLayer o level 0 C convertArrays2File o 02 out plt Example file Examples Generator expandLayerPT py expandLayer pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D D circle 0 0 0 1 N 100 G octree s 0 1 dfar 1 balancing 1 o o2 G expandlayer o level 0 t C newPyTree Base 2 t 2 1 2 append 02 C convertPyTree2File t out cgns Example file Examples Generator close py close array import Converter as C m import Generator as import Transform as T a G cylinder 0 0 0 0 5 1 360 0 01 10 20 20 10 a C convertArray2Tetra a a G close a 1 e 3
36. cts with a tolerance tol Return 0 if no intersection 1 otherwise intersect G bboxIntersection al a2 tol 1 e 6 See Examples Generator bboxIntersection py See Examples Generator bboxIntersectionPT py G checkPointInCEBB test if a given point is in the CEBB of a inside G checkPointInCEBB a x y z See Examples Generator checkPointInCEBB py See Examples Generator checkPointhhnCEBBPT py G get VolumeMap return the volume field of an array Volume is located at centers of cells b G getVolumeMap a or B G getVolumeMap A See Examples Generator get VolumeMap py See Examples Generator getVolumeMapPT py G getNormalMap return the surface normals field of a surface array It is located at centers of cells b G getNormalMap a or B G getNormalMap A Lei O o m x 5 yo O n Q O i O E ZE o Za 09 O eh Z S o 2 Ss D Yo lt Loi CH o m x o yo O n Q O i O E o a 09 O Sch Z O z o Z fee Wei Y 4 Yo lt G getSmoothNormalMap return the smoothed surface normals field of a surface array lo cated at nodes niter is the number of smoothing operations and eps is a smoothing weight b G getSmoothNormalMap a niter 2 eps 0 4 or B G getNormalMap A niter 2 eps 0 4 See Examples Generator getSmoothNormalMap py See Examples Generator getSmoothNormalMapPT G getOrthogonalityMap return the orthogonality map of an
37. edos Dady 45 5 convertArray2Hexa a b join c c T reorder c 1 rotate c 0 0 0 7 0 1 0 515 getSmoothNormalMap c niter 4 C addVars c s convertArrays2File c out plt T I Il OO HOH oO o a b b c c E s e E Example file Examples Generator getSmoothNormalMapPT py getSmoothNormalMap pyTree import Converter PyTree as C import Generator PyTree as G 36 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB import Transform PyTree as T import Geom PyTree as D getSmoothNormalMap c niter 4 C newPyTree Base 2 ts 2 1 2 c convertPyTree2File ts out cgns a G cart 0 0 0 Leortlorl 10 10 1 b 6 cart 0 0 0 leg lolo Els 10 10 b T rotatelb 10 0 0 0 1 0 45 c C convertArray2Hexa a b c T join c c T reorder c 1 o T rotate ce 0 0 0 0 1 0 1 158 C G ts en Example file Examples Generator getOrthogonalityMap py getOrthogonalityMap array import Generator as G import Converter as C a G cylinder 0D el e Gs3 Los 300 Der TVs 50750 107 ac C node2Center a ortho G getOrthogonalityMap a ortho C addVars ac ortho C convertArrays2File ortho out plt Example file Examples Generator getOrthogonalityMapPT py getOrthogonalityMap pyTree import Generator PyTree as G import Converter PyTree as C G cylinder 0 0 0 0 5 1 360 0 10
38. enerator cartTetra py See Examples Generator cartTetraPT py 1 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB G cartPenta create an unstructured prismatic mesh defined from a regular Cartesian mesh The initial Cartesian mesh is defined by ni x nj x nk points starting from point xo yo zo and of step hi hj hk Type of elements is PENTA a G cartPenta xo yo zo hi hj hk ni nj nk See Examples Generator cartPenta py See Examples Generator cartPentaPT py G cartPyra create an unstructured pyramidal mesh defined from a regular Cartesian mesh The initial Cartesian mesh is defined by ni x nj x nk points starting from point xo yo zo and of step hi hj hk Type of elements is PYRA a G cartPyra xo yo zo hi hj hk ni nj nk See Examples Generator cartPyra py See Examples Generator cartPyraPT py G cartNGon create a NGON mesh defined from a regular Cartesian mesh The initial Carte sian mesh is defined by ni x nj x nk points starting from point xo yo zo and of step hi hj hk Type of elements is NGON a G cartNGon xo yo zo hi hj hk ni nj nk See Examples Generator cartNGon py See Examples Generator cartNGonPT py G cylinder create a regular cylindrical grid or a portion of cylinder between tetas and tetae with ni x nj x nk points of center bottom point xo yo zo of inner radius R1 outer radius R2 and height H For a direct mesh use tetae tetas a G cylind
39. enerator intersection py intersection array import Generator as G import Converter as C import Geom as D 32 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close s1 s2 C convertArray2Tetra s2 s2 G close s2 x G intersection sl s2 tolerance 0 C convertArrays2File x out plt Example file Examples Generator intersectionPT py intersection pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D sl D sphere 0 0 0 1 N 20 s2 D sphere 0 1 0 1 N 30 sl C convertArray2Tetra sl sl G close sl s2 C convertArray2Tetra s2 s2 G close s2 x G intersection sl s2 tolerance 0 t C newPyTree Base 2 t 2 1 2 append x C convertPyTree2File t out cgns Example file Examples Generator check py check array import Generator as G a G cart 0 0 0 1 1 1 10 10 10 G check a Example file Examples Generator checkPT py check pyTree import Generator PyTree as G a G cart 0 0 0 1 1 1 10 10 10 G check a Example file Examples Generator barycenter py barycenter array import Generator as G import Converter as C a G cart 0 0 0 0s1 0 L L 20 20 20 print G barycenter a w C initVars a weight 1 w C extractVar
40. er xo yo zo R1 R2 tetas tetae H ni nj nk See Examples Generator cylinder py See Examples Generator cylinderPT py G cylinder2 create an irregular cylindrical grid or a portion of cylinder between tetas and tetae with ni x nj x nk points of center bottom point xo yo zo of inner radius R1 outer radius R2 height H and with distributions in r teta z Distributions are arrays defining 1D meshes x and i varying giving a distribution in 0 1 Their number of points gives ni nj nk a G cylinder2 xo yo zo R1 R2 tetas tetae H arrayR arrayTeta arrayZ See Examples Generator cylinder2 py See Examples Generator cylinder2PT py G cylinder3 create an irregular cylindrical grid or a portion of cylinder between tetas and tetae from a xz plane mesh defined by a and a teta distribution defined by arrayTeta b G cylinder3 a tetas tetae array Teta See Examples Generator cylinder3 py See Examples Generator cylinder3PT py 1 3 General purpose grid generators G delaunay create a 2D Delaunay type mesh from an array The array can be a 2D structured array or an unstructured array of type NODE TRI or QUAD Tol is a geometric tolerance Points nearer than tol are merged If keepBB is set to 1 the bounding box is kept in the final trian gulation b G delaunay a tol 1 e 10 keepBB 0 See Examples Generator delaunay py See Examples Generator delaunayPT py G constrainedDelaunay create a
41. is a list of zones of a CGNS python tree containing the blocks wall boundaries match and overlap boundaries hs is the list of heights modified if necessary and densities the list of densities also modified if necessary See Examples Generator polyLineMesher py See Examples Generator polyLineMesherPT py G PolyC1 polyC1Mesher generate a 2D mesh around a 2D polyCl1 curve where A is a list of i arrays each representing a C1 curve All i arrays put together must represent a polyC1 curve SplitCrit is a curvature radius triggering split Other arguments are similar to poly ELSA MU 09022 V2 0 O N E R STN THE FRENCH AEROSPACE LAB LineMesher The function return is also similar to polyLineMesher See Examples Generator polyC1Mesher py See Examples Generator polyC1 MesherPT py G pointedHat create a structured mesh from a curve defined by a 1 array and a point For the pyTree version if a contains a solution it is not taken into account in b See Examples Generator pointedHat py See Examples Generator pointedHatPT py G stitchedHat create a stitched mesh from a curve defined by a 1 array The surface is stitched in the middle Tol is the accuracy of the search tol2 is a merging tolerance and offx offy off z an optional offset For the pyTree version if a contains a solution it is not taken into account in b b G stitchedHat a offx offy offz tol 1 e 6 tol2 1 e 5 See Examples Generator stitchedHat py G su
42. j ymax ymin nj 1 h min hi hj ni int xmax xmin h 7 nj int ymax ymin h 7 b G cart xmin 3xh ymin 3xh zmin h h 1 ni nj nk t C newPyTree Cart t 2 1 2 append b Masquage t C initVars t cellN 1 import numpy BM numpy array 1 t X blankCells t s2 BM blankingType node_in dim 2 28 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB Adapte le front de la grille a la surface dim Internal getZoneDim b t T subzone t 1 1 2 dim 1 dim 2 2 t G snapFront t s2 t C addBase2PyTree t Surface cellDim 2 s2 C initVars s2 cellN 1 t 2 2 2 append s2 C convertPyTree2File t out cgns Example file Examples Generator snapSharpEdges py snapSharpEdges array import Generator as G import Converter as C import Geom as D import Connector as X import Transform as T polylignes avec angles vifs s D polyline 0 02 0 0 1170 2 1 07 0 02 0 0 1 Grille cartesienne reguliere h 0 1 ni 30 nj 20 nk 1 D eet 0 5 0 5 0 hy Ms 1 1 3 1nk 3 b G snapSharpEdges b s h C convertArrays2File b s out plt Example file Examples Generator snapSharpEdgesPT py snapSharpEdges pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D import Connector PyTree as X import Transform PyTree as T polylignes avec angles
43. lect elements of a TRI array whose centers are inside the given list of curves defined by BAR arrays b G selectInsideElts a curves ELSA MU 09022 V2 0 O N E R STN THE FRENCH AEROSPACE LAB See Examples Generator selectInsideElts py G map map a distribution on a curve or on a structured surface b G map a distrib Map a i array distribution in a direction dir 1 2 3 in a surface or volume mesh b G map a distrib dir See Examples Generator map py See Examples Generator mapPT py G mapSplit split a i array and map a distribution on the splitted i array SplitCrit is the curva ture radius triggering split b G mapSplit a distrib splitCrit 100 See Examples Generator mapSplit py See Examples Generator mapSplitPT py G refine refine a structured array The original distribution is kept but the number of points is multiplied by power Dir is the direction of refinement 1 2 3 b G refine a power dir See Examples Generator refine py See Examples Generator refinePT py G mapCurvature map a structured array following the curvature N is the final number of points Dir is the direction of remeshing 1 2 3 b G mapCurvature a N power dir See Examples Generator mapCurvature py See Examples Generator mapCurvaturePT py G densify densify a i array or a BAR array with a new discretization step h Discretization points from the original array are kept b G densify a h See Examples Gene
44. levelMax is the maximum number of levels required If ratio 2 then a classical octree mesh is built If ratio 3 a 27 tree mesh is built in which case the spacing ratio is 3 and not 2 between two adjacent elements b G octree surfs snears dfar 5 balancing 0 levelMax 1000 ratio 2 See Examples Generator octree py See Examples Generator octreePT py G octree2Struct convert an octree or a quadtree mesh into a set of Cartesian grids Param eter ext is the extension of Cartesian grids in all the directions vmin can be an integer defining the number of points in each Cartesian grid or a list of integers defining the number of points per refinement level In that case the first element of the list of vmin defines the finest level Specifying all the levels is not mandatory If optimized 1 the ext value is reduced by 1 at overlap borders for the coarsest grid for minimum overlapping If merged 1 Cartesian grids are merged in order to reduce the number of created grids If AMR 1 a set of AMR zones are generated Parameter sizeMax can be used when merging is applied in that case the number of points per grid does not exceed sizeMax Warning to obtain multigrid blocks optimized must be set to 0 b G octree2Struct octree vmin 15 ext 0 optimized 1 merged 1 AMR 0 size Max 1000000 See Examples Generator octree2Struct py See Examples Generator octree2StructPT py G adaptOctree adapt an unstructured octree with res
45. n case of difference Topology set to overset results in two overlapping collar grids whereas it results in a collar grid extruded from the surface grid in the other case A G collarMesh s1 s2 dj dk niterj 100 niterk 100 ext 5 alphaRef 30 type union con tour constraints 1 constraints2 toldist 1 e 10 topology overset See Examples Generator collarMesh py See Examples Generator collarMeshPT py 1 4 Cartesian grid generators G gencartmb simple Cartesian generator Create a set of Cartesian grids B around a list of body grids A Those grids are patched with a ratio of 2 The user controls the number of levels and the number of points for each level of grid h is the spatial step on the finest level Dfar is the maximal distance to the body nlvl is a list that provides the number of points per level nlv1 0 finest grid except for the finest level B G gencartmb A h Dfar nlvl See Examples Generator gencartmb py See Examples Generator gencartmbPT py G octree create a QUAD quadtree mesh in 2D or an HEXA octree mesh in 3D starting from a ELSA MU 09022 V2 0 O N E R STN THE FRENCH AEROSPACE LAB list of bodies and snears Each parameter snear is the required spatial step of the octree near the cor responding body dfar is the extension of the octree mesh in all the directions balancing 1 means that the octree is balanced i e adjacent elements are at worst twice as big small
46. nder 0 0 0 0 5 1 360 0 10 50 50 30 C convertArrays2File a out plt Example file Examples Generator cylinderPT py cylinder pyTree import Converter PyTree as C import Generator PyTree as G a G cylinder 0 0 0 0 5 1 360 0 10 50 50 30 t C newPyTree Base t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator cylinder2 py cylinder2 array import Converter as C import Generator as G ZE e DS CC Del elo Ley Lap LL Ze 1 teta G cart 0 50 0 0 ls Les Ley ll T 2 z G cart 0 0 0 0 1 1 1 11 1 1 cyl G cylinder2 0 0 0 0 5 1 360 0 10 r teta z C convertArrays2File cyl out plt Example file Examples Generator cylinder2PT py cylinder2 pyTree import Converter PyTree as C import Generator PyTree as G r Gocart i OD Ditto Ley Les il 1 1 teta G cart 0 0 0 0 1 1 1 11 1 1 a g care E K eh Ol Dor Tel Ed Ty 1 cyl G cylinder2 0 0 0 0 5 1 360 0 10 r teta z t C newPyTree Base t 2 1 2 append cyl C convertPyTree2File t out cgns Example file Examples Generator cylinder3 py 12 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB cylinder3 array import Generator as G import Converter as C teta G cart trer 0 Ost lus Leo Uy La Ei xz G c irt 0 1 0 0 0 171
47. nsform PyTree as T a G cylinder 0 0 0 1 1 3 360 0 1 50 10 1 b T rotate a 0 0 0 1 0 0 5 b T translate b 0 0 0 5 c G stack a b t C newPyTree Base t 2 1 2 append c C convertPyTree2File t out cgns Example file Examples Generator addNormalLayers py addNormalLayers array import Generator as G import Converter as C import Geom as D d C array d 3 1 1 a 1 0 6 0 1 7 d 1 0 1 0 2 al1 10 2 0 3 a D sphere 0 0 0 1 50 a G addNormalLayers a d C convertArrays2File a out plt Example file Examples Generator addNormalLayersPT py addNormalLayers pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D cart 0 1 0 0 0 1 1 1 2 1 1 sphere 0 0 0 1 50 addNormallLayers a d C newPyTree Base t 2 1 2 append a convertPyTree2File t out cgns Il QUA d e Cy Example file Examples Generator TTM py TIM array import Converter as C import Generator as G import Geom as D 26 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB PO 0 0 0 P1 5 0 0 P2 0 7 0 P3 5 7 0 Geometry dl D line P0 Pl d2 D line P2 P3 pts C array x y z 5 1 1 x pts 1 0 y pts 1 1 z pts 1 2 x 0 0 y 0 0 z 0 0 x 1 2 y 1 2 z 1 0 x 2 3 wl 2 3 z 2 0
48. ntedHat pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C c D circle 0 0 0 1 360 0 100 surf G pointedHat c 0 0 1 t C newPyTree Base t 21 11 21 append surf C convertPyTree2File t out cgns Example file Examples Generator stitchedHat py stitchedHat array import Geom as D import Generator as G import Transform as T import Converter as C c D eirele 00 0 Lies 360 0 5 100 c T contract c 0 0 0 0 1 0 0 0 1 0 1 c G stitchedHat c 0 0 0 1 e 3 C convertArrays2File c out plt 18 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB Example file Examples Generator surface Walk py surfaceWalk array import Converter as C import Geom as D import Transform as T import Generator as G User definition of parametric curve def f t u x t u y tettlt uxu z u return x y z Array definition of geometry a D surface f c D circle 1 2 1 7 0 6 0 1 N 100 T reotate c 1 2 1 7 0 6 0 1 0 90 c T reorder c 1 2 3 c T projectOrtho c a h G cart 0 0 0 0 01 1 1 30 1 1 r G surfaceWalk a c h niter 100 C convertArrays2File a c r out plt Example file Examples Generator surfaceWalkPT py surfaceWalk pyTree import Converter PyTree as C import Geom PyTree as D import Transform PyTree as T import Generator PyTree as G
49. onvertArray2Tetra a Close a newPyTree Base 2 t 2 1 2 append a G getTriQualityMap t CconvertPyTree2File t out cgns Il CH E E Y Example file Examples Generator getCellPlanarity py getCellPlanarity array import Converter as C import Generator as G import Geom as D a D sphere 0 0 0 1 10 D G getCellPlanarity a p C center2Node p a C addVars a pl Cc CconvertArrays2File a out plt Example file Examples Generator getCellPlanarityPT py getCellPlanarity pyTree import Converter PyTree as C import Generator PyTree as G import Geom PyTree as D D sphere 0 0 0 1 10 G getCellPlanarity a C newPyTree Base 2 t 2 11 2 append a convertPyTree2File t out cgns C Example file Examples Generator getCircumCircleMap py getCircumCircleMap array import Geom as D import Generator as G import Converter as C sphere 0 0 0 1 50 convertArray2Tetra a Il Qa D C center2Node n n C addVars a n a a n G getCircumCircleMap a n C convertArrays2File n out plt Example file Examples Generator getCircumCircleMapPT py 38 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB getCircumCircleMap pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C a sphere 0 0 0 1 50 a convertArray2Tetra a t C newPyTree Base 2 t
50. onvertArrays2File vol out plt 35 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB Example file Examples Generator getVolumeMapPT py getVolumeMap pyTree import Generator PyTree as G import Converter PyTree as C G cart 0 0 0 0 1 0 1 0 2 10 10 3 a a G getVolumeMap a t C newPyTree Base t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator getNormalMap py getNormalMap array import Geom as D import Generator as G import Converter as C 2D structured a D sphere 0 0 0 1 50 n G getNormalMap a n C center2Node n n C addVars a n C convertArrays2File n outl plt 2D unstructured a D sphere 0 0 0 1 50 a C convertArray2Tetra a n G getNormalMap a n C center2Node n n C addVars a n C convertArrays2File n out2 plt Example file Examples Generator getNormalMapPT py getNormalMap pyTree import Geom PyTree as D import Generator PyTree as G import Converter PyTree as C D sphere 0 0 0 1 50 G getNormalMap a C newPyTree Base 2 t 2 1 2 append a convertPyTree2File t out cgns Cc Example file Examples Generator getSmoothNormalMap py getSmoothNormalMap array import Converter as C import Generator as G import Transform as T import Geom as D CAE rd ley LO LO 1 Care Mr pd LO bat srotate by 0 06 D
51. pect to an indicator field located at ele ment centers If indicator is strictly positive for an element then the element must be refined as many times as required by the indicator number If indicator is stricttly negative the element is coarsened if possible as many times as required by the indicator number If indicator is 0 the element remains unchanged balancing 1 means that the octree is balanced after adaptation If ratio 2 then a classical octree mesh is built If ratio 3 a 27 tree mesh is built in which case the spacing ratio is 3 and not 2 between two adjacent elements For array interface indicator is an array for pyTree version indicator is the name of field stored as a solution located at centers res G adaptOctree octree indicator balancing 1 ratio 2 See Examples Generator adaptOctree py See Examples Generator adaptOctreePT py G expandLayer Expand the layer of given level for an octree unstructured mesh If corners 1 expand also in corners directions res G expandLayer octree level 0 corners 0 balancing 0 See Examples Generator expandLayer py See Examples Generator expandLayerPT py 1 5 Operations on meshes G close close a mesh defined by array a Points that are distant of tol maximum to one another are merged b G close a tol 1 e 12 or B G close A tol 1 e 12 See Examples Generator close py See Examples Generator closePT py G selectInsideElts se
52. ple file Examples Generator T3mesher2D py T3mesher2D array import Generator as G import Converter as C import Geom as D circle 0 0 0 1 N 50 convertArray2Tetra a Close a G T3mesher2D a triangulateOnly 0 convertArrays2File a b out plt Il Qa D Ge Example file Examples Generator T3mesher2DPT py T3mesher2D pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D a circle 0 0 0 1 N 50 a convertArray2Tetra a a G close a b G T3mesher2D a triangulateOnly 0 t Cy Il Qa D C newPyTree Base 2 t 2 1 2 append b convertPyTree2File t out cgns Example file Examples Generator TFI py 14 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB TFI 2D structured array TFI 3D structured array TFI TRI array import Converter as C import Generator as G import Geom as D import numpy as N import Transform as T A AA AAA TFI 2D structured AAA A AAA EN Na PO 0 0 0 P1 5 0 0 P2 0 7 0 P3 5 7 0 Geometrie dl D line P0 Pl d2 D line P2 P3 pts C array x y z 5 1 1 x pts 1 01 y pts 1 1 z pts 1 2 x 0 0 y 0 0 z 0 0 x 1 2 y 1 2 z 1 0 x 2 3 y 2 3 z 2 0 x 3 2 y 3 5 z 3 0 x 4 0 y 4 7 z 4 0 bl D bezier pts pts C array x y 2 5 1 1 x pt
53. plt Example file Examples Generator cartPentaPT py cartPenta pyTree import Generator PyTree as G import Converter PyTree as C a G cartPenta 0 0 0 0 1 0 1 0 2 10 10 10 E C newPyTree Base t 2 11 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator cartPyra py cartHexa array import Generator as G import Converter as C a G cartPyra 0 0 0 1 1 1 20 20 20 C convertArrays2File a out tp Example file Examples Generator cartPyraPT py cartPyra pyTree import Generator PyTree as G import Converter PyTree as C a G cartPyra 0 0 0 0 1 0 1 0 2 10 10 10 t C newPyTree Base t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator cartNGon py 11 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB cartNGon array import Generator as G import Converter as C import CPlot a G cartNGon 0 0 0 0 1 0 1 0 2 20 20 20 CPlot display a Example file Examples Generator cartNGonPT py cartNGon pyTree import Generator PyTree as G import Converter PyTree as C a G cartNGon 0 0 0 0 1 0 1 0 2 2 2 2 print a t C newPyTree Base t 21 11 21 a C convertPyTree2File t out cgns Example file Examples Generator cylinder py cylinder array import Generator as G import Converter as C a G cyli
54. rator densify py See Examples Generator densifyPT py G grow grow a surface array of one layer Vector is the node displacement For the array ver sion vector is defined by an array For the PyTree version vector v1 v2 v3 where variables wl v2 v3 are defined as solutions in a located at nodes b G grow a vector See Examples Generator grow py See Examples Generator growPT py G stack stack two structured meshes with the same nixnj into a single mesh c G stack a b See Examples Generator stack py See Examples Generator stackPT py G addNormalLayers add normal layers to a surface mesh d is a one D distribution specify ing the height of each layer If check 1 layers grow only if created cell volumes are positive Niter specifies the number of normal smoothing iterations b G addNormalLayers a d check 0 niter 0 See Examples Generator addNormalLayers py See Examples Generator addNormalLayersPT py G TTM smooth a mesh using elliptic generator b G TTM a niter 100 See Examples Generator TTM py See Examples Generator TTMPT py G snapFront snap a mesh to a surface S A front must be defined in a by a cellN field Points of this front are snapped to the surface If optimized 0 the exterior front cellN 1 is snapped else N T O e O FS o S m B 5 d 218 15 Q e Q ye 2 IME S N O Q a gt gt 5 O D i ka et al le UNES
55. rfaceWalk create a mesh on a set of surfaces starting from a contour c defined onto the surface by a orthogonal walk dj is the distribution of points in the walking direction starting from c niter the number of smoothing iterations check 1 means that the walk is stopped when intersect ing cells appear alphaRef is the deviation angle wrt 180 degrees above which the walk is stopped toldist is the matching point tolerance Constraints can be set as 1D zones walk G surfaceWalk surfaces c dj constraints niter 0 alphaRef 180 check 0 toldist 1 e 6 See Examples Generator surfaceWalk py See Examples Generator surfaceWalkPT py G collarMesh create a collar mesh at junction s between two surfaces s1 and s2 in union or difference assembly using a distribution along the surface dj and a distribution in the normal direc tion to the wall dk niterj and niterk are the number of smoothing iterations for j and k directions ext is the extension of the collar mesh for difference assembly type is the assembly type and can be union or difference alphaRef is the deviation angle wrt 180 degrees above which the walk is stopped contour is the starting contour to create the collar grids constraints and constraints are 1D zones defining the curves the collar grid must follow on surfaces s1 and s2 respectively toldist is the matching point tolerance Parameter topology can be overset or extruded only useful i
56. ribution on the left and right side add 9 2 5 2 Lei DO D O be a a O A E 5 an D O S O gt DO 5 a DO a a go R 5 a Lei S DO a a O Aa 5 gt O a ei gt SE gt o a O gt DO Q Q O UN lt a a a ge o 9 5 2 n b G enforceX a x0 enforcedh supp add Adjust add in order to have a monotonic distribution b G enforceX a x0 enforcedh supp add ZB Ch Oo a o Pm S E S 3 as P O fF 0 o ge Z2 Q y o CH a S Oo n 35 3 ER SS O DI o SZ Lei D T Q go o m eS OK 2 5 S O B a 2 2 o Ge 20 ES TO ds 3 53 S E O 5 Q O O gt lt Ge 4 yo Lei o Lei CH m Ka o 5 G enforceMoinsX same as before but with a one sided distribution left This can be usefull to create a boundary layer distribution in an Euler mesh b G enforceMoinsX a enforcedh supp add or b G enforceMoinsX a enforcedh supp add Loi O o ies gt ya ER CH Lei Q O i O Gei 9 e O 2 O bei Q lt Lei Yo Lei am Loi O o ies gt E 3 yo ER O Lei Q O i O 8 a O 5 Oo O lt 2 i Lei Ge Wei 4 Yo ke G enforcePlusX same as before but with a one sided distribution right b G enforcePlusX a enforcedh supp add or b G enforcePlusX a enforcedh supp add 9 ELSA MU 09022 V2 0 O N
57. rt Generator as G import Converter as C import Geom as D Ni 50 Nj 50 a G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni Nj 1 b D line 0 0 2 0 L rD0 2rD0 20 c G enforceLine a b 0 01 5 3 C convertArrays2File c out plt Example file Examples Generator enforceLinePT py enforceLine pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D Ni 50 Nj 50 a G cart 0 0 0 1 Ni 1 0 5 N3 1 1 Ni Nj 1 b D line 0 0 2 0 1 0 2 0 20 a G enforceLine a b 0 01 5 3 t C newPyTree Base 2 t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator enforcePoint py enforcePoint array import Converter as C import Generator as G distribution Ni 20 Nj 20 G cart 0 0 0 1 Ni 1 5 Nj 1 1 Ni N3 1 b G enforcePoint a 0 5 a C convertArrays2File b out plt Example file Examples Generator enforcePointPT py 41 ELSA MU 09022 V2 0 O N E R A THE FRENCH AEROSPACE LAB enforcePoint pyTree import Converter PyTree as C import Generator PyTree as G Ni 20 Nj 20 a G eart 0 0 0 1 M 1 5 103 19 10 Ni NJs 1 b G enforcePoint a 0 5 t C newPyTree Base 2 t 2 1 2 append b C convertPyTree2File t out cgns Example file Examples Generator enforceCurvature py enforceCurvature array import
58. s w weight print G barycenter a w Example file Examples Generator barycenterPT py barycenter pyTree import Generator PyTree as G import Converter PyTree as C a G cart 0 0 0 0 1 0 1 1 20 20 20 print G barycenter a a C initVars a weight 1 print G barycenter a weight Example file Examples Generator bbox py bbox array import Generator as G import Converter as C a G cart 0 0 0 0 1 0 1 1 20 20 20 b G cart 12 0 0 0 1 0 1 1 20 20 20 print G bbox a print G bbox a b 33 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB Example file Examples Generator bboxPT py bbox pyTree import Generator PyTree as G import Converter PyTree as C a G cart 0 0 0 0 1 0 1 1 20 20 20 print G bbox a Example file Examples Generator bboxOfCells py bboxOfCells array import Generator as G import Converter as C a G cart 0 0 0 10 1 0 1 L 7 20 20 20 b G bboxOfCells a print b Example file Examples Generator bboxOfCellsPT py bboxOfCells pyTree import Generator PyTree as G import Converter PyTree as C a G cart 0 0 0 0 1 0 1 142 20 20 20 a G bbox0fCells a t C newPyTree Base 3 t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator BB py BB array import Generator as G import Conver
59. s 1 01 y pts 1 1 z pts 1 2 x 0 5 y 0 0 z 0 0 x 1 3 vill 2 z 1 0 x 2 2 y 2 3 z 2 0 x 3 6 y 3 5 z 3 0 x 4 5 y 4 7 z 4 0 b2 D bezier pts C convertArrays2File dl d2 bl b2 geom plt Regular discretisation of each line Ni 20 Nj 10 r G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 q G cart 0 0 0 1 N3 1 1 1 N3 1 1 rl G map dl r r2 G map d2 r r3 G map bl a r4 G map b2 a TFI 2D m G TFI rl r2 r3 r4 C convertArrays2File rl r2 r3 r4 m tfi2d plt AAA A TFI 3D structured ETT RA AT A E TE da Or SP xo 0 yo 0 zo 0 nx 21 ny 21 nz 21 1 nx 1 hy 1 ny 1 hz 1 nz 1 Es x Il z cste fzmin G cart xo yo zo hx hy 1 nx ny 1 fzmax T translate fzmin 0 0 1 x cste fxmin G cart xo yo zo 1 hy hz 1 ny nz fxmin T reorder fxmin 3 1 2 15 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB fxmax T translate fxmin 1 0 0 y cste fymin G cart xo yo zo hx 1 hz nx 1 nz fymin T reorder fymin 1 3 2 fymax T translate fymin 0 1 0 r fxmin fxmax fymin fymax fzmin fzmax m G TFI r C convertArrays2File r m tfi3d plt A A TFI TRI A A ENT 11 D line 0 0 0 0 1 0 15 12 D line 0 0 0 1 0 0 15 13 D line 1 0 0 0 1 0 15 tri G T
60. se 2 t 2 1 2 append a C convertPyTree2File t out cgns Example file Examples Generator polyLineMesher py polyLineMesher array import Converter as C import Generator PolyLine as GP import Generator as G import Post as P import Geom as D import Transform as T Read a 2D geometry created with tecplot a C convertFile2Arrays fusee plt a G close a le 2 a T reorder a 1 2 3 C convertArrays2File a input plt Data h 0 02 hf 0 0001 density 500 Per families coords walls for i in a b GP polyLineMesher i h hf density coords append b 0 walls append b 1 Flat meshes for i in coords meshes meshes i C convertArrays2File meshes out plt Example file Examples Generator polyLineMesherPT py polyLineMesher pyTree import Converter PyTree as C import Generator PyTree as G import Transform PyTree as T tb C convertFile2PyTree fusee plt tb G close tb le 2 tb T reorder tb 1 2 3 h 0 02 hf 0 0001 density 500 res G polyLineMesher tb 2 1 2 0 h hf density zones res 0 h res 1 density res 2 t C newPyTree PolyC1 t 2 1 2 zones C convertPyTree2File t out cgns Example file Examples Generator polyC 1 Mesher py polyClMesher array import Converter as C import Generator PolyCl as GP import Generator as G import Post as P import Geom as D
61. ter as C import Geom as D D circle 0 0 0 1 N 100 a G BB s C convertArrays2File a s out plt Example file Examples Generator BBPT py BB pyTree import Generator PyTree as G import Converter PyTree as C import Geom PyTree as D D circle 0 0 0 1 N 100 G BB s a 0 bbox C newPyTree Base t 2 1 2 s a convertPyTree2File t out cgns i E Example file Examples Generator CEBBIntersection py CEBBIntersection array import Generator as G import Converter as C import Transform as T ni 11 nj 3 nk 11 al G cart 0 0 0 0 1 0 1 0 2 ni nj nk a2 G cart 1 0 0 0 1 0 1 0 2 ni nj nk a2 T rotate a2 0 0 0 0 0 1 12 print G CEBBIntersection al a2 Example file Examples Generator CEBBIntersectionPT py 34 ELSA MU 09022 V2 0 ONERA THE FRENCH AEROSPACE LAB CEBBIntersection pyTree import Generator PyTree as G import Converter PyTree as C import Transform PyTree as T ni 11 nj 3 nk 11 al G cart 0 0 0 0 1 0 1 0 2 ni nj nk a2 G cart 1 0 0 0 1 0 1 0 2 ni nj nk a2 T rotate a2 0 0 0 0 0 1 12 print G CEBBIntersection al a2 Example file Examples Generator bboxIntersection py bboxIntersection array import Generator as G ni 11 nj 3 nk 11 al G cart 0 0 0 0 1 0 1 0 2 ni nJ nky a2 G cart 0 5 0 05 0 01 0 1 0 1 0 2 ni
62. x 3 2 y 3 5 z 3 0 x 4 0 yl 4 7 z 4 0 bl D bezier pts x 0 5 yl 0 0 z 0 0 x 1 3 yl 1 2 z 1 0 x 2 2 y 2 3 z 2 0 x 3 6 yl 3 5 2 3 0 x 4 5 yl 4 7 z 4 0 b2 D bezier pts C convertArrays2File dl d2 bl b2 geom plt Regular discretision of each line Ni 20 Nj 10 r G cart 0 0 0 1 1 1 1 1 Ni 1 1 G cart 0 0 0 C1 5 1 EN Le 1 rl G map dl r r2 G map d2 r r3 G map bl q r4 G map b2 a TIM m G TFI rl r r3 r4 m2 G TTM m 2000 C convertArrays2File m m2 out plt Example file Examples Generator TTMPT py TIM pyTree import Converter PyTree as C import Generator PyTree as G import Geom PyTree as D PO 0 0 0 P1 5 0 0 P2 0 7 0 P3 5 7 0 Geometry dl D line P0 P1 d2 D line P2 P3 d3 D line P0 P2 d4 D line P1 P3 Regular discretisation of each line Ni 20 Nj 10 r G cart 0 0 0 1 Ni 1 1 1 Ni 1 1 q G cart 0 0 0 1 N3 1 1 1 Nj 1 1 rl G map dl r r2 G map d2 r r3 G map d3 q r4 G map d4 a TTM G TFI rl r r3 r4 G TTM m C newPyTree Base 2 t 2 11 2 append m convertPyTree2File t out cgns CO cr 3 B Il Example file Examples Generator snapFront py snapFront array 27 ELSA MU 09022 V2 0 ONERA THE
63. y See Examples Generator check py See Examples Generator checkPT py G barycenter return the barycenter of a with optional weight bary G barycenter a weight None or bary G barycenter A weight None See Examples Generator barycenter py See Examples Generator barycenterPT py ELSA MU 09022 V2 0 O N E R So THE FRENCH AEROSPACE LAB G bbox return the bounding box xmin ymin zmin xmax ymax zmax of a or A bb G bbox a or bb G bbox A See Examples Generator bbox py See Examples Generator bboxPT py G bboxOfCells return the bounding box of each cell of a The bounding box field is located at centers of cells bb G bboxOfCells a or BB G bboxOfCells A See Examples Generator bboxOfCells py See Examples Generator bboxOfCellsPT py G BB return the axis aligned bounding box of a as an array or a zone b G BB a or B G BB A Nn O o mi gt yo O Go Q O 5 O E O a e w Yo Lei Lamm uN O o D gt o E yo O n Ki Q O 5 O av O a W w Y E Yo Lei G CEBBIntersection test the Cartesian Elements Bounding Box CEBB intersection be tween al and a2 Tolerance is a float given by tol Return 0 if no intersection 1 otherwise intersect G CEBBIntersection al a2 tol 1 e 10 See Examples Generator CEB BIntersection py See Examples Generator CEBBIntersectionPT py G bboxIntersection test if bounding boxes of al and a2 interse
Download Pdf Manuals
Related Search
Related Contents
Interfacing a Hard Drive to an M5249C3 Board Page 1. Freescale Edimax BR-6258nL Brochure EPF mode d`emploi Operating Instructions Especificações - Ar Brasil Compressores Mode d`emploi Opel Meriva Copyright © All rights reserved.
Failed to retrieve file