FUN3D Adjoint Simulations

Adjoint solutions serve as a basis of Goal-oriented Metrics. These simulation classes run one FUN3D forward analysis and an adjoint analysis.

Stabilized Finite Element

class pyrefine.simulation.fun3d_adjoint.SimulationFun3dSFEAdjoint(project_name, pbs=None, fwd_omp_threads=None, adj_omp_threads=None, external_wall_distance=True)

Bases: SimulationFun3dSFE

Runs a steady FUN3D SFE forward and adjoint analysis. The preconditioners in the SFE adjoint benefit from larger partition sizes, so use of the adj_omp_threads argument is encouraged.

Parameters
  • project_name (str) – The root name of the project (without any mesh numbers)

  • pbs (:class:PBS) – PBS queue helper for forward and adjoint solves

  • fwd_omp_threads (int) – Number of OpenMP threads per mpi process to run in the forward analysis if doing hybrid parallelism. If not doing hybrid parallelism, this optional argument should be left as None.

  • adj_omp_threads (int) – Number of OpenMP threads per mpi process to run in the adjoint analysis if doing hybrid parallelism. If not doing hybrid parallelism, this optional argument should be left as None.

  • external_wall_distance (bool) – Whether FUN3D needs to read the wall distance from a file generated by an external distance calculator

fun3d_nml_adjoint

Name of the namelist file in the adaptation root directory to use for the adjoint portion of the simulation.

Type

str

sfe_cfg_adjoint

Name of the sfe.cfg file in the adaptation root directory to use for the adjoint portion of the simulation.

Type

str

sfe_cfg

Name of the sfe.cfg file in the adaptation root directory to use for the forward portion of the simulation.

Type

str

import_adjoint_from_previous_mesh

Whether the simulation should read the refine-interpolated adjoint, i.e., whether or not to use the adjoint initialization cfg.

Type

bool

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)

Perform a forward SFE solve and then the adjoint