ScalarAdvection Class Reference

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

#include <ScalarAdvection.H>

Inheritance diagram for amr_wind::ScalarAdvection:
[legend]
Collaboration diagram for amr_wind::ScalarAdvection:
[legend]

Public Member Functions

 ScalarAdvection (CFDSim &sim)
 
 ~ScalarAdvection () override=default
 
void initialize_fields (int level, const amrex::Geometry &geom) override
 Initialize the fields for ScalarAdvection simulations.
 
template<typename Shape >
amrex::Vector< amrex::Real > compute_error (const Shape &scalar_function)
 
void post_init_actions () override
 
void post_regrid_actions () override
 
void pre_advance_work () override
 
void post_advance_work () override
 
template<typename Shape >
void initialize_scalar (const Shape &scalar_function)
 

Static Public Member Functions

static std::string identifier ()
 

Private Attributes

const SimTimem_time
 
const FieldRepom_repo
 
Fieldm_velocity
 
Fieldm_density
 
std::string m_output_fname = "error.log"
 
const int m_w = 20
 
Fieldm_scalar {nullptr}
 Scalar field.
 
amrex::Real m_u {1.0}
 Flow velocity in x-direction.
 
amrex::Real m_v {0.0}
 
amrex::Real m_x0 {0.1}
 Initial wave/pulse packet location.
 
amrex::Real m_y0 {0.1}
 
amrex::Real m_amplitude {1.0}
 Initial wave/pulse amplitude.
 
amrex::Real m_x_width {0.01}
 
amrex::Real m_y_width {0.01}
 
amrex::Real m_x_wavenumber {16 * utils::pi()}
 Wave numbers.
 
amrex::Real m_y_wavenumber {16 * utils::pi()}
 
std::string m_shape {"gaussian"}
 Initial wave/pulse shape.
 
amrex::Real m_rho {1.0}
 Density.
 

Detailed Description

Scalar Advection physics

See also
ScalarAdvectionFieldInit

Constructor & Destructor Documentation

◆ ScalarAdvection()

amr_wind::ScalarAdvection::ScalarAdvection ( CFDSim & sim)
explicit

◆ ~ScalarAdvection()

amr_wind::ScalarAdvection::~ScalarAdvection ( )
overridedefault

Member Function Documentation

◆ compute_error()

template<typename Shape >
amrex::Vector< amrex::Real > amr_wind::ScalarAdvection::compute_error ( const Shape & scalar_function)

◆ identifier()

static std::string amr_wind::ScalarAdvection::identifier ( )
inlinestatic

◆ initialize_fields()

void amr_wind::ScalarAdvection::initialize_fields ( int level,
const amrex::Geometry & geom )
override

Initialize the fields for ScalarAdvection simulations.

Initialize the velocity and passive scalar fields at the beginning of the simulation.

◆ initialize_scalar()

template<typename Shape >
void amr_wind::ScalarAdvection::initialize_scalar ( const Shape & scalar_function)

◆ post_advance_work()

void amr_wind::ScalarAdvection::post_advance_work ( )
override

◆ post_init_actions()

void amr_wind::ScalarAdvection::post_init_actions ( )
override

◆ post_regrid_actions()

void amr_wind::ScalarAdvection::post_regrid_actions ( )
inlineoverride

◆ pre_advance_work()

void amr_wind::ScalarAdvection::pre_advance_work ( )
inlineoverride

Member Data Documentation

◆ m_amplitude

amrex::Real amr_wind::ScalarAdvection::m_amplitude {1.0}
private

Initial wave/pulse amplitude.

◆ m_density

Field& amr_wind::ScalarAdvection::m_density
private

◆ m_output_fname

std::string amr_wind::ScalarAdvection::m_output_fname = "error.log"
private

◆ m_repo

const FieldRepo& amr_wind::ScalarAdvection::m_repo
private

◆ m_rho

amrex::Real amr_wind::ScalarAdvection::m_rho {1.0}
private

Density.

◆ m_scalar

Field* amr_wind::ScalarAdvection::m_scalar {nullptr}
private

Scalar field.

◆ m_shape

std::string amr_wind::ScalarAdvection::m_shape {"gaussian"}
private

Initial wave/pulse shape.

◆ m_time

const SimTime& amr_wind::ScalarAdvection::m_time
private

◆ m_u

amrex::Real amr_wind::ScalarAdvection::m_u {1.0}
private

Flow velocity in x-direction.

◆ m_v

amrex::Real amr_wind::ScalarAdvection::m_v {0.0}
private

◆ m_velocity

Field& amr_wind::ScalarAdvection::m_velocity
private

◆ m_w

const int amr_wind::ScalarAdvection::m_w = 20
private

◆ m_x0

amrex::Real amr_wind::ScalarAdvection::m_x0 {0.1}
private

Initial wave/pulse packet location.

◆ m_x_wavenumber

amrex::Real amr_wind::ScalarAdvection::m_x_wavenumber {16 * utils::pi()}
private

Wave numbers.

◆ m_x_width

amrex::Real amr_wind::ScalarAdvection::m_x_width {0.01}
private

Initial wave/pulse width (standard deviation for GaussianPulse and GaussianWavePacket)

◆ m_y0

amrex::Real amr_wind::ScalarAdvection::m_y0 {0.1}
private

◆ m_y_wavenumber

amrex::Real amr_wind::ScalarAdvection::m_y_wavenumber {16 * utils::pi()}
private

◆ m_y_width

amrex::Real amr_wind::ScalarAdvection::m_y_width {0.01}
private

The documentation for this class was generated from the following files: