Top CGNS/Python tree node creation, not a CGNS/SIDS type:
T=newCGNSTree()
Parameters: | version (float32) – force the CGNSLibraryVersion |
---|---|
Returns: | a new CGNSTree_t node |
Remarks : |
|
Children : |
CGNSBase node creation, the top node for topological contents:
# The base is put in the `T` children list
T=newCGNSTree()
newBase(T,'Box-1',3,3)
# No parent, you should fetch the new node using a variable
B=newCGNSBase(None,'Box-2',3,3)
# using tuple de-ref
dims=(3,3)
B=newCGNSBase(None,'Box-3',*dims)
Parameters: |
|
---|---|
Returns: | a new CGNSBase_t node |
Children : | |
See : |
Zone node creation, the sub-tree defining a topological domain:
s=NPY.array([[10],[2],[0]],dtype='i')
T=newCGNSTree()
B=newBase(T,'Box-1',3,3)
Z=newZone(B,name,s,CK.Unstructured_s,'Wing')
Parameters: |
|
---|---|
Returns: | a new Zone_t node |
Children : | |
Remarks : |
|
See : |
GridCoordinates node creation, container for coordinates:
newGridCoordinates(zone,CK.GridCoordinates_s)
newDataArray(gc,CK.CoordinateX_s)
newDataArray(gc,CK.CoordinateY_s)
newDataArray(gc,CK.CoordinateZ_s)
Parameters: |
|
---|---|
Returns: | a new GridCoordinates_t node |
Remarks : |
|
See : |
GridCoordinates_t and DataArray_t nodes creation:
cx=newCoordinates(zone,CK.CoordinateX_s,x_array)
cy=newCoordinates(zone,CK.CoordinateY_s,y_array)
cz=newCoordinates(zone,CK.CoordinateZ_s,z_array)
# the following function sequence performs the same action
gc=newGridCoordinates(zone,CK.GridCoordinates_s)
newDataArray(gc,CK.CoordinateX_s,x_array)
newDataArray(gc,CK.CoordinateY_s,y_array)
newDataArray(gc,CK.CoordinateZ_s,z_array)
Parameters: |
|
---|---|
Returns: | The returned node always is the DataArray_t node. |
Remarks : |
|
See : |
DataArray node creation, the all purpose array node:
import numpy as NPY
da=newDataArray(dd,'{DataArray}',value=NPY.array(((1,3),(5,7)),dtype='d'))
Parameters: |
|
---|---|
Returns: | a new DataArray_t node |
See : |
DataClass node creation, sets the class of a data array:
import CGNS.PAT.cgnskeywords as CK
import numpy as NPY
# N is an already existing CGNS/Python node
dd=newDiscreteData(N,'{DiscreteData}')
dc=newDataClass(dd,CK.DimensionalUnits_s)
da=newDataArray(dd,'{DataArray}',value=NPY.array((1,),dtype='d'))
Parameters: |
|
---|---|
Returns: | a new DataClass_t node |
Remarks : |
|
See : |
DimensionalUnits node creation, sets the units of a data array:
import CGNS.PAT.cgnskeywords as CK
import numpy as NPY
# N is an already existing CGNS/Python node
dd=newDiscreteData(N,'{DiscreteData}')
dc=newDataClass(dd,CK.DimensionalUnits_s)
units=(CK.Gram_s,CK.Foot_s,CK.UserDefined_s,CK.Celcius_s,CK.Degree_s)
du=newDimensionalUnits(dd,units)
da=newDataArray(dd,'{DataArray}',value=NPY.array((1,),dtype='d'))
Parameters: |
|
---|---|
Returns: | a new DimensionalUnits_t node |
Remarks : |
|
See : |
DimensionalExponents node creation, sets the units exponents of an array:
import CGNS.PAT.cgnskeywords as CK
import numpy as NPY
# N is an already existing CGNS/Python node
dd=newDiscreteData(N,'{DiscreteData}')
dc=newDataClass(dd,CK.DimensionalUnits_s)
units=(CK.Gram_s,CK.Foot_s,CK.UserDefined_s,CK.Celcius_s,CK.Degree_s)
du=newDimensionalUnits(dd,units)
exps=(1,-1,-2,0,0)
du=newDimensionalExponents(dd,exps)
da=newDataArray(dd,'{DataArray}',value=NPY.array((1,),dtype='d'))
Parameters: |
|
---|---|
Returns: | a new DimensionalExponents_t node |
Remarks : |
|
See : |
DataConversion node creation, sets the conversion factors for an array:
import CGNS.PAT.cgnskeywords as CK
import numpy as NPY
# N is an already existing CGNS/Python node
dd=newDiscreteData(N,'{DiscreteData}')
dc=newDataClass(dd,CK.DimensionalUnits_s)
units=(CK.Gram_s,CK.Foot_s,CK.UserDefined_s,CK.Celcius_s,CK.Degree_s)
du=newDimensionalUnits(dd,units)
exps=(1,-1,-2,0,0)
du=newDimensionalExponents(dd,exps)
ds=newDataConversion(dd,2.0,0.0)
da=newDataArray(dd,'{DataArray}',value=NPY.array((1,),dtype='d'))
Parameters: |
|
---|---|
Returns: | a new DataConversion_t node |
Remarks : |
|
See : |
Descriptor node creation, to contain user-defined textual contents:
txt=newDescriptor(parent,'CommandLine','python -c import elsA.CGNS')
Parameters: |
|
---|---|
Returns: | a new Descriptor_t node |
See : |
GridLocation node creation, set location of data value wrt grid:
n=newGridLocation(parent,CK.Vertex_s)
Parameters: |
|
---|---|
Returns: | a new GridLocation_t node |
Remarks : |
|
See : |
IndexArray node creation, integer array for indexing purpose:
import numpy as NPY
ix=newIndexArray(parent,'GlobalIndex',NPY.array((3,4,5)))
Parameters: |
|
---|---|
Returns: | a new IndexArray_t node |
Remarks : |
|
See : |
PointList node creation, integer array for indexing purpose:
import numpy as NPY
ix=newPointList(parent,'FacesList',NPY.array((3,4,5,9,15)))
Parameters: |
|
---|---|
Returns: | a new XPointList_t node |
Remarks : |
|
See : |
PointRange node creation, integer array for Structured indexing purpose:
import numpy as NPY
minmax=NPY.array([[1,13],[1,6],[1,1]],order='F')
ix=newPointRange(parent,value=minmax)
Parameters: |
|
---|---|
Returns: | a new XPointRange_t node |
Remarks : |
|
See : |
Rind node creation, indicates extra ghost cells around the grid:
rind=NPY.array([[1,13],[1,6],[1,1]],order='F')
newRind(solution,rind)
Parameters: |
|
---|---|
Returns: | a new Rind_t node |
Remarks : |
|
See : |
SimulationType node creation, set the TimeAccurate type:
newSimulationType(base,CK.TimeAccurate_s)
Parameters: |
|
---|---|
Returns: | a new SimulationType_t node |
See : |
Ordinal node creation, an informative integer value:
newOrdinal(node,4)
Parameters: |
|
---|---|
Returns: | a new Ordinal_t node |
See : |
DiscreteData node creation, structural node for data:
newDiscreteData(node,'Parameters')
Parameters: |
|
---|---|
Returns: | a new DiscreteData_t node |
See : |
IntegralData node creation, structural node for data:
newIntegralData(node,'Parameters')
Parameters: |
|
---|---|
Returns: | a new IntegralData_t node |
See : |
Elements_t node creation, indexing unstructured meshes:
quads=newElements(None,'QUADS',CGK.QUAD_4,quad_array,NPY.array([start,end]))'
- parent: the parent node (<node> or None)
- name: element node name (string)
- etype: the type of element (string or ‘int’)
- econnectivity: actual array of point connectivities (numpy.ndarray)
- erange: the first and last index of the connectivity (numpy.ndarray)
- eboundary: number of boundary elements (int)
- The new Elements_t node
- If a parent is given, the new node is added to the parent children list.
- The elementsrange should insure a unique and continuous index for all elements nodes in the same parent zone.
- Element type can be set as int such as CGK.QUAD_4 or 7, or as string such as CGK.QUAD_4_s or “QUAD_4”
-BC node creation -BC
‘newNode:N=’newBoundary‘(parent:N,bname:S,brange:[*i],btype:S)’
Returns a new <node> representing a BC_t sub-tree. If a parent is given, the new <node> is added to the parent children list. Parent should be Zone_t, returned node is parent. If the parent has already a child name ZoneBC then only the BC_t,IndexRange_t are created. chapter 9.3 Add IndexRange_t required
-BCDataSet node creation -BCDataSet
‘newNode:N=’newBCDataSet‘(parent:N,name:S,valueType:CK.BCTypeSimple)’
If a parent is given, the new <node> is added to the parent children list. Returns a new <node> representing a BCDataSet_t sub-tree. chapter 9.4 Add node BCTypeSimple is required
-BCData node creation -BCData
‘newNode:N=’newBCData‘(parent:N,name:S)’
Returns a new <node> representing a BCData_t sub-tree. chapter 9.5
-BCProperty node creation -BCProperty
‘newNode:N=’newBCProperty‘(parent:N)’
Returns a new <node> representing a BCProperty_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 9.6
-Axisymmetry node creation -Axisymmetry
‘newNode:N=’newAxisymmetry‘(parent:N,refpoint:A,axisvector:A)’
refpoint,axisvector should be a real array. Returns a new <node> representing a CK.Axisymmetry_t sub-tree. chapter 7.5 Add DataArray AxisymmetryAxisVector,AxisymmetryReferencePoint are required
-RotatingCoordinates node creation -RotatingCoordinates
‘newNode:N=’newRotatingCoordinates‘(parent:N,rotcenter=A,ratev=A)’
Returns a new <node> representing a RotatingCoordinates_t sub-tree. If a parent is given, the new <node> is added to the parent children list. rotcenter,ratev should be a real array. chapter 7.6 Add DataArray RotationRateVector,RotationCenter are required
-Solution node creation -Solution
‘newNode:N=’newSolution‘(parent:N,name:S,gridlocation:None)’
Returns a new <node> representing a FlowSolution_t sub-tree. chapter 7.7
-GridConnectivity node creation -Grid
‘newNode:N=’newZoneGridConnectivity‘(parent:N,name:S)’
Creates a ZoneGridConnectivity_t sub-tree This sub-node is returned. If a parent is given, the new <node> is added to the parent children list, the parent should be a Zone_t. chapter 8.1
-GridConnectivity1to1 node creation -Grid
‘newNode:N=’newGridConnectivity1to1‘(parent:N,name:S,dname:S,window:[i*],dwindow:[i*],trans:[i*])’
Creates a GridConnectivity1to1_t sub-tree. If a parent is given, the new <node> is added to the parent children list, the parent should be a Zone_t. The returned node is the GridConnectivity1to1_t chapter 8.2
-GridConnectivity node creation -Grid
‘newNode:N=’newGridConnectivity‘(parent:N,name:S,dname:S,ctype:S)’
Creates a GridConnectivity sub-tree. If a parent is given, the new <node> is added to the parent children list, the parent should be a ZoneGridConnectivity_t. The returned node is the GridConnectivity_t chapter 8.4
-GridConnectivityType node creation -Grid
‘newNode:N=’newGridConnectivityType‘(parent:N,ctype:S)’
Creates a GridConnectivityType sub-tree. If a parent is given, the new <node> is added to the parent children list, the parent should be a GridConnectivity_t. The returned node is the GridConnectivityType_t chapter 8
-GridConnectivityProperty node creation -GridConnectivityProperty
‘newNode:N=’newGridConnectivityProperty‘(parent:N)’
Returns a new <node> representing a GridConnectivityProperty_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 8.5
-Periodic node creation -Periodic
‘newNode:N=’newPeriodic‘(parent:N,rotcenter=A,ratev=A,trans=A)’
Returns a new <node> representing a Periodic_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name Periodic then only the RotationCenter,RotationAngle,Translation are created. rotcenter,ratev,trans should be a real array. chapter 8.5.1 Add DataArray RotationCenter,RotationAngle,Translation are required
-AverageInterface node creation -AverageInterface
‘newNode:N=’newAverageInterface‘(parent:N,valueType:CK.AverageInterfaceType)’
Returns a new <node> representing a AverageInterface_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name AverageInterface then only the AverageInterfaceType is created. chapter 8.5.2
-OversetHoles node creation -OversetHoles
‘node:N=’newOversetHoles‘(parent:N,name:S,hrange:list)’
Creates a OversetHoles_t sub-tree. the parent should be a Zone_t. If a parent is given, the new <node> is added to the parent children list. chapter 8.6 Add PointList or List( PointRange ) are required
-FlowEquationSet node creation -FlowEquationSet
‘newNode:N=’newFlowEquationSet‘(parent:N)’
-GoverningEquations node creation -GoverningEquations
‘newNode:N=’newGoverningEquations‘(parent:N,valueType:CK.GoverningEquationsType)’
Returns a new <node> representing a CK.GoverningEquations_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name GoverningEquations then only the GoverningEquationsType is created. chapter 10.2 Add node GoverningEquationsType is required
-GasModel node creation -GasModel
‘newNode:N=’newGasModel‘(parent:N,valueType:CK.GasModelType)’
Returns a new <node> representing a CK.GasModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name GasModel then only the GasModelType is created. chapter 10.3 Add node GasModelType is required
-ThermalConductivityModel node creation -ThermalConductivityModel
‘newNode:N=’newThermalConductivityModel‘(parent:N,valueType:CK.ThermalConductivityModelType)’
Returns a new <node> representing a CK.ThermalConductivityModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name ThermalConductivityModel then only the ThermalConductivityModelType is created. chapter 10.5 Add node ThermalConductivityModelType is required
-ViscosityModel node creation -ViscosityModel
‘newNode:N=’newViscosityModel‘(parent:N,valueType:CK.ViscosityModelType)’
Returns a new <node> representing a CK.ViscosityModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name ViscosityModel then only the ViscosityModelType is created. chapter 10.4 Add node ViscosityModelType is (r)
-TurbulenceClosure node creation -TurbulenceClosure
-TurbulenceModel node creation -TurbulenceModel
‘newNode:N=’newTurbulenceModel‘(parent:N,valueType:CK.TurbulenceModelType)’
Returns a new <node> representing a CK.TurbulenceModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name TurbulenceModel then only the TurbulenceModelType is created. chapter 10.6.2 Add node TurbulenceModelType is (r)
-ThermalRelaxationModel node creation -ThermalRelaxationModel
‘newNode:N=’newThermalRelaxationModel‘(parent:N,valueType:CK.ThermalRelaxationModelType)’
Returns a new <node> representing a CK.ThermalRelaxationModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name ThermalRelaxationModel then only the ThermalRelaxationModelType is created. chapter 10.7 Add node ThermalRelaxationModelType is (r)
-ChemicalKineticsModel node creation -ChemicalKineticsModel
‘newNode:N=’newChemicalKineticsModel‘(parent:N,valueType:CK.ChemicalKineticsModelType)’
Returns a new <node> representing a CK.ChemicalKineticsModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name ChemicalKineticsModel then only the ChemicalKineticsModelType is created. chapter 10.8 Add node ChemicalKineticsModelType is (r)
-EMElectricFieldModel node creation -EMElectricFieldModel
‘newNode:N=’newEMElectricFieldModel‘(parent:N,valueType:CK.EMElectricFieldModelType)’
Returns a new <node> representing a CK.EMElectricFieldModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list.
If the parent has already a child name EMElectricFieldModel thenonly the EMElectricFieldModelType is created. chapter 10.9 Add node EMElectricFieldModelType is (r)
-EMMagneticFieldModel node creation -EMMagneticFieldModel
‘newNode:N=’newEMMagneticFieldModel‘(parent:N,valueType:CK.EMMagneticFieldModelType)’
Returns a new <node> representing a CK.EMMagneticFieldModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name EMMagneticFieldModel_s then only the EMMagneticFieldModelType is created. chapter 10.9.2 Add node EMMagneticFieldModelType is (r)
-EMConductivityModel node creation -EMConductivityModel
‘newNode:N=’newEMConductivityModel‘(parent:N,valueType:CK.EMConductivityModelType)’
Returns a new <node> representing a CK.EMConductivityModel_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name EMConductivityModel then only the EMConductivityModelType is created. chapter 10.9.3 Add node EMConductivityModelType is (r)
-BaseIterativeData node creation -BaseIterativeData
‘newNode:N=’newBaseIterativeData‘(parent:N,name:S,nsteps:I,itype:E)’
Returns a new <node> representing a BaseIterativeData_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 11.1.1 NumberOfSteps is required, TimeValues or IterationValues are required
-ZoneIterativeData node creation -ZoneIterativeData
‘newNode:N=’newZoneIterativeData‘(parent:N,name:S)’
Returns a new <node> representing a ZoneIterativeData_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 11.1.2
-RigidGridMotion node creation -RigidGridMotion
‘newNode:N=’newRigidGridMotion‘(parent:N,name:S,valueType:CK.RigidGridMotionType,vector:A)’
-ReferenceState node creation -ReferenceState
‘newNode:N=’newReferenceState‘(parent:N,name:S)’
Returns a new <node> representing a ReferenceState_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 12.1
-ConvergenceHistory node creation -ConvergenceHistory
‘newNode:N=’newConvergenceHistory‘(parent:N,name:S,iterations:i)’
Returns a new <node> representing a ConvergenceHistory_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 12.3
-Family node creation -Family
‘newNode:N=’newFamily‘(parent:N,name:S)’
Returns a new <node> representing a Family_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 12.6
-GeometryReference node creation -GeometryReference
‘newNode:N=’newGeometryReference‘(parent:N,name:S,valueType:CK.GeometryFormat)’
Returns a new <node> representing a CK.GeometryFormat_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name CK.GeometryReference then only the .GeometryFormat is created chapter 12.7 Add node CK.GeometryFormat_t is (r) and GeometryFile_t definition not find but is required (CAD file)
-FamilyBC node creation -FamilyBC
‘newNode:N=’newFamilyBC‘(parent:N,valueType:CK.BCTypeSimple/CK.BCTypeCompound)’
Returns a new <node> representing a CK.FamilyBC_t sub-tree. If a parent is given, the new <node> is added to the parent children list. If the parent has already a child name FamilyBC then only the BCType is created chapter 12.8 Add node BCType is required
Returns a new node representing a ArbitraryGridMotionType_t
Parameters: |
|
---|
If a parent is not None, the new node is added to the parent children list. If the parent has already a child with name RigidGridMotion then only the RigidGridMotionType is created.
-UserDefinedData node creation -UserDefinedData
‘newNode:N=’newUserDefinedData‘(parent:N,name:S)’
Returns a new <node> representing a UserDefinedData_t sub-tree. If a parent is given, the new <node> is added to the parent children list. chapter 12.9
-Gravity node creation -Gravity
‘newNode:N=’newGravity‘(parent:N,gvector:A)’
Returns a new <node> representing a Gravity_t sub-tree. If a parent is given, the new <node> is added to the parent children list. gvector should be a real array chapter 12.10 Add DataArray GravityVector is required