PDEBase Class Reference

AMR-Wind API: amr_wind::pde::PDEBase Class Reference
AMR-Wind API v0.1.0
CFD solver for wind plant simulations
Loading...
Searching...
No Matches

#include <PDEBase.H>

Inheritance diagram for amr_wind::pde::PDEBase:
[legend]
Collaboration diagram for amr_wind::pde::PDEBase:
[legend]

Public Member Functions

 ~PDEBase () override=default
 
virtual PDEFieldsfields ()=0
 Return the object that holds references to fields for this PDE system.
 
virtual const PDEFieldsfields () const =0
 
virtual void initialize ()=0
 Perform initialization actions for a PDE after the mesh is generated.
 
virtual void post_regrid_actions ()=0
 Perform updates specific to PDE after a regrid is performed.
 
virtual void compute_source_term (const FieldState fstate)=0
 Compute the source (forcing) terms for this PDE.
 
virtual void compute_mueff (const FieldState fstate)=0
 Compute the effective dynamic viscosity for this PDE.
 
virtual void compute_diffusion_term (const FieldState fstate)=0
 Compute the diffusion term used in the RHS of the PDE system.
 
virtual void pre_advection_actions (const FieldState fstate)=0
 Perform necessary steps to prepare for advection calculations.
 
virtual void compute_advection_term (const FieldState fstate)=0
 Compute the time derivative and advective term for the PDE system.
 
virtual void compute_predictor_rhs (const DiffusionType difftype)=0
 
virtual void compute_corrector_rhs (const DiffusionType difftype)=0
 
virtual void solve (const amrex::Real dt)=0
 Solve the diffusion linear system and update the field.
 
virtual void post_solve_actions ()=0
 Perform post-processing actions after a system solve.
 
- Public Member Functions inherited from amr_wind::Factory< PDEBase, CFDSim & >
virtual ~Factory ()=default
 

Static Public Member Functions

static std::string base_identifier ()
 Base class identifier used for factory registration interface.
 
- Static Public Member Functions inherited from amr_wind::Factory< PDEBase, CFDSim & >
static std::unique_ptr< PDEBase > create (const std::string &key, Args... args)
 
static void print (std::ostream &os)
 

Additional Inherited Members

- Public Attributes inherited from amr_wind::Factory< PDEBase, CFDSim & >
friend Base
 

Detailed Description

Abstract interface defining a PDE and its solution process withn AMR-Wind

The exact behavior is implemented by subclass PDESystem that is specialized using two traits: the PDE type trait, and the numerical scheme trait. Currently, two numerical scheme traits are supported: Godunov and MOL.

Each PDESystem instance contains its own PDEFields object that holds fields unique to the PDE. These fields are: the variable solved by the PDE (e.g., velocity, temperature, etc.), the effective dynamic viscosity, the source terms, the diffusion term, and the convective term. A PDE may declare additional fields that are not stored in this object, but can be queried using the FieldRepo instance. For example, the incompressible Navier-Stokes (ICNS) always declares density and pressure in addition to the velocity fields.

Constructor & Destructor Documentation

◆ ~PDEBase()

amr_wind::pde::PDEBase::~PDEBase ( )
overridedefault

Member Function Documentation

◆ base_identifier()

static std::string amr_wind::pde::PDEBase::base_identifier ( )
inlinestatic

Base class identifier used for factory registration interface.

◆ compute_advection_term()

virtual void amr_wind::pde::PDEBase::compute_advection_term ( const FieldState fstate)
pure virtual

Compute the time derivative and advective term for the PDE system.

◆ compute_corrector_rhs()

virtual void amr_wind::pde::PDEBase::compute_corrector_rhs ( const DiffusionType difftype)
pure virtual

Combine the source, diffusion, and advection term to obtain RHS

This method behaves differently depending upon whether the diffusion term is treated implicitly, with Crank-Nicolson scheme, or explicitly. The corrector step uses both "old" state as well as the updated "new" state from predictor step to compute the RHS term.

◆ compute_diffusion_term()

virtual void amr_wind::pde::PDEBase::compute_diffusion_term ( const FieldState fstate)
pure virtual

Compute the diffusion term used in the RHS of the PDE system.

◆ compute_mueff()

virtual void amr_wind::pde::PDEBase::compute_mueff ( const FieldState fstate)
pure virtual

Compute the effective dynamic viscosity for this PDE.

◆ compute_predictor_rhs()

virtual void amr_wind::pde::PDEBase::compute_predictor_rhs ( const DiffusionType difftype)
pure virtual

Combine the source, diffusion, and advection term to obtain RHS

This method behaves differently depending upon whether the diffusion term is treated implicitly, with Crank-Nicolson scheme, or explicitly. The predictor step only uses the "old" states for RHS computation.

◆ compute_source_term()

virtual void amr_wind::pde::PDEBase::compute_source_term ( const FieldState fstate)
pure virtual

Compute the source (forcing) terms for this PDE.

◆ fields() [1/2]

virtual const PDEFields & amr_wind::pde::PDEBase::fields ( ) const
pure virtual

◆ fields() [2/2]

virtual PDEFields & amr_wind::pde::PDEBase::fields ( )
pure virtual

Return the object that holds references to fields for this PDE system.

◆ initialize()

virtual void amr_wind::pde::PDEBase::initialize ( )
pure virtual

Perform initialization actions for a PDE after the mesh is generated.

◆ post_regrid_actions()

virtual void amr_wind::pde::PDEBase::post_regrid_actions ( )
pure virtual

Perform updates specific to PDE after a regrid is performed.

◆ post_solve_actions()

virtual void amr_wind::pde::PDEBase::post_solve_actions ( )
pure virtual

Perform post-processing actions after a system solve.

◆ pre_advection_actions()

virtual void amr_wind::pde::PDEBase::pre_advection_actions ( const FieldState fstate)
pure virtual

Perform necessary steps to prepare for advection calculations.

◆ solve()

virtual void amr_wind::pde::PDEBase::solve ( const amrex::Real dt)
pure virtual

Solve the diffusion linear system and update the field.


The documentation for this class was generated from the following file:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/equation_systems/PDEBase.H