General FUN3D Simulations¶
These simple FUN3D simulation classes run one call to FUN3D’s nodet_mpi
and
can be used to drive steady or unsteady adaptations.
Distance Calculators¶
The distance object calculates the distance field for a given volume mesh for fun3d simulations.
This is necessary because FUN3D’s internal distance calculator has some issues with adapted meshes.
Each fun3d simulations simulation object has an instance of a distance calculator which can be changed, but
the default distance calculator is refine’s to reduced the number of dependencies.
The methods to access this functionality are defined in DistanceBase
.
Finite Volume Simulation¶
- class pyrefine.simulation.fun3d.SimulationFun3dFV(project_name, pbs=None, external_wall_distance=True, omp_threads=None, ranks_per_node=None)¶
Bases:
SimulationBase
Runs fun3d finite volume analysis. Each time that run is called, the fun3d.nml in the adaptation root directory will be read, the distance and restart solb inputs will be adjusted to account for the current adaptation cycle number, and then use nodet_mpi to run the simulation.
- Parameters
project_name (str) – The root name of the project (without any mesh numbers)
pbs (:class:PBS) – PBS queue helper
external_wall_distance (bool) – Whether the wall distance needs to be computed by a stand alone wall distance calculator
omp_threads (int) – Number of OpenMP threads per mpi process to run if doing hybrid parallelism. If not doing hybrid parallelism, this optional argument should be left as None.
ranks_per_node (int) – Number of mpi ranks per node. By default, all available ranks are used. This option is used for hybrid CPU/GPU simulations and should be left as None otherwise.
- external_wall_distance¶
Whether a distance field from an external calculator is needed
- Type
bool
- fun3d_nml¶
Name of the namelist file in the adaptation root directory
- Type
str
- fun3d_command_line_args¶
The command line arguments that will be added to calls to nodet_mpi
- Type
str
- import_solution_from_previous_mesh¶
Whether the simulation should read the refine-interpolated solution, i.e., whether or not to use the flow_initialization nml.
- Type
bool
- expect_moving_body_input¶
Whether to expect a moving_body.input file in the root directory
- Type
bool
- moving_body_input¶
moving_body.input file name in root directory
- Type
str
- distance¶
the distance calculator
- Type
- field_file_extension¶
type of file to write expect for fields written
- Type
str
- extra_input_files¶
list of extra input files that should also be copied into the Flow directory
- Type
list
- get_expected_file_list()¶
Tell the adaptation driver what files related to this component should be in the adaptation root directory
- Returns
The list of strings with the names of files. If no root directory files are needed by this component, return None
- Return type
expected_files
- run(istep)¶
Run the sequence of simulations for a given adaptation cycle
- project_name¶
The root name of the project (without any mesh numbers)
- Type
str
- pbs¶
PBS: The pbs queue helper object
- Type
class
- vertices_per_cpu_core¶
target number of mesh vertices per cpu core for pbs jobs
- Type
int
Stabilized Finite Element Simulation¶
- class pyrefine.simulation.fun3d.SimulationFun3dSFE(project_name, pbs=None, external_wall_distance=True, omp_threads=None, ranks_per_node=None)¶
Bases:
SimulationFun3dFV
Runs fun3d stabilized finite element analysis. Does the same actions as the FV version but also handles the sfe.cfg file.
- Parameters
project_name (str) – The root name of the project (without any mesh numbers)
pbs (:class:PBS) – PBS queue helper
external_wall_distance (bool) – Whether the wall distance needs to be computed by a stand alone wall distance calculator
omp_threads (int) – Number of OpenMP threads per mpi process to run if doing hybrid parallelism. If not doing hybrid parallelism, this optional argument should be left as None.
ranks_per_node (int) – Number of mpi ranks per node. By default, all available ranks are used. This option is used for hybrid CPU/GPU simulations and should be left as None otherwise.
- get_expected_file_list()¶
Tell the adaptation driver what files related to this component should be in the adaptation root directory
- Returns
The list of strings with the names of files. If no root directory files are needed by this component, return None
- Return type
expected_files
- run(istep)¶
Run the sequence of simulations for a given adaptation cycle
- external_wall_distance¶
Whether a distance field from an external calculator is needed
- Type
bool
- fun3d_nml¶
Name of the namelist file in the adaptation root directory
- Type
str
- fun3d_command_line_args¶
The command line arguments that will be added to calls to nodet_mpi
- Type
str
- import_solution_from_previous_mesh¶
Whether the simulation should read the refine-interpolated solution, i.e., whether or not to use the flow_initialization nml.
- Type
bool
- expect_moving_body_input¶
Whether to expect a moving_body.input file in the root directory
- Type
bool
- moving_body_input¶
moving_body.input file name in root directory
- Type
str
- distance¶
the distance calculator
- Type
- field_file_extension¶
type of file to write expect for fields written
- Type
str
- extra_input_files¶
list of extra input files that should also be copied into the Flow directory
- Type
list
- project_name¶
The root name of the project (without any mesh numbers)
- Type
str
- pbs¶
PBS: The pbs queue helper object
- Type
class
- vertices_per_cpu_core¶
target number of mesh vertices per cpu core for pbs jobs
- Type
int