g3d.flow.solver package
Subpackages
- g3d.flow.solver.limiters package
- g3d.flow.solver.models package
- g3d.flow.solver.rhs package
- Subpackages
- g3d.flow.solver.rhs.boco package
- g3d.flow.solver.rhs.fluxmodifiers package
- Submodules
- g3d.flow.solver.rhs.fluxmodifiers.aximod module
- g3d.flow.solver.rhs.fluxmodifiers.fluxmodifier module
- g3d.flow.solver.rhs.fluxmodifiers.irsm module
- g3d.flow.solver.rhs.fluxmodifiers.q1d_source module
- g3d.flow.solver.rhs.fluxmodifiers.q3d_source module
- g3d.flow.solver.rhs.fluxmodifiers.scale module
- Module contents
- g3d.flow.solver.rhs.glue package
- Submodules
- g3d.flow.solver.rhs.flux module
- g3d.flow.solver.rhs.moc module
- g3d.flow.solver.rhs.tvd module
- Module contents
- Subpackages
- g3d.flow.solver.step package
Submodules
g3d.flow.solver.solver module
flow solver (Solver class definition)
- class g3d.flow.solver.solver.Solver(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntity- Attributes:
tagtag (string) used for identification
Methods
associate(dom)copy(e)copies data from specified entity input: entity example: copy(e)
import_flow_data(*args, **kwargs)import_g3d_flow_data(*args, **kwargs)print()prints entity data
run()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)
setup_and_allocate(dom)change_eqn_mode
diff_flux_check
flux_check
flux_test
ltsp_test
reset_solver_status
step_test
Module contents
g3d/flow/solver sub library
- class g3d.flow.solver.BackwardEuler(*args: Any, **kwargs: Any)[source]
Bases:
DualTimeStepperBackwardEuler class definition
- Attributes:
tagtag (string) used for identification
Methods
associate(dom)copy(e)copies data from specified entity input: entity example: copy(e)
get_shock_capturing_field()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)
change_eqn_mode
diff_flux_check
flux_check
flux_test
fwd
initialize
ltsp_test
setup_and_allocate
- class g3d.flow.solver.CrankNicolson(*args: Any, **kwargs: Any)[source]
Bases:
DualTimeStepper- Attributes:
tagtag (string) used for identification
Methods
associate(dom)copy(e)copies data from specified entity input: entity example: copy(e)
get_shock_capturing_field()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)
change_eqn_mode
diff_flux_check
flux_check
flux_test
fwd
initialize
ltsp_test
setup_and_allocate
- class g3d.flow.solver.DualTimeStepper(*args: Any, **kwargs: Any)[source]
Bases:
G3DStep- Attributes:
tagtag (string) used for identification
Methods
associate(dom)copy(e)copies data from specified entity input: entity example: copy(e)
get_shock_capturing_field()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)
change_eqn_mode
diff_flux_check
flux_check
flux_test
fwd
initialize
ltsp_test
setup_and_allocate
- class g3d.flow.solver.Flux(*args: Any, **kwargs: Any)[source]
Bases:
ConsField- Attributes:
etTotal energy [J/m^3]
firstFirst index
lastLast index
n_cellsNumber of cells
n_ghostsNumber of ghost cells
n_varNumber of variables
roDensity [kg/m^3]
ruX-momentum [kg/(m^2 s)]
rvY-momentum [kg/(m^2 s)]
rwZ-momentum [kg/(m^2 s)]
sizePlaceholder size
tagtag (string) used for identification
variablesDefined container variables
Methods
AXPBY(A, B, Y)Vector operation a * X + b * Y where Y is an instance of FlowDataPlaceholder and X is this placeholder
AXPY(A, Y)Vector operation a * X + Y where Y is an instance of FlowDataPlaceholder and X is this placeholder
CellToNode(c)Convert cell values to node values
GetNGhosts()Gets number of allocated ghost cells
Interpolate(nodes, cells, node_cons)Interpolate cell-centered flow field data to node-centered data
WAXPY(A, X, Y)Vector operation W = a * X + Y where X and Y are instances of FlowDataPlaceholder and W is this placeholder
associate(dom, dt)backup()Copies data to backup arrays
copy(fd)Copies data from prototype FlowDataPlaceHolder object
copy_values(from_idx, to_idx)Copies from one array element to another
de_allocate_placeholders()De allocates placeholders - nullifies all arrays
export(name[, var])Exports placeholder data to file (binary)
get_Cons(idx)Extracts an instance of conservative variable object for specified cell index
get_array([var])Get array for specified variable string
get_array_with_ghosts([var])Get array for specified variable string including ghost cell values
get_arrays()Gets conservative flow data arrays
get_arrays_with_ghosts()Gets conservative flow data arrays including ghost cell values
get_by_index(idx)Gets tuple of conservative variable values for cell with specified index
get_extreme_value_array([value_type])Gets array with calculated variable extreme values
get_extreme_values([var])Updates placeholder variables extreme values (min/max)
get_from_backup([reset_bak])Restores data from backup arrays
get_keys()Gets defined variable keys
get_max_norm([var])Updates variable max norm values (max absolute values)
get_max_values([var])Updates placeholder max values
get_min_values([var])Updates placeholder min values
get_momentum_vector(idx)Get momentum vector for cell with specified index
get_pointers()Gets list of array pointers
get_range()Gets placeholder range (first, last)
get_value(idx[, var])Get variable value for specified cell index
import_data(name[, var])Imports placeholder data from file (binary)
import_var_data_from_binary(f[, var])Imports variable data from binary file
initialize([val, var])Initialize placeholder
is_allocated()Placeholder allocation status
normalize_extreme_values(norm_values[, ...])Normalizes extreme values
nullify()Nullifies all array elements for all defined variables
nullify_by_index(idx)Nullifies all variables for specified cell index
point_wise_scale(sf)Element data scaling using provided scaling factor array
print()prints entity data
print_extreme_value_locations()Prints extreme values including location to stdout
print_extreme_values([var])Prints calculated extreme values to stdout
print_extreme_values_by_type([value_type, var])Prints calculated extreme values by type to stdout
print_flow_data(idx)Prints stored variable information for specified cell index to stdout
read_from_file(f)Reads placeholder variable arrays from file (binary format)
scale(idx, sf)Scales all variable values for specified cell index
set(*args, **kwargs)sets entity parameters according to specifications input: args, kwargs example: set(args, kwargs)
set_by_index_from_Cons(idx, c)Set array values for cell with specified cell index from provided conservative variable object
set_from_Cons(c)Set array values from provided conservative variable object
set_from_array(from_array[, var])Set flow data for specified variable from array
set_from_arrays(ro, ru, rv, rw, et)Set data from provided arrays
set_from_cons_field(c)Copy data from provided conservative variables placeholder object
set_from_key_value(key, value)Sets data from key-value pair input
set_momentum_vector(idx, r_vel)Set momentum vector for cell with specified index
set_value(idx, val[, var])Sets variable value for specified cell index
set_values(ro, ru, rv, rw, et[, idx])Sets array values for all cells or cell with specified cell index to a set of initial values or data from provided arrays
setup(**kwargs)vector_scale(v)Scales all variable values for all elements using specified scaling array
write_to_file(f)Writes placeholder variable arrays to file (binary format)
change_eqn_mode
diff_flux_check
evaluate
flux_check
- class g3d.flow.solver.FluxScale[source]
Bases:
FluxModifierMethods
associate(flux, dt, dom)evaluate
- class g3d.flow.solver.G3DStep(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntity- Attributes:
tagtag (string) used for identification
Methods
associate(dom)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)
change_eqn_mode
diff_flux_check
flux_check
flux_test
fwd
initialize
ltsp_test
setup_and_allocate
- class g3d.flow.solver.IRSM[source]
Bases:
FluxModifierMethods
associate(flux, dt, dom)evaluate
- class g3d.flow.solver.Limiter(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntity- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
evaluate(dom)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)
- class g3d.flow.solver.LogLaw(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntityMethods
associate(gas)copy(e)copies data from specified entity input: entity example: copy(e)
evaluate(u_tang, ro_w, y_norm)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)
- property B: float
return:
- evaluate(u_tang: float | ndarray, ro_w: float | ndarray, y_norm: float | ndarray) float | ndarray | None[source]
- Parameters:
u_tang
ro_w
y_norm
- Returns:
- property kappa: float
return:
- property threshold: float
return:
- class g3d.flow.solver.MOC[source]
Bases:
object- Attributes:
c_a- return:
c_m- return:
et_m- return:
p_l- return:
p_m- return:
p_r- return:
ro_a- return:
ro_l- return:
ro_m- return:
ro_r- return:
ru_m- return:
rv_m- return:
rw_m- return:
sl- return:
sx- return:
sy- return:
sz- return:
u_a- return:
u_l- return:
u_m- return:
u_r- return:
v_a- return:
v_l- return:
v_m- return:
v_r- return:
w_a- return:
w_l- return:
w_m- return:
w_r- return:
Methods
associate(gas)evaluate
update
- property c_a: float
return:
- property c_m: float
return:
- property et_m: float
return:
- property p_l: float
return:
- property p_m: float
return:
- property p_r: float
return:
- property ro_a: float
return:
- property ro_l: float
return:
- property ro_m: float
return:
- property ro_r: float
return:
- property ru_m: float
return:
- property rv_m: float
return:
- property rw_m: float
return:
- property sl: float
return:
- property sx: float
return:
- property sy: float
return:
- property sz: float
return:
- property u_a: float
return:
- property u_l: float
return:
- property u_m: float
return:
- property u_r: float
return:
- property v_a: float
return:
- property v_l: float
return:
- property v_m: float
return:
- property v_r: float
return:
- property w_a: float
return:
- property w_l: float
return:
- property w_m: float
return:
- property w_r: float
return:
- class g3d.flow.solver.PMax(*args: Any, **kwargs: Any)[source]
Bases:
Limiter- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
evaluate(dom)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)
- class g3d.flow.solver.PMin(*args: Any, **kwargs: Any)[source]
Bases:
Limiter- Attributes:
tagtag (string) used for identification
Methods
copy(e)copies data from specified entity input: entity example: copy(e)
evaluate(dom)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)
- class g3d.flow.solver.Q1DSource[source]
Bases:
FluxModifierMethods
associate(flux, dt, dom)evaluate
- class g3d.flow.solver.Q3DSource[source]
Bases:
FluxModifierMethods
associate(flux, dt, dom)evaluate
- class g3d.flow.solver.RungeKutta(*args: Any, **kwargs: Any)[source]
Bases:
G3DStep- Attributes:
tagtag (string) used for identification
Methods
associate(dom)copy(e)copies data from specified entity input: entity example: copy(e)
get_shock_capturing_field()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)
change_eqn_mode
diff_flux_check
flux_check
flux_test
fwd
initialize
ltsp_test
setup_and_allocate
- class g3d.flow.solver.Solver(*args: Any, **kwargs: Any)[source]
Bases:
G3DEntity- Attributes:
tagtag (string) used for identification
Methods
associate(dom)copy(e)copies data from specified entity input: entity example: copy(e)
import_flow_data(*args, **kwargs)import_g3d_flow_data(*args, **kwargs)print()prints entity data
run()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)
setup_and_allocate(dom)change_eqn_mode
diff_flux_check
flux_check
flux_test
ltsp_test
reset_solver_status
step_test