g3d.defs package
Subpackages
- g3d.defs.world package
- Subpackages
- Submodules
- g3d.defs.world.display module
- g3d.defs.world.info module
- g3d.defs.world.io module
- g3d.defs.world.models module
- g3d.defs.world.options module
G3DRunOptionsG3DRunOptions.attach_profilerG3DRunOptions.auto_plot_residualsG3DRunOptions.break_residualG3DRunOptions.dim_modeG3DRunOptions.eqn_modeG3DRunOptions.long_optG3DRunOptions.nstepG3DRunOptions.nstep_saveG3DRunOptions.q3d_source_factorG3DRunOptions.restartG3DRunOptions.short_optG3DRunOptions.use_irsmG3DRunOptions.use_residual_breakG3DRunOptions.use_velocity_gradients
- g3d.defs.world.sizes module
G3DSizesG3DSizes.add_block_faces()G3DSizes.add_boundary_faces()G3DSizes.add_cells()G3DSizes.add_connectivity_faces()G3DSizes.add_faces()G3DSizes.add_ghost_cells()G3DSizes.add_ghost_nodes()G3DSizes.add_internal_faces()G3DSizes.add_internal_faces_i()G3DSizes.add_internal_faces_j()G3DSizes.add_internal_faces_k()G3DSizes.add_nodes()G3DSizes.n_block_facesG3DSizes.n_boundary_facesG3DSizes.n_cellsG3DSizes.n_connectivity_facesG3DSizes.n_facesG3DSizes.n_ghost_cellsG3DSizes.n_ghost_nodesG3DSizes.n_internal_facesG3DSizes.n_internal_faces_iG3DSizes.n_internal_faces_jG3DSizes.n_internal_faces_kG3DSizes.n_nodesG3DSizes.n_varG3DSizes.subtract_block_faces()G3DSizes.subtract_boundary_faces()G3DSizes.subtract_cells()G3DSizes.subtract_connectivity_faces()G3DSizes.subtract_faces()G3DSizes.subtract_ghost_cells()G3DSizes.subtract_ghost_nodes()G3DSizes.subtract_internal_faces()G3DSizes.subtract_internal_faces_i()G3DSizes.subtract_internal_faces_j()G3DSizes.subtract_internal_faces_k()G3DSizes.subtract_nodes()
- g3d.defs.world.status module
- g3d.defs.world.world module
- Module contents
G3DDisplayG3DIOSettingsG3DIRSMG3DInfoG3DLimitersG3DNumG3DRunOptionsG3DRunOptions.attach_profilerG3DRunOptions.auto_plot_residualsG3DRunOptions.break_residualG3DRunOptions.dim_modeG3DRunOptions.eqn_modeG3DRunOptions.long_optG3DRunOptions.nstepG3DRunOptions.nstep_saveG3DRunOptions.q3d_source_factorG3DRunOptions.restartG3DRunOptions.short_optG3DRunOptions.use_irsmG3DRunOptions.use_residual_breakG3DRunOptions.use_velocity_gradients
G3DSchemeG3DScheme.coef_1G3DScheme.coef_2G3DScheme.coef_3G3DScheme.coef_4G3DScheme.convective_schemeG3DScheme.entropy_damp_coefG3DScheme.get_coefs()G3DScheme.numerical_scheme_report()G3DScheme.set_coefs()G3DScheme.shock_damp_coefG3DScheme.shock_damping_modeG3DScheme.use_density_tvd_limiterG3DScheme.use_turbulence_model_tvd_limiter
G3DSizesG3DSizes.add_block_faces()G3DSizes.add_boundary_faces()G3DSizes.add_cells()G3DSizes.add_connectivity_faces()G3DSizes.add_faces()G3DSizes.add_ghost_cells()G3DSizes.add_ghost_nodes()G3DSizes.add_internal_faces()G3DSizes.add_internal_faces_i()G3DSizes.add_internal_faces_j()G3DSizes.add_internal_faces_k()G3DSizes.add_nodes()G3DSizes.n_block_facesG3DSizes.n_boundary_facesG3DSizes.n_cellsG3DSizes.n_connectivity_facesG3DSizes.n_facesG3DSizes.n_ghost_cellsG3DSizes.n_ghost_nodesG3DSizes.n_internal_facesG3DSizes.n_internal_faces_iG3DSizes.n_internal_faces_jG3DSizes.n_internal_faces_kG3DSizes.n_nodesG3DSizes.n_varG3DSizes.subtract_block_faces()G3DSizes.subtract_boundary_faces()G3DSizes.subtract_cells()G3DSizes.subtract_connectivity_faces()G3DSizes.subtract_faces()G3DSizes.subtract_ghost_cells()G3DSizes.subtract_ghost_nodes()G3DSizes.subtract_internal_faces()G3DSizes.subtract_internal_faces_i()G3DSizes.subtract_internal_faces_j()G3DSizes.subtract_internal_faces_k()G3DSizes.subtract_nodes()
G3DSolverStatusG3DTimeG3DWorld
Submodules
g3d.defs.cflowvar module
CFlow variable placeholder
- class g3d.defs.cflowvar.CFlowStack(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityCFlow variables stack
- Attributes:
tagtag (string) used for identification
varsCFlow variables placeholder
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
init(names)initialize CFlow variables placeholder with specified names
nullify()nullify CFlow variables placeholder
print()nullify CFlow variables placeholder data
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets entity parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'tag' example: set_from_key_value(key, value)
- property vars: CFlowVariables
CFlow variables placeholder
- class g3d.defs.cflowvar.CFlowVar(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityCFlow variable placeholder
- Attributes:
defaultCFlow variable placeholder default value
dimCFlow variable placeholder dimension
long_nameCFlow variable placeholder long name
nameCFlow variable placeholder name
tagtag (string) used for identification
tmpCFlow variable placeholder temporary data
typeCFlow variable placeholder type
valueCFlow variable placeholder value
Methods
backup()backup CFlow variable placeholder data
copy(e)copies data from specified entity input: entity example: copy(e)
get_from_array(idx)CFlow variable placeholder get value from temporary storage
init()initialize CFlow variable placeholder temporary storage
nullify()nullifies CFlow variable placeholder
print()prints CFlow variable data
restore()get CFlow variable placeholder data from backup
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)CFlow variable placeholder set data from key => value input
- property default: float
CFlow variable placeholder default value
- property dim: str
CFlow variable placeholder dimension
- property long_name: str
CFlow variable placeholder long name
- property name: str
CFlow variable placeholder name
- set_from_key_value(key: str, value: Any) bool[source]
CFlow variable placeholder set data from key => value input
- property tmp: float
CFlow variable placeholder temporary data
- property type: Any
CFlow variable placeholder type
- property value: float
CFlow variable placeholder value
- class g3d.defs.cflowvar.CFlowVariables(*args, **kwargs)[source]
Bases:
G3DEntityCFlow variable set placeholder
- Attributes:
Methods
add(*args, **kwargs)add variable to variable set example: add(name="T", long_name="Temperature", type=CFlowVariableType.TEMPERATURE)
arrayify()make all variables arrays if one or more variables are specified as arrays
backup()backup all float variables
copy(e)copies data from specified entity input: entity example: copy(e)
get(name)get variable with specified name input: name example: var = get(name)
get_from_args(*args)get variable values from argument list input: args example: get_from_args(args)
get_from_array(idx)get value from array
get_val(name)get value for variable with specified name input: name example: val = get_val(name)
init(names)initialize placeholder vectors
nullify([name])nullify specified variables input: name (default value = all => all variables will be nullified) example: nullify(name)
print([name])print variable information for all or specified variables in variable set input: name (default value="all") example: print(name)
restore()restore all float variables from backup
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_default(name, value)set default value for variable with specified name input: name, value example: set_default(name, value)
set_from_key_value(key, value)set CFlow variable data from key => value input
set_val(name, value)set value for variable with specified name input: name, value example: set_val(name, value)
- add(*args: Any, **kwargs: Any) CFlowVar[source]
add variable to variable set example: add(name=”T”, long_name=”Temperature”, type=CFlowVariableType.TEMPERATURE)
- get(name: str | int) CFlowVar | None[source]
get variable with specified name input: name example: var = get(name)
- get_from_args(*args: Any) None[source]
get variable values from argument list input: args example: get_from_args(args)
- get_val(name: str | int) float | None[source]
get value for variable with specified name input: name example: val = get_val(name)
- property isscalar: bool
scalar/vector status for current CFlow variable set :return: scalar status (bool)
- property nfvars: int
number of float variables :return: number of float variables (int)
- nullify(name: str | int = 'all') None[source]
nullify specified variables input: name (default value = all => all variables will be nullified) example: nullify(name)
- property nvars: int
number of variables in CFlow variable set :return: number of variables (int)
- print(name: str | int = 'all') None[source]
print variable information for all or specified variables in variable set input: name (default value=”all”) example: print(name)
- set_default(name: str | int, value: float) None[source]
set default value for variable with specified name input: name, value example: set_default(name, value)
- set_from_key_value(key: str, value: Any) bool[source]
set CFlow variable data from key => value input
- set_val(name: str | int, value: float) None[source]
set value for variable with specified name input: name, value example: set_val(name, value)
- property size: int
array length of variables in CFlow variable set (if applicable) :return: size (int)
g3d.defs.common module
G3D common functions
- class g3d.defs.common.G3DConvert[source]
Bases:
objectcollects converters
Methods
dist_to_meter(val[, it])converts length given in a specified dimension to meters input: length, it (default value=0 => meters) it = 0: meter it = 1: cm it = 2: mm it = 3: in it = 4: ft it = 5: m^2 it = 6: cm^2 it = 7: mm^2 it = 8: in^2 it = 9: ft^2
pressure_to_Pascal(val[, it])converts pressure given in a specified dimension to Pascal input: pressure, it (default value=0 => Pascal) it = 0: Pascal it = 1: bar it = 2: atm
temp_to_Kelvin(val[, it])converts temperature given in a specified dimension to Kelvin input: temperature, it (default value=0 => Kelvin) it = 0: Kelvin it = 1: Celsius it = 2: Fahrenheit it = 3: Rankine
- static dist_to_meter(val: float, it: int = 0) float[source]
converts length given in a specified dimension to meters input: length, it (default value=0 => meters) it = 0: meter it = 1: cm it = 2: mm it = 3: in it = 4: ft it = 5: m^2 it = 6: cm^2 it = 7: mm^2 it = 8: in^2 it = 9: ft^2
- class g3d.defs.common.XMLDataItem[source]
Bases:
objectXML data placeholder
- Attributes:
NumberTypenumber type (default value = ‘Float’)
endianendian format (default value = ‘Binary’)
filefile name (default value = ‘msh.bin’)
formatdata format (default value = ‘little’)
n_dimnumber of dimensions (default value = 3)
ninumber of nodes in i-direction
njnumber of nodes in j-direction
nknumber of nodes in k-direction
posmemory pointer
precisiondata precision (default value = ‘8’)
Methods
GetDim()gets XML placeholder dimensions example: ni, nj, nk, n_dim = GetDim() :return: ni (int), nj (int), nk (int), n_dim (int) :rtype: tuple
SetDim(ni, nj, nk, n_dim)updates dimension according to specification :param ni: number of nodes in i-direction :type ni: int :param nj: number of nodes in j-direction :type nj: int :param nk: number of nodes in k-direction :type nk: int :param n_dim: number of dimensions :type n_dim: int example: SetDim(ni, nj, nk, n_dim)
- GetDim() Tuple[int, int, int, int][source]
gets XML placeholder dimensions example: ni, nj, nk, n_dim = GetDim() :return: ni (int), nj (int), nk (int), n_dim (int) :rtype: tuple
- property NumberType: str
number type (default value = ‘Float’)
- SetDim(ni: int, nj: int, nk: int, n_dim: int) None[source]
updates dimension according to specification :param ni: number of nodes in i-direction :type ni: int :param nj: number of nodes in j-direction :type nj: int :param nk: number of nodes in k-direction :type nk: int :param n_dim: number of dimensions :type n_dim: int example: SetDim(ni, nj, nk, n_dim)
- property endian: str
endian format (default value = ‘Binary’)
- property file: str
file name (default value = ‘msh.bin’)
- property format: str
data format (default value = ‘little’)
- property n_dim: int
number of dimensions (default value = 3)
- property ni: int
number of nodes in i-direction
- property nj: int
number of nodes in j-direction
- property nk: int
number of nodes in k-direction
- property pos: int
memory pointer
- property precision: str
data precision (default value = ‘8’)
g3d.defs.enums module
G3D Enum definitions
- class g3d.defs.enums.AngleType(value)
Bases:
EnumAn enumeration.
- DEGREES = 11
- IALT_1 = 1
- IALT_2 = 2
- IALT_3 = 3
- RADIANS = 10
- UNDEFINED = 12
- XY_PLANE = 7
- XZ_PLANE = 9
- X_AXIS = 4
- YZ_PLANE = 8
- Y_AXIS = 5
- Z_AXIS = 6
- class g3d.defs.enums.Axis(value)
Bases:
EnumAn enumeration.
- UNDEFINED = 4
- X_AXIS = 1
- Y_AXIS = 2
- Z_AXIS = 3
- class g3d.defs.enums.BCTypes(value)
Bases:
EnumAn enumeration.
- IOFLOW = 3
- SING = 5
- STREAM_TUBE_WALLS = 6
- SYMM = 4
- UNDEFINED = 1
- WALLS = 2
- class g3d.defs.enums.BinaryFormat(value)
Bases:
EnumAn enumeration.
- G3D_NATIVE = 2
- NATIVE = 1
- UNDEFINED = 4
- XML = 3
- class g3d.defs.enums.BlockFace(value)
Bases:
EnumAn enumeration.
- IHIGH = 2
- ILOW = 1
- JHIGH = 4
- JLOW = 3
- KHIGH = 6
- KLOW = 5
- class g3d.defs.enums.CFlowAdditionMode(value)
Bases:
EnumAn enumeration.
- ABSOLUTE = 2
- FACTOR = 4
- PERCENT = 5
- RELATIVE = 3
- UNDEFINED = 1
- class g3d.defs.enums.CFlowRegime(value)
Bases:
EnumAn enumeration.
- STRONG = 5
- SUBSONIC = 2
- SUPERSONIC = 3
- UNDEFINED = 1
- WEAK = 4
- class g3d.defs.enums.CFlowSolverMode(value)
Bases:
EnumAn enumeration.
- NATIVE_NEWTON = 2
- SCIPY_NEWTON = 3
- UNDEFINED = 1
- class g3d.defs.enums.CFlowVariableType(value)
Bases:
EnumAn enumeration.
- AREA = 7
- DEGREES = 11
- DENSITY = 5
- DIAMETER = 8
- LENGTH = 9
- MASSFLOW = 6
- PRESSURE = 4
- RADIANS = 10
- TEMPERATURE = 3
- UNDEFINED = 1
- VELOCITY = 2
- class g3d.defs.enums.CodeType(value)
Bases:
EnumAn enumeration.
- CALCULATOR = 1
- EMBEDDED = 7
- G2D_SOLVER = 6
- G3D_SOLVER = 3
- MESHER = 2
- Q1D_SOLVER = 5
- Q3D_SOLVER = 4
- UNDEFINED = 8
- class g3d.defs.enums.DIMMode(value)
Bases:
EnumAn enumeration.
- G2D = 2
- G2D_AXISYMM = 3
- G3D = 4
- Q1D = 1
- Q3D = 5
- class g3d.defs.enums.Direction(value)
Bases:
EnumAn enumeration.
- END_INWARD = 10
- END_OUTWARD = 11
- END_TO_START = 7
- NEGATIVE = 4
- POSITIVE = 5
- START_INWARD = 8
- START_OUTWARD = 9
- START_TO_END = 6
- UNDEFINED = 12
- X_DIRECTION = 1
- Y_DIRECTION = 2
- Z_DIRECTION = 3
- class g3d.defs.enums.EQNMode(value)
Bases:
EnumAn enumeration.
- DDES = 8
- DES = 7
- DNS = 3
- EULER = 1
- LES = 6
- NAVIER_STOKES = 2
- RANS = 4
- URANS = 5
- class g3d.defs.enums.FMPTypes(value)
Bases:
EnumAn enumeration.
- BLOCK_INTERFACE = 2
- BOUNDARY = 5
- INTERNAL = 1
- ROTATIONAL_PERIODIC = 3
- TRANSLATIONAL_PERIODIC = 4
- UNDEFINED = 6
- class g3d.defs.enums.FaceOrientation(value)
Bases:
EnumAn enumeration.
- INWARD_FACING_NORMAL = 2
- OUTWARD_FACING_NORMAL = 1
- class g3d.defs.enums.FaceType(value)
Bases:
EnumAn enumeration.
- A_SIDE = 5
- BLOCK_INTERFACE = 7
- B_SIDE = 6
- I_FACE = 2
- J_FACE = 3
- K_FACE = 4
- UNDEFINED = 1
- class g3d.defs.enums.FunctionByPass(value)
Bases:
EnumAn enumeration.
- BYPASS = 3
- EVALUATE = 2
- SELF = 4
- UNDEFINED = 1
- class g3d.defs.enums.GradientMode(value)
Bases:
EnumAn enumeration.
- AVERAGE = 1
- BOUNDARY_EXTRAPOLATE = 2
- BOUNDARY_MIRROR = 3
- class g3d.defs.enums.INTFTypes(value)
Bases:
EnumAn enumeration.
- INTERFACES = 2
- ROTPERINT = 3
- TRANSPERINT = 4
- UNDEFINED = 1
- class g3d.defs.enums.IOFLOWTypes(value)
Bases:
EnumAn enumeration.
- ABSORBING = 2
- MIXED_INFLOW_OUTFLOW = 7
- MIXED_SUBSONIC_SUPERSONIC_OUTFLOW = 8
- SUBSONIC_INFLOW = 3
- SUBSONIC_OUTFLOW = 4
- SUPERSONIC_INFLOW = 5
- SUPERSONIC_OUTFLOW = 6
- UNDEFINED = 1
- class g3d.defs.enums.NUMTypes(value)
Bases:
EnumAn enumeration.
- FIRST_ORDER_UPWIND = 1
- FOURTH_ORDER_CENTRAL = 5
- LOW_DISSIPATION_THIRD_ORDER_UPWIND = 6
- SECOND_ORDER_CENTRAL = 2
- SECOND_ORDER_UPWIND = 3
- THIRD_ORDER_UPWIND = 4
- ULTRA_LOW_DISSIPATION_THIRD_ORDER_UPWIND = 7
- USER_DEFINED = 8
- class g3d.defs.enums.NodeDistribution(value)
Bases:
EnumAn enumeration.
- ARC_1 = 1
- CURVE_1 = 2
- CURVE_10 = 7
- CURVE_2 = 3
- CURVE_3 = 4
- CURVE_4 = 5
- CURVE_5 = 6
- UNDEFINED = 8
- class g3d.defs.enums.Position(value)
Bases:
EnumAn enumeration.
- END = 2
- START = 1
- UNDEFINED = 3
- class g3d.defs.enums.Q1DPipeType(value)
Bases:
EnumAn enumeration.
- CONSTANT_AREA_PIPE = 1
- CONVERGENT_DIVERGENT_PIPE = 4
- CONVERGENT_OR_DIVERGENT_PIPE = 3
- TWO_REGION_PIPE = 2
- class g3d.defs.enums.RampType(value)
Bases:
EnumAn enumeration.
- MACH = 2
- PRESSURE = 3
- TOTAL_PRESSURE = 4
- TOTAL_TEMPERATURE = 5
- UNDEFINED = 1
- class g3d.defs.enums.ShockDampingMode(value)
Bases:
EnumAn enumeration.
- DUCROSS_CELL_GRADIENTS = 3
- DUCROSS_FACE_GRADIENTS = 2
- JAMESON = 1
- class g3d.defs.enums.TIMESTEPTypes(value)
Bases:
EnumAn enumeration.
- LOCAL_TIME_STEPPING = 1
- TIME_ACCURATE_CFL = 2
- TIME_ACCURATE_CONSTANT_TIME_STEP = 3
- class g3d.defs.enums.TimeStepperMode(value)
Bases:
EnumAn enumeration.
- BACKWARD_EULER_DUAL_TIME_STEPPER = 2
- CRANK_NICOLSON_DUAL_TIME_STEPPER = 3
- EXPLICIT_RUNGE_KUTTA = 1
- TURKEL_BACKWARD_EULER_DUAL_TIME_STEPPER = 4
g3d.defs.g3dcode module
G3DCode class definition
- class g3d.defs.g3dcode.G3DCode(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntitybase class for G3D code packages extends G3DEntity
- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
header(*args, **kwargs)prints a header with specified information input: info optional input: dashes (default='='), scrw (default=80), number of blank lines after dashes n_space (default=1) example: header(info='header info')
hline(*args, **kwargs)prints horizontal line optional input (kwargs): dashes (default='-'), scrw (default=80) example: hline(dashes='*', scrw=90)
jobname_append(name)extends jobname with the specified string input: name example: jobname_append(name)
print()prints entity data
set(*args, **kwargs)sets code parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets code parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'verbose', 'silent/quiet', 'jobname', 'working_directory', 'dimension', 'cuda', 'prof' example: set_from_key_value(key, value)
- static header(*args: Any, **kwargs: Any) None[source]
prints a header with specified information input: info optional input: dashes (default=’=’), scrw (default=80), number of blank lines after dashes n_space (default=1) example: header(info=’header info’)
- static hline(*args: Any, **kwargs: Any) None[source]
prints horizontal line optional input (kwargs): dashes (default=’-‘), scrw (default=80) example: hline(dashes=’*’, scrw=90)
- jobname_append(name: str) None[source]
extends jobname with the specified string input: name example: jobname_append(name)
g3d.defs.g3dentity module
G3DEntity class definition
- class g3d.defs.g3dentity.G3DEntity(*args: Any, **kwargs: Any)[source]
Bases:
objectbase class for any G3D entity/container
- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
print()prints entity data
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets entity parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'tag' example: set_from_key_value(key, value)
- set(*args: Any, **kwargs: Any) None[source]
sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
- set_from_key_value(key: str, value: Any) bool[source]
sets entity parameters from specified key => value data input: key, value valid keys for G3DCode base class: ‘tag’ example: set_from_key_value(key, value)
- property tag: str
tag (string) used for identification
g3d.defs.g3dramp module
G3DRamp class definition
- class g3d.defs.g3dramp.G3DRamp(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityG3DRamp base class extends G3DEntity
- Attributes:
end_iterramp end iteration (ramp function will be deactivated at
end_valramp end value
start_iterramp start iteration (ramp function will be activated at
start_valramp start value
tagtag (string) used for identification
typeramp type (Enum, default value = RampType.UNDEFINED)
Methods
copy(r)copies data from specified entity input: entity example: copy(e)
get_val()gets ramp value based on solver iteration no input
print()prints entity data
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets code parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'ramp_type', 'start_value', 'end_value', 'start_iter', 'end_iter' example: set_from_key_value(key, value)
- property end_iter: int
ramp end iteration (ramp function will be deactivated at the specified iteration)
- property end_val: float
ramp end value
- set_from_key_value(key: str, value: Any) bool[source]
sets code parameters from specified key => value data input: key, value valid keys for G3DCode base class: ‘ramp_type’, ‘start_value’, ‘end_value’, ‘start_iter’, ‘end_iter’ example: set_from_key_value(key, value)
- property start_iter: int
ramp start iteration (ramp function will be activated at the specified iteration)
- property start_val: float
ramp start value
- property type: Any
ramp type (Enum, default value = RampType.UNDEFINED) valid options: UNDEFINED, MACH, PRESSURE, TOTAL_PRESSURE, TOTAL_TEMPERATURE
Module contents
g3d/defs sub library
- class g3d.defs.AngleType(value)
Bases:
EnumAn enumeration.
- DEGREES = 11
- IALT_1 = 1
- IALT_2 = 2
- IALT_3 = 3
- RADIANS = 10
- UNDEFINED = 12
- XY_PLANE = 7
- XZ_PLANE = 9
- X_AXIS = 4
- YZ_PLANE = 8
- Y_AXIS = 5
- Z_AXIS = 6
- class g3d.defs.Axis(value)
Bases:
EnumAn enumeration.
- UNDEFINED = 4
- X_AXIS = 1
- Y_AXIS = 2
- Z_AXIS = 3
- class g3d.defs.BCTypes(value)
Bases:
EnumAn enumeration.
- IOFLOW = 3
- SING = 5
- STREAM_TUBE_WALLS = 6
- SYMM = 4
- UNDEFINED = 1
- WALLS = 2
- class g3d.defs.BinaryFormat(value)
Bases:
EnumAn enumeration.
- G3D_NATIVE = 2
- NATIVE = 1
- UNDEFINED = 4
- XML = 3
- class g3d.defs.BlockFace(value)
Bases:
EnumAn enumeration.
- IHIGH = 2
- ILOW = 1
- JHIGH = 4
- JLOW = 3
- KHIGH = 6
- KLOW = 5
- class g3d.defs.CFlowAdditionMode(value)
Bases:
EnumAn enumeration.
- ABSOLUTE = 2
- FACTOR = 4
- PERCENT = 5
- RELATIVE = 3
- UNDEFINED = 1
- class g3d.defs.CFlowRegime(value)
Bases:
EnumAn enumeration.
- STRONG = 5
- SUBSONIC = 2
- SUPERSONIC = 3
- UNDEFINED = 1
- WEAK = 4
- class g3d.defs.CFlowSolverMode(value)
Bases:
EnumAn enumeration.
- NATIVE_NEWTON = 2
- SCIPY_NEWTON = 3
- UNDEFINED = 1
- class g3d.defs.CFlowStack(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityCFlow variables stack
- Attributes:
tagtag (string) used for identification
varsCFlow variables placeholder
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
init(names)initialize CFlow variables placeholder with specified names
nullify()nullify CFlow variables placeholder
print()nullify CFlow variables placeholder data
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets entity parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'tag' example: set_from_key_value(key, value)
- property vars: CFlowVariables
CFlow variables placeholder
- class g3d.defs.CFlowVar(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityCFlow variable placeholder
- Attributes:
defaultCFlow variable placeholder default value
dimCFlow variable placeholder dimension
long_nameCFlow variable placeholder long name
nameCFlow variable placeholder name
tagtag (string) used for identification
tmpCFlow variable placeholder temporary data
typeCFlow variable placeholder type
valueCFlow variable placeholder value
Methods
backup()backup CFlow variable placeholder data
copy(e)copies data from specified entity input: entity example: copy(e)
get_from_array(idx)CFlow variable placeholder get value from temporary storage
init()initialize CFlow variable placeholder temporary storage
nullify()nullifies CFlow variable placeholder
print()prints CFlow variable data
restore()get CFlow variable placeholder data from backup
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)CFlow variable placeholder set data from key => value input
- property default: float
CFlow variable placeholder default value
- property dim: str
CFlow variable placeholder dimension
- property long_name: str
CFlow variable placeholder long name
- property name: str
CFlow variable placeholder name
- set_from_key_value(key: str, value: Any) bool[source]
CFlow variable placeholder set data from key => value input
- property tmp: float
CFlow variable placeholder temporary data
- property type: Any
CFlow variable placeholder type
- property value: float
CFlow variable placeholder value
- class g3d.defs.CFlowVariableType(value)
Bases:
EnumAn enumeration.
- AREA = 7
- DEGREES = 11
- DENSITY = 5
- DIAMETER = 8
- LENGTH = 9
- MASSFLOW = 6
- PRESSURE = 4
- RADIANS = 10
- TEMPERATURE = 3
- UNDEFINED = 1
- VELOCITY = 2
- class g3d.defs.CFlowVariables(*args, **kwargs)[source]
Bases:
G3DEntityCFlow variable set placeholder
- Attributes:
Methods
add(*args, **kwargs)add variable to variable set example: add(name="T", long_name="Temperature", type=CFlowVariableType.TEMPERATURE)
arrayify()make all variables arrays if one or more variables are specified as arrays
backup()backup all float variables
copy(e)copies data from specified entity input: entity example: copy(e)
get(name)get variable with specified name input: name example: var = get(name)
get_from_args(*args)get variable values from argument list input: args example: get_from_args(args)
get_from_array(idx)get value from array
get_val(name)get value for variable with specified name input: name example: val = get_val(name)
init(names)initialize placeholder vectors
nullify([name])nullify specified variables input: name (default value = all => all variables will be nullified) example: nullify(name)
print([name])print variable information for all or specified variables in variable set input: name (default value="all") example: print(name)
restore()restore all float variables from backup
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_default(name, value)set default value for variable with specified name input: name, value example: set_default(name, value)
set_from_key_value(key, value)set CFlow variable data from key => value input
set_val(name, value)set value for variable with specified name input: name, value example: set_val(name, value)
- add(*args: Any, **kwargs: Any) CFlowVar[source]
add variable to variable set example: add(name=”T”, long_name=”Temperature”, type=CFlowVariableType.TEMPERATURE)
- get(name: str | int) CFlowVar | None[source]
get variable with specified name input: name example: var = get(name)
- get_from_args(*args: Any) None[source]
get variable values from argument list input: args example: get_from_args(args)
- get_val(name: str | int) float | None[source]
get value for variable with specified name input: name example: val = get_val(name)
- property isscalar: bool
scalar/vector status for current CFlow variable set :return: scalar status (bool)
- property nfvars: int
number of float variables :return: number of float variables (int)
- nullify(name: str | int = 'all') None[source]
nullify specified variables input: name (default value = all => all variables will be nullified) example: nullify(name)
- property nvars: int
number of variables in CFlow variable set :return: number of variables (int)
- print(name: str | int = 'all') None[source]
print variable information for all or specified variables in variable set input: name (default value=”all”) example: print(name)
- set_default(name: str | int, value: float) None[source]
set default value for variable with specified name input: name, value example: set_default(name, value)
- set_from_key_value(key: str, value: Any) bool[source]
set CFlow variable data from key => value input
- set_val(name: str | int, value: float) None[source]
set value for variable with specified name input: name, value example: set_val(name, value)
- property size: int
array length of variables in CFlow variable set (if applicable) :return: size (int)
- class g3d.defs.CodeType(value)
Bases:
EnumAn enumeration.
- CALCULATOR = 1
- EMBEDDED = 7
- G2D_SOLVER = 6
- G3D_SOLVER = 3
- MESHER = 2
- Q1D_SOLVER = 5
- Q3D_SOLVER = 4
- UNDEFINED = 8
- class g3d.defs.DIMMode(value)
Bases:
EnumAn enumeration.
- G2D = 2
- G2D_AXISYMM = 3
- G3D = 4
- Q1D = 1
- Q3D = 5
- class g3d.defs.Direction(value)
Bases:
EnumAn enumeration.
- END_INWARD = 10
- END_OUTWARD = 11
- END_TO_START = 7
- NEGATIVE = 4
- POSITIVE = 5
- START_INWARD = 8
- START_OUTWARD = 9
- START_TO_END = 6
- UNDEFINED = 12
- X_DIRECTION = 1
- Y_DIRECTION = 2
- Z_DIRECTION = 3
- class g3d.defs.EQNMode(value)
Bases:
EnumAn enumeration.
- DDES = 8
- DES = 7
- DNS = 3
- EULER = 1
- LES = 6
- NAVIER_STOKES = 2
- RANS = 4
- URANS = 5
- class g3d.defs.FMPTypes(value)
Bases:
EnumAn enumeration.
- BLOCK_INTERFACE = 2
- BOUNDARY = 5
- INTERNAL = 1
- ROTATIONAL_PERIODIC = 3
- TRANSLATIONAL_PERIODIC = 4
- UNDEFINED = 6
- class g3d.defs.FaceOrientation(value)
Bases:
EnumAn enumeration.
- INWARD_FACING_NORMAL = 2
- OUTWARD_FACING_NORMAL = 1
- class g3d.defs.FaceType(value)
Bases:
EnumAn enumeration.
- A_SIDE = 5
- BLOCK_INTERFACE = 7
- B_SIDE = 6
- I_FACE = 2
- J_FACE = 3
- K_FACE = 4
- UNDEFINED = 1
- class g3d.defs.FunctionByPass(value)
Bases:
EnumAn enumeration.
- BYPASS = 3
- EVALUATE = 2
- SELF = 4
- UNDEFINED = 1
- class g3d.defs.G3DCode(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntitybase class for G3D code packages extends G3DEntity
- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
header(*args, **kwargs)prints a header with specified information input: info optional input: dashes (default='='), scrw (default=80), number of blank lines after dashes n_space (default=1) example: header(info='header info')
hline(*args, **kwargs)prints horizontal line optional input (kwargs): dashes (default='-'), scrw (default=80) example: hline(dashes='*', scrw=90)
jobname_append(name)extends jobname with the specified string input: name example: jobname_append(name)
print()prints entity data
set(*args, **kwargs)sets code parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets code parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'verbose', 'silent/quiet', 'jobname', 'working_directory', 'dimension', 'cuda', 'prof' example: set_from_key_value(key, value)
- static header(*args: Any, **kwargs: Any) None[source]
prints a header with specified information input: info optional input: dashes (default=’=’), scrw (default=80), number of blank lines after dashes n_space (default=1) example: header(info=’header info’)
- static hline(*args: Any, **kwargs: Any) None[source]
prints horizontal line optional input (kwargs): dashes (default=’-‘), scrw (default=80) example: hline(dashes=’*’, scrw=90)
- jobname_append(name: str) None[source]
extends jobname with the specified string input: name example: jobname_append(name)
- class g3d.defs.G3DConvert[source]
Bases:
objectcollects converters
Methods
dist_to_meter(val[, it])converts length given in a specified dimension to meters input: length, it (default value=0 => meters) it = 0: meter it = 1: cm it = 2: mm it = 3: in it = 4: ft it = 5: m^2 it = 6: cm^2 it = 7: mm^2 it = 8: in^2 it = 9: ft^2
pressure_to_Pascal(val[, it])converts pressure given in a specified dimension to Pascal input: pressure, it (default value=0 => Pascal) it = 0: Pascal it = 1: bar it = 2: atm
temp_to_Kelvin(val[, it])converts temperature given in a specified dimension to Kelvin input: temperature, it (default value=0 => Kelvin) it = 0: Kelvin it = 1: Celsius it = 2: Fahrenheit it = 3: Rankine
- static dist_to_meter(val: float, it: int = 0) float[source]
converts length given in a specified dimension to meters input: length, it (default value=0 => meters) it = 0: meter it = 1: cm it = 2: mm it = 3: in it = 4: ft it = 5: m^2 it = 6: cm^2 it = 7: mm^2 it = 8: in^2 it = 9: ft^2
- class g3d.defs.G3DDisplay[source]
Bases:
objectG3D display placeholder
- Attributes:
plot_edgesplot_edges = True => mesh block edges will be printed on
print_iterationsprint_iterations = True => residuals will be printed every
print_splashprint_splash = True => code splash (logo) will be printed
progress_barprogress_bar = True => progress bar will be printed to std out
scrwscreen width (default value = 80)
silentsilent = True => limited solver output (default value = False)
verboseverbose = True => more printed output (default value = False)
Methods
author()prints author/developer information to std out input: no input example: author()
header(*args, **kwargs)prints header to std out input: args, kwargs args: info (header text (string)), dashes (default = '='), scrw (default = 80 or earlier specified scrw value) kwargs: 'info', 'dashes', 'scrw' example: header(args, kwargs)
hline(*args, **kwargs)prints horizontal line on screen input: args, kwargs args: dash (default = '-'), scrw (default = 80 or earlier specified scrw value) kwargs: 'dashes', 'scrw' example: hline(args, kwargs)
logo()prints logo to std out logos defined for CFLOW, G3DMESH & G3DFLOW input: no input example: logo()
splash()prints code splash to std out logo (code specific), code version & author information input: no input example: splash()
- static author()[source]
prints author/developer information to std out input: no input example: author()
- header(*args: Any, **kwargs: Any) None[source]
prints header to std out input: args, kwargs args: info (header text (string)), dashes (default = ‘=’), scrw (default = 80 or earlier specified scrw value) kwargs: ‘info’, ‘dashes’, ‘scrw’ example: header(args, kwargs)
- hline(*args: Any, **kwargs: Any) None[source]
prints horizontal line on screen input: args, kwargs args: dash (default = ‘-‘), scrw (default = 80 or earlier specified scrw value) kwargs: ‘dashes’, ‘scrw’ example: hline(args, kwargs)
- static logo() None[source]
prints logo to std out logos defined for CFLOW, G3DMESH & G3DFLOW input: no input example: logo()
- property plot_edges: bool
plot_edges = True => mesh block edges will be printed on mesh plot (default value = False)
- property print_iterations: bool
print_iterations = True => residuals will be printed every iteration (default value = False)
- property print_splash: bool
print_splash = True => code splash (logo) will be printed on solver start (default value = True)
- property progress_bar: bool
progress_bar = True => progress bar will be printed to std out (default value = False)
- property scrw: int
screen width (default value = 80)
- property silent: bool
silent = True => limited solver output (default value = False)
- splash() None[source]
prints code splash to std out logo (code specific), code version & author information input: no input example: splash()
- property verbose: bool
verbose = True => more printed output (default value = False)
- class g3d.defs.G3DEntity(*args: Any, **kwargs: Any)[source]
Bases:
objectbase class for any G3D entity/container
- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
print()prints entity data
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets entity parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'tag' example: set_from_key_value(key, value)
- set(*args: Any, **kwargs: Any) None[source]
sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
- set_from_key_value(key: str, value: Any) bool[source]
sets entity parameters from specified key => value data input: key, value valid keys for G3DCode base class: ‘tag’ example: set_from_key_value(key, value)
- property tag: str
tag (string) used for identification
- class g3d.defs.G3DIOSettings[source]
Bases:
objectG3D I/O placeholder
- Attributes:
jobnamejobname (default value = g3dflow)
mshmesh file name (default value = ‘g3d.msh’)
prev_solution_foldername of folder where the previous solver state (solution files) was stored
save_all_filessave_all_files = True => old files will not be replaced by new files
sol_dirsolution files directory (default value = ‘’)
topotopology file name (default value = ‘g3d.topo’)
wdworking directory (default value = ./WD)
working_directorysame as wd
- property jobname: str
- property msh: str
mesh file name (default value = ‘g3d.msh’)
- property prev_solution_folder: str
name of folder where the previous solver state (solution files) was stored
- property save_all_files: bool
save_all_files = True => old files will not be replaced by new files (default value = False)
- property sol_dir: str
solution files directory (default value = ‘’)
- property topo: str
topology file name (default value = ‘g3d.topo’)
- property wd: str
working directory (default value = ./WD)
- property working_directory: str
same as wd
- class g3d.defs.G3DIRSM[source]
Bases:
objectG3D Implicit Residual Smoothing (IRSM) placeholder
- Attributes:
cfl_activateIRSM activation CFL value (default 1.0)
cfl_critIRSM critical CFL value (default 1.2)
cfl_maxIRSM critical CFL max (default 0.0)
irsm_lambdaIRMS lambda value (default lambda = 1.0)
lambda_factorIRSM lambda factor (default 0.25)
lambda_maxIRSM lambda max value (default 0.0)
lambda_minIRSM lambda min value (default 1.0)
lambda_specified_by_userIRSM lambda has been specified by user (default = False)
relaxIRSM under relaxation factor (default 0.9)
Methods
update IRSM lambda value input: no input needed example: update_lambda()
- property cfl_activate: float
IRSM activation CFL value (default 1.0)
- property cfl_crit: float
IRSM critical CFL value (default 1.2)
- property cfl_max: float
IRSM critical CFL max (default 0.0)
- property irsm_lambda: float
IRMS lambda value (default lambda = 1.0)
- property lambda_factor: float
IRSM lambda factor (default 0.25)
- property lambda_max: float
IRSM lambda max value (default 0.0)
- property lambda_min: float
IRSM lambda min value (default 1.0)
- property lambda_specified_by_user: bool
IRSM lambda has been specified by user (default = False)
- property relax: float
IRSM under relaxation factor (default 0.9)
- class g3d.defs.G3DInfo[source]
Bases:
objectG3D code information placeholder
- Attributes:
authorcode author information
code_descriptionshort code description
code_namecode name
code_sub_descriptionadditional code description
code_typecode type (default value = CodeType.G3D_SOLVER)
datedate of latest code release
info_strcode information string
versioncode version
- property author: list[str]
code author information
- property code_description: str
short code description
- property code_name: str
code name
- property code_sub_description: str
additional code description
- property code_type: Any
code type (default value = CodeType.G3D_SOLVER)
- property date: str
date of latest code release
- property info_str: str
code information string code name, code version, date of latest release
- property version: str
code version
- class g3d.defs.G3DLimiters[source]
Bases:
objectG3D limiters placeholder
- Attributes:
- property p_max: float
maximum pressure (default None)
- property p_min: float
minimum pressure (default None)
- property t_max: float
maximum temperature (default None)
- property t_min: float
minimum temperature (default None)
- class g3d.defs.G3DModels[source]
Bases:
objectG3D model settings placeholder
- Attributes:
turbulence_modelturbulence model type (Enum, default value = TurbulenceModelMode.NO_TURBULENCE_MODEL)
- property turbulence_model: Any
turbulence model type (Enum, default value = TurbulenceModelMode.NO_TURBULENCE_MODEL)
- class g3d.defs.G3DNum[source]
Bases:
objectG3D numerics placeholder
- Attributes:
- property limiters: G3DLimiters
instance of G3D limiters placeholder
- class g3d.defs.G3DRamp(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityG3DRamp base class extends G3DEntity
- Attributes:
end_iterramp end iteration (ramp function will be deactivated at
end_valramp end value
start_iterramp start iteration (ramp function will be activated at
start_valramp start value
tagtag (string) used for identification
typeramp type (Enum, default value = RampType.UNDEFINED)
Methods
copy(r)copies data from specified entity input: entity example: copy(e)
get_val()gets ramp value based on solver iteration no input
print()prints entity data
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_from_key_value(key, value)sets code parameters from specified key => value data input: key, value valid keys for G3DCode base class: 'ramp_type', 'start_value', 'end_value', 'start_iter', 'end_iter' example: set_from_key_value(key, value)
- property end_iter: int
ramp end iteration (ramp function will be deactivated at the specified iteration)
- property end_val: float
ramp end value
- set_from_key_value(key: str, value: Any) bool[source]
sets code parameters from specified key => value data input: key, value valid keys for G3DCode base class: ‘ramp_type’, ‘start_value’, ‘end_value’, ‘start_iter’, ‘end_iter’ example: set_from_key_value(key, value)
- property start_iter: int
ramp start iteration (ramp function will be activated at the specified iteration)
- property start_val: float
ramp start value
- property type: Any
ramp type (Enum, default value = RampType.UNDEFINED) valid options: UNDEFINED, MACH, PRESSURE, TOTAL_PRESSURE, TOTAL_TEMPERATURE
- class g3d.defs.G3DRunOptions[source]
Bases:
objectG3D run options placeholder
- Attributes:
attach_profilerattach_profiler = True => profiler will be deployed on execution
auto_plot_residualsauto_plot_residuals = True => residual plots will be generated
break_residualtarget residual value for which the solver execution will be stopped
dim_modesolver dimension mode (Enum, default value = DIMMode.G3D)
eqn_modesolver equation mode (Enum, default value = EQNMode.DNS)
long_optlong option string (descriptive options)
nstepnumber of solver iterations
nstep_savenumber of solver iterations between each save of solver state (flow field)
q3d_source_factorsource term factor used for the quasi-three-dimensional (Q3D) solver
restartrestart = True => solver will start from previously stored flow state if applicable
short_optshort option string (one letter options)
use_irsmuse_irsm = True => implicit residual smoothing will be applied
use_residual_breakuse_residual_break = True => solver execution will be stopped if reaching the target residual
use_velocity_gradientsuse_velocity_gradients = True => velocity gradients will be calculated as part of flux evaluation
- property attach_profiler: bool
attach_profiler = True => profiler will be deployed on execution (default value = False)
- property auto_plot_residuals: bool
auto_plot_residuals = True => residual plots will be generated automatically (default value = False)
- property break_residual: float
target residual value for which the solver execution will be stopped (default value = 1.e-7)
- property dim_mode: Any
solver dimension mode (Enum, default value = DIMMode.G3D) valid options: Q1D, G2D, G2D_AXISYMM, G3D, Q3D
- property eqn_mode: Any
solver equation mode (Enum, default value = EQNMode.DNS) valid options: EULER, NAVIER_STOKES, DNS, RANS, URANS, LES, DES, DDES
- property long_opt: list[str]
long option string (descriptive options)
- property nstep: int
number of solver iterations
- property nstep_save: int
number of solver iterations between each save of solver state (flow field)
- property q3d_source_factor: float
source term factor used for the quasi-three-dimensional (Q3D) solver (default value = 0.95)
- property restart: bool
restart = True => solver will start from previously stored flow state if applicable (default value = True)
- property short_opt: str
short option string (one letter options)
- property use_irsm: bool
use_irsm = True => implicit residual smoothing will be applied (default value = False, can be triggered by, for example, setting a CFL number greater than 1.0)
- property use_residual_break: bool
use_residual_break = True => solver execution will be stopped if reaching the target residual (default value = False)
- property use_velocity_gradients: bool
use_velocity_gradients = True => velocity gradients will be calculated as part of flux evaluation (default value = False - depending on solver settings)
- class g3d.defs.G3DScheme[source]
Bases:
objectG3D numerical scheme placeholder
- Attributes:
coef_1convective scheme coefficient 1 (of four coefficients defining the scheme)
coef_2convective scheme coefficient 2 (of four coefficients defining the scheme)
coef_3convective scheme coefficient 3 (of four coefficients defining the scheme)
coef_4convective scheme coefficient 4 (of four coefficients defining the scheme)
convective_schemeconvective scheme of G3DFlow cfd solver
entropy_damp_coefentropy damping coefficient (default value = 0.0)
shock_damp_coefshock damping coefficient (default value = 0.0)
shock_damping_modeshock damping mode (Enum, default value = ShockDampingMode.JAMESON)
use_density_tvd_limiteruse density TVD limiter (default value = False)
use_turbulence_model_tvd_limiteruse turbulence model TVD limiter (default value = False)
Methods
returns an array with coefficients of the convective scheme input: no input example: [c1, c2, c3, c4] = get_coefs()
prints solver convective scheme input: no input
set_coefs(c1, c2, c3, c4)defining convective scheme by specifying four coefficients input: coefficients (c1, c2, c3, c4)
- property coef_1: float
convective scheme coefficient 1 (of four coefficients defining the scheme)
- property coef_2: float
convective scheme coefficient 2 (of four coefficients defining the scheme)
- property coef_3: float
convective scheme coefficient 3 (of four coefficients defining the scheme)
- property coef_4: float
convective scheme coefficient 4 (of four coefficients defining the scheme)
- property convective_scheme: Any
convective scheme of G3DFlow cfd solver
- property entropy_damp_coef: float
entropy damping coefficient (default value = 0.0)
- get_coefs() ndarray[source]
returns an array with coefficients of the convective scheme input: no input example: [c1, c2, c3, c4] = get_coefs()
- set_coefs(c1: float, c2: float, c3: float, c4: float) None[source]
defining convective scheme by specifying four coefficients input: coefficients (c1, c2, c3, c4)
- property shock_damp_coef: float
shock damping coefficient (default value = 0.0)
- property shock_damping_mode: Any
shock damping mode (Enum, default value = ShockDampingMode.JAMESON) valid options: JAMESON, DUCROSS_FACE_GRADIENTS, DUCROSS_CELL_GRADIENTS
- property use_density_tvd_limiter: bool
use density TVD limiter (default value = False)
- property use_turbulence_model_tvd_limiter: bool
use turbulence model TVD limiter (default value = False)
- class g3d.defs.G3DSizes[source]
Bases:
objectG3D sizes placeholder
- Attributes:
n_block_facestotal number of block cell faces
n_boundary_facestotal number of boundary cell faces
n_cellstotal number of cells
n_connectivity_facestotal number of block connectivity cell faces
n_facestotal number of cell faces
n_ghost_cellstotal number of ghost cells
n_ghost_nodestotal number of ghost nodes
n_internal_facestotal number of internal cell faces
n_internal_faces_itotal number of internal i-direction cell faces
n_internal_faces_jtotal number of internal j-direction cell faces
n_internal_faces_ktotal number of internal k-direction cell faces
n_nodestotal number of nodes
n_vartotal number of solver variables
Methods
adds faces to total block face count input: n (number of faces to be added) example: add_block_faces(n)
adds faces to total boundary face count input: n (number of faces to be added) example: add_boundary_faces(n)
add_cells(n)adds cells to total cell count input: n (number of cells to be added) example: add_cells(n)
adds faces to total connectivity face count input: n (number of faces to be added) example: add_connectivity_faces(n)
add_faces(n)adds faces to total face count input: n (number of faces to be added) example: add_faces(n)
adds cells to total ghost cell count input: n (number of cells to be added) example: add_ghost_cells(n)
adds nodes to total ghost node count input: n (number of nodes to be added) example: add_ghost_nodes(n)
adds faces to total internal face count input: n (number of faces to be added) example: add_internal_faces(n)
adds faces to total i-direction internal face count input: n (number of faces to be added) example: add_internal_faces_i(n)
adds faces to total j-direction internal face count input: n (number of faces to be added) example: add_internal_faces_j(n)
adds faces to total k-direction internal face count input: n (number of faces to be added) example: add_internal_faces_k(n)
add_nodes(n)adds nodes to total node count input: n (number of nodes to be added) example: add_nodes(n)
subtracts faces to total block face count input: n (number of faces to be subtracted) example: add_block_faces(n)
subtracts faces to total boundary face count input: n (number of faces to be subtracted) example: add_boundary_faces(n)
subtracts cells to total cell count input: n (number of cells to be subtracted) example: add_cells(n)
subtracts faces to total connectivity face count input: n (number of faces to be subtracted) example: add_connectivity_faces(n)
subtracts faces to total face count input: n (number of faces to be subtracted) example: add_faces(n)
subtracts cells to total ghost cell count input: n (number of cells to be subtracted) example: add_ghost_cells(n)
subtracts cells to total ghost cell count input: n (number of cells to be subtracted) example: add_ghost_cells(n)
subtracts faces to total internal face count input: n (number of faces to be subtracted) example: add_internal_faces(n)
subtracts faces to total i-direction internal face count input: n (number of faces to be subtracted) example: add_internal_faces_i(n)
subtracts faces to total j-direction internal face count input: n (number of faces to be subtracted) example: add_internal_faces_j(n)
subtracts faces to total k-direction internal face count input: n (number of faces to be subtracted) example: add_internal_faces_k(n)
subtract nodes to total node count input: n (number of nodes to be subtracted) example: subtract_nodes(n)
- add_block_faces(n: int) None[source]
adds faces to total block face count input: n (number of faces to be added) example: add_block_faces(n)
- add_boundary_faces(n: int) None[source]
adds faces to total boundary face count input: n (number of faces to be added) example: add_boundary_faces(n)
- add_cells(n: int) None[source]
adds cells to total cell count input: n (number of cells to be added) example: add_cells(n)
- add_connectivity_faces(n: int) None[source]
adds faces to total connectivity face count input: n (number of faces to be added) example: add_connectivity_faces(n)
- add_faces(n: int) None[source]
adds faces to total face count input: n (number of faces to be added) example: add_faces(n)
- add_ghost_cells(n: int) None[source]
adds cells to total ghost cell count input: n (number of cells to be added) example: add_ghost_cells(n)
- add_ghost_nodes(n: int) None[source]
adds nodes to total ghost node count input: n (number of nodes to be added) example: add_ghost_nodes(n)
- add_internal_faces(n: int) None[source]
adds faces to total internal face count input: n (number of faces to be added) example: add_internal_faces(n)
- add_internal_faces_i(n: int) None[source]
adds faces to total i-direction internal face count input: n (number of faces to be added) example: add_internal_faces_i(n)
- add_internal_faces_j(n: int) None[source]
adds faces to total j-direction internal face count input: n (number of faces to be added) example: add_internal_faces_j(n)
- add_internal_faces_k(n: int) None[source]
adds faces to total k-direction internal face count input: n (number of faces to be added) example: add_internal_faces_k(n)
- add_nodes(n: int) None[source]
adds nodes to total node count input: n (number of nodes to be added) example: add_nodes(n)
- property n_block_faces: int
total number of block cell faces
- property n_boundary_faces: int
total number of boundary cell faces
- property n_cells: int
total number of cells
- property n_connectivity_faces: int
total number of block connectivity cell faces
- property n_faces: int
total number of cell faces
- property n_ghost_cells: int
total number of ghost cells
- property n_ghost_nodes: int
total number of ghost nodes
- property n_internal_faces: int
total number of internal cell faces
- property n_internal_faces_i: int
total number of internal i-direction cell faces
- property n_internal_faces_j: int
total number of internal j-direction cell faces
- property n_internal_faces_k: int
total number of internal k-direction cell faces
- property n_nodes: int
total number of nodes
- property n_var: int
total number of solver variables
- subtract_block_faces(n: int) None[source]
subtracts faces to total block face count input: n (number of faces to be subtracted) example: add_block_faces(n)
- subtract_boundary_faces(n: int) None[source]
subtracts faces to total boundary face count input: n (number of faces to be subtracted) example: add_boundary_faces(n)
- subtract_cells(n: int) None[source]
subtracts cells to total cell count input: n (number of cells to be subtracted) example: add_cells(n)
- subtract_connectivity_faces(n: int) None[source]
subtracts faces to total connectivity face count input: n (number of faces to be subtracted) example: add_connectivity_faces(n)
- subtract_faces(n: int) None[source]
subtracts faces to total face count input: n (number of faces to be subtracted) example: add_faces(n)
- subtract_ghost_cells(n: int) None[source]
subtracts cells to total ghost cell count input: n (number of cells to be subtracted) example: add_ghost_cells(n)
- subtract_ghost_nodes(n: int) None[source]
subtracts cells to total ghost cell count input: n (number of cells to be subtracted) example: add_ghost_cells(n)
- subtract_internal_faces(n: int) None[source]
subtracts faces to total internal face count input: n (number of faces to be subtracted) example: add_internal_faces(n)
- subtract_internal_faces_i(n: int) None[source]
subtracts faces to total i-direction internal face count input: n (number of faces to be subtracted) example: add_internal_faces_i(n)
- subtract_internal_faces_j(n: int) None[source]
subtracts faces to total j-direction internal face count input: n (number of faces to be subtracted) example: add_internal_faces_j(n)
- class g3d.defs.G3DSolverStatus[source]
Bases:
objectG3D solver status placeholder
- Attributes:
curitercompleted iterations at last solver state save
istepnumber of iterations since start
istep_savenumber of iterations since last solver state save
residualsolver residual
timesimulated time
- property curiter: int
completed iterations at last solver state save
- property istep: int
number of iterations since start
- property istep_save: int
number of iterations since last solver state save
- property residual: float
solver residual
- property time: float
simulated time
- class g3d.defs.G3DTime[source]
Bases:
objectG3D time placeholder
- Attributes:
cflsolver CFL number (default value = 0.9)
dtimesolver time step (used in combination with time-accurate time mode)
n_sub_itermaximum number of subiterations (used in combination with dual time stepping time mode)
time_modesolver time mode (Enum, default value = TIMESTEPTypes.LOCAL_TIME_STEPPING)
time_stepper_modesolver time stepper mode (Enum, default value = TimeStepperMode.EXPLICIT_RUNGE_KUTTA)
- property cfl: float
solver CFL number (default value = 0.9)
- property dtime: float
solver time step (used in combination with time-accurate time mode)
- property n_sub_iter: int
maximum number of subiterations (used in combination with dual time stepping time mode)
- property time_mode: Any
solver time mode (Enum, default value = TIMESTEPTypes.LOCAL_TIME_STEPPING) valid options: LOCAL_TIME_STEPPING, TIME_ACCURATE_CFL, TIME_ACCURATE_CONSTANT_TIME_STEP
- property time_stepper_mode: Any
solver time stepper mode (Enum, default value = TimeStepperMode.EXPLICIT_RUNGE_KUTTA) valid options: EXPLICIT_RUNGE_KUTTA, BACKWARD_EULER_DUAL_TIME_STEPPER, CRANK_NICOLSON_DUAL_TIME_STEPPER, TURKEL_BACKWARD_EULER_DUAL_TIME_STEPPER
- class g3d.defs.G3DWorld[source]
Bases:
objectG3D World placeholder
- Attributes:
displayinstance of G3D display placeholder
infoinstance of G3D info placeholder
ioinstance of G3D I/O placeholder
modelsinstance of G3D models placeholder
numinstance of G3D numerics placeholder
optionsinstance of G3D options placeholder
sizesinstance of G3D sizes placeholder
statusinstance of G3D status placeholder
- property display: G3DDisplay
instance of G3D display placeholder
- property io: G3DIOSettings
instance of G3D I/O placeholder
- property options: G3DRunOptions
instance of G3D options placeholder
- property status: G3DSolverStatus
instance of G3D status placeholder
- class g3d.defs.GradientMode(value)
Bases:
EnumAn enumeration.
- AVERAGE = 1
- BOUNDARY_EXTRAPOLATE = 2
- BOUNDARY_MIRROR = 3
- class g3d.defs.INTFTypes(value)
Bases:
EnumAn enumeration.
- INTERFACES = 2
- ROTPERINT = 3
- TRANSPERINT = 4
- UNDEFINED = 1
- class g3d.defs.IOFLOWTypes(value)
Bases:
EnumAn enumeration.
- ABSORBING = 2
- MIXED_INFLOW_OUTFLOW = 7
- MIXED_SUBSONIC_SUPERSONIC_OUTFLOW = 8
- SUBSONIC_INFLOW = 3
- SUBSONIC_OUTFLOW = 4
- SUPERSONIC_INFLOW = 5
- SUPERSONIC_OUTFLOW = 6
- UNDEFINED = 1
- class g3d.defs.NUMTypes(value)
Bases:
EnumAn enumeration.
- FIRST_ORDER_UPWIND = 1
- FOURTH_ORDER_CENTRAL = 5
- LOW_DISSIPATION_THIRD_ORDER_UPWIND = 6
- SECOND_ORDER_CENTRAL = 2
- SECOND_ORDER_UPWIND = 3
- THIRD_ORDER_UPWIND = 4
- ULTRA_LOW_DISSIPATION_THIRD_ORDER_UPWIND = 7
- USER_DEFINED = 8
- class g3d.defs.NodeDistribution(value)
Bases:
EnumAn enumeration.
- ARC_1 = 1
- CURVE_1 = 2
- CURVE_10 = 7
- CURVE_2 = 3
- CURVE_3 = 4
- CURVE_4 = 5
- CURVE_5 = 6
- UNDEFINED = 8
- class g3d.defs.Q1DPipeType(value)
Bases:
EnumAn enumeration.
- CONSTANT_AREA_PIPE = 1
- CONVERGENT_DIVERGENT_PIPE = 4
- CONVERGENT_OR_DIVERGENT_PIPE = 3
- TWO_REGION_PIPE = 2
- class g3d.defs.RampType(value)
Bases:
EnumAn enumeration.
- MACH = 2
- PRESSURE = 3
- TOTAL_PRESSURE = 4
- TOTAL_TEMPERATURE = 5
- UNDEFINED = 1
- class g3d.defs.ShockDampingMode(value)
Bases:
EnumAn enumeration.
- DUCROSS_CELL_GRADIENTS = 3
- DUCROSS_FACE_GRADIENTS = 2
- JAMESON = 1
- class g3d.defs.TIMESTEPTypes(value)
Bases:
EnumAn enumeration.
- LOCAL_TIME_STEPPING = 1
- TIME_ACCURATE_CFL = 2
- TIME_ACCURATE_CONSTANT_TIME_STEP = 3
- class g3d.defs.TimeStepperMode(value)
Bases:
EnumAn enumeration.
- BACKWARD_EULER_DUAL_TIME_STEPPER = 2
- CRANK_NICOLSON_DUAL_TIME_STEPPER = 3
- EXPLICIT_RUNGE_KUTTA = 1
- TURKEL_BACKWARD_EULER_DUAL_TIME_STEPPER = 4
- class g3d.defs.TurbulenceModelMode(value)
Bases:
EnumAn enumeration.
- ERLEBACHER_SMAGORINSKY = 2
- NO_TURBULENCE_MODEL = 1
- class g3d.defs.WALLTypes(value)
Bases:
EnumAn enumeration.
- INVISCID = 2
- UNDEFINED = 1
- VISCOUS_RESOLVED = 3
- VISCOUS_WALL_FUNCTION = 4
- class g3d.defs.XMLDataItem[source]
Bases:
objectXML data placeholder
- Attributes:
NumberTypenumber type (default value = ‘Float’)
endianendian format (default value = ‘Binary’)
filefile name (default value = ‘msh.bin’)
formatdata format (default value = ‘little’)
n_dimnumber of dimensions (default value = 3)
ninumber of nodes in i-direction
njnumber of nodes in j-direction
nknumber of nodes in k-direction
posmemory pointer
precisiondata precision (default value = ‘8’)
Methods
GetDim()gets XML placeholder dimensions example: ni, nj, nk, n_dim = GetDim() :return: ni (int), nj (int), nk (int), n_dim (int) :rtype: tuple
SetDim(ni, nj, nk, n_dim)updates dimension according to specification :param ni: number of nodes in i-direction :type ni: int :param nj: number of nodes in j-direction :type nj: int :param nk: number of nodes in k-direction :type nk: int :param n_dim: number of dimensions :type n_dim: int example: SetDim(ni, nj, nk, n_dim)
- GetDim() Tuple[int, int, int, int][source]
gets XML placeholder dimensions example: ni, nj, nk, n_dim = GetDim() :return: ni (int), nj (int), nk (int), n_dim (int) :rtype: tuple
- property NumberType: str
number type (default value = ‘Float’)
- SetDim(ni: int, nj: int, nk: int, n_dim: int) None[source]
updates dimension according to specification :param ni: number of nodes in i-direction :type ni: int :param nj: number of nodes in j-direction :type nj: int :param nk: number of nodes in k-direction :type nk: int :param n_dim: number of dimensions :type n_dim: int example: SetDim(ni, nj, nk, n_dim)
- property endian: str
endian format (default value = ‘Binary’)
- property file: str
file name (default value = ‘msh.bin’)
- property format: str
data format (default value = ‘little’)
- property n_dim: int
number of dimensions (default value = 3)
- property ni: int
number of nodes in i-direction
- property nj: int
number of nodes in j-direction
- property nk: int
number of nodes in k-direction
- property pos: int
memory pointer
- property precision: str
data precision (default value = ‘8’)