Two Phase Time Domain FUN3D Simulation

Finite Volume

This two phase unsteady analysis can be used in cases like DDES where you want to save volume outputs for metric computation at a fixed interval, but you want to have a phase before saving the files to propagate the transients downstream.

The same fun3d.nml in the root directory is used for both phases. The attributes for class set the number of the steps for each phase and the volume save frequency into the fun3d.nml before running nodet_mpi.

class pyrefine.simulation.fun3d_two_phase_unsteady.SimulationFun3dTwoPhase(project_name, pbs=None, external_wall_distance=True)

Bases: SimulationFun3dFV

Runs two unsteady fun3d finite volume analyses. The first one settles transients associated with restarting from the interpolated solution. The second one is for collecting flow field snapshots for the metric

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

transient_steps

The number of steps to run in the simulation to settle transients created from interpolating the solution. Default behavior (None) is to read it from the fun3d.nml

Type

int or None

metric_steps

The number of steps to run in the simulation phase where the solution will be saved for computing the metric. Default behavior (None) is to read it from the fun3d.nml

Type

int or None

metric_frequency

The frequency at which volume files will be written for metric computation. Set to volume_animation_freq for metric collection phase of the simulation. Default behavior is to read volume_animation_freq from the namelist

Type

int

run(istep)

Prep the fun3d namelist and submit a job to run the flow solver

Stabilized Finite Element

This two phase analysis runs differently than the FV version becase the first phase is a steady analysis.

class pyrefine.simulation.fun3d_two_phase_unsteady.SimulationSFETwoPhase(project_name, pbs=None, external_wall_distance=True)

Bases: SimulationFun3dSFE

Runs two fun3d SFE analyses. The first one is a steady analysis to converge the intepolated solution. The second one is unsteady for collecting flow field snapshots for the metric.

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

fun3d_nml_unsteady

unsteady phase’s fun3d.nml

Type

str

sfe_cfg_unsteady

unsteady phase’s sfe.cfg

Type

str

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