예제 #1
0
d = CGL.newDataClass(n, CGK.NondimensionalParameter_s)
q = CGL.newBC(n, '{BC}', family='{Family}')
d = CGL.newDataClass(q, CGK.NondimensionalParameter_s)
s = CGL.newBCDataSet(q, '{Set#01}')
d = CGL.newDataClass(s, CGK.NondimensionalParameter_s)
c = CGL.newBCData(s, CGK.Dirichlet_s)
d = CGL.newDataClass(c, CGK.NondimensionalParameter_s)
r = CGL.newReferenceState(b)
d = CGL.newDataClass(r, CGK.NondimensionalParameter_s)
a = CGL.newAxisymmetry(b)
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
a = CGL.newRotatingCoordinates(b)
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
a = CGL.newDiscreteData(z, '{DiscreteData}')
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
i = CGL.newBaseIterativeData(b, '{BaseIterativeData}')
d = CGL.newDataClass(i, CGK.NondimensionalParameter_s)
i = CGL.newZoneIterativeData(z, '{ZoneIterativeData}')
d = CGL.newDataClass(i, CGK.NondimensionalParameter_s)
m = CGL.newRigidGridMotion(z,
                           '{RigidGridMotion}',
                           vector=NPY.array([[0.0, 0.0], [0.0, 0.0],
                                             [0.0, 0.0]]))
d = CGL.newDataClass(m, CGK.NondimensionalParameter_s)
m = CGL.newArbitraryGridMotion(z, '{ArbitraryGridMotion}')
d = CGL.newDataClass(m, CGK.NondimensionalParameter_s)
x = CGL.newZoneGridConnectivity(z)
x = CGL.newGridConnectivity(x, '{GridConnectivity}', z[0])
CGL.newPointRange(x,
                  value=NPY.array([[1, 1], [1, 1], [1, 1]],
                                  dtype=NPY.int32,
예제 #2
0
#  ---------------------------------------------------------------------------
#  pyCGNS - Python package for CFD General Notation System -
#  See license.txt file in the root directory of this Python module source
#  ---------------------------------------------------------------------------
#
import CGNS.PAT.cgnslib as C
import CGNS.PAT.cgnserrors as E
import CGNS.PAT.cgnskeywords as K
import numpy as N

#
data = C.newBaseIterativeData(None, K.BaseIterativeData_s)
C.newDataArray(data, K.NumberOfZones_s)
C.newDataArray(data, K.NumberOfFamilies_s)
C.newDataArray(data, K.ZonePointers_s)
C.newDataArray(data, K.FamilyPointers_s)
C.newDataArray(data, '{DataArray}')
C.newDataClass(data)
C.newDimensionalUnits(data)
C.newUserDefinedData(data, '{UserDefinedData}')
C.newDescriptor(data, '{Descriptor}')
#
status = '11.1.1'
comment = 'Full SIDS with all optionals'
pattern = [data, status, comment]
#
예제 #3
0
#  ---------------------------------------------------------------------------
#  pyCGNS - Python package for CFD General Notation System -
#  See license.txt file in the root directory of this Python module source
#  ---------------------------------------------------------------------------
#
import CGNS.PAT.cgnslib as C
import CGNS.PAT.cgnserrors as E
import CGNS.PAT.cgnskeywords as K
import numpy as N

data = C.newBase(None, '{Base}', 3, 3)
C.newZone(data, '{Zone}', N.array([[5, 4, 0], [7, 6, 0], [9, 8, 0]],
                                  order='F'))
C.newSimulationType(data)
C.newIntegralData(data, '{IntegralData}')
C.newBaseIterativeData(data, '{BaseIterativeData}')
C.newConvergenceHistory(data)
C.newFamily(data, '{Family}')
C.newFlowEquationSet(data)
C.newReferenceState(data)
C.newAxisymmetry(data)
C.newRotatingCoordinates(data)
C.newGravity(data)
C.newDataClass(data)
C.newDimensionalUnits(data)
C.newUserDefinedData(data, '{UserDefinedData}')
C.newDescriptor(data, '{Descriptor}')

status = '6.2'
comment = 'Full SIDS with all optionals children'
pattern = [data, status, comment]