ChannelFlow Class Reference

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

#include <ChannelFlow.H>

Inheritance diagram for amr_wind::channel_flow::ChannelFlow:
[legend]
Collaboration diagram for amr_wind::channel_flow::ChannelFlow:
[legend]

Public Member Functions

 ChannelFlow (CFDSim &sim)
 
 ~ChannelFlow () override=default
 
void initialize_fields (int level, const amrex::Geometry &geom) override
 
template<typename IndexSelector >
void initialize_fields (int level, const amrex::Geometry &geom, const IndexSelector &idxOp, const int n_idx)
 Use Reichardt function to initialize velocity profile.
 
template<typename IndexSelector >
amrex::Real compute_error (const IndexSelector &idxOp)
 
amrex::Real compute_analytical_smagorinsky_error ()
 
void output_error ()
 
void post_init_actions () override
 
void post_regrid_actions () override
 
void pre_advance_work () override
 
void post_advance_work () override
 

Static Public Member Functions

static std::string identifier ()
 

Private Attributes

CFDSimm_sim
 CFD simulation controller instance.
 
const amr_wind::SimTimem_time
 
FieldRepom_repo
 
const amrex::AmrCore & m_mesh
 
WallFunction m_wall_func
 
int m_norm_dir {1}
 Wall normal direction - Default y direction.
 
amrex::Real m_rho {1.0}
 initial density value
 
amrex::Real m_mu {1.0}
 viscosity
 
amrex::Real m_re_tau {1000.0}
 Re_tau.
 
amrex::Real m_utau {0.01}
 u_tau
 
amrex::Real m_ytau {0.001}
 y_tau
 
amrex::Real m_tke0 {0.0}
 initial tke value
 
amrex::Real m_sdr0 {1000.0}
 initial sdr value
 
bool m_perturb_vel {false}
 flag for perturbations of the initial condition
 
amrex::Real m_perturb_y_period {1.0}
 perturbation period (y-direction)
 
amrex::Real m_perturb_z_period {1.0}
 perturbation period (z-direction)
 
amrex::Real m_perturb_fac {0.1}
 perturbation factor (fraction of utau)
 
amrex::Real m_kappa {0.41}
 Von-Karman constant.
 
std::string m_turbulence_model
 Turbulence model.
 
bool m_laminar {false}
 
bool m_mesh_mapping {false}
 
amrex::Real m_mean_vel
 
bool m_half {false}
 
bool m_analytical_smagorinsky_test {false}
 flag for analytical smagorinsky test
 
amrex::Real m_C0 {0.0}
 Analytical Smagorinsky first coefficient.
 
amrex::Real m_C1 {0.0}
 Analytical Smagorinsky second coefficient.
 
amrex::Real m_dpdx {0.0}
 Body forcing (x direction)
 
int m_mean_vel_dir {0}
 direction of mean velocity
 
const int m_w {18}
 output precision
 
std::string m_output_fname {"channel_flow.log"}
 error log file
 

Detailed Description

Channel Flow physics

Constructor & Destructor Documentation

◆ ChannelFlow()

amr_wind::channel_flow::ChannelFlow::ChannelFlow ( CFDSim & sim)
explicit

◆ ~ChannelFlow()

amr_wind::channel_flow::ChannelFlow::~ChannelFlow ( )
overridedefault

Member Function Documentation

◆ compute_analytical_smagorinsky_error()

amrex::Real amr_wind::channel_flow::ChannelFlow::compute_analytical_smagorinsky_error ( )

◆ compute_error()

template<typename IndexSelector >
amrex::Real amr_wind::channel_flow::ChannelFlow::compute_error ( const IndexSelector & idxOp)

◆ identifier()

static std::string amr_wind::channel_flow::ChannelFlow::identifier ( )
inlinestatic

◆ initialize_fields() [1/2]

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

Initialize the velocity, density, tke and sdr fields at the beginning of the simulation.

◆ initialize_fields() [2/2]

template<typename IndexSelector >
void amr_wind::channel_flow::ChannelFlow::initialize_fields ( int level,
const amrex::Geometry & geom,
const IndexSelector & idxOp,
const int n_idx )

Use Reichardt function to initialize velocity profile.

◆ output_error()

void amr_wind::channel_flow::ChannelFlow::output_error ( )

◆ post_advance_work()

void amr_wind::channel_flow::ChannelFlow::post_advance_work ( )
override

◆ post_init_actions()

void amr_wind::channel_flow::ChannelFlow::post_init_actions ( )
override

◆ post_regrid_actions()

void amr_wind::channel_flow::ChannelFlow::post_regrid_actions ( )
inlineoverride

◆ pre_advance_work()

void amr_wind::channel_flow::ChannelFlow::pre_advance_work ( )
inlineoverride

Member Data Documentation

◆ m_analytical_smagorinsky_test

bool amr_wind::channel_flow::ChannelFlow::m_analytical_smagorinsky_test {false}
private

flag for analytical smagorinsky test

◆ m_C0

amrex::Real amr_wind::channel_flow::ChannelFlow::m_C0 {0.0}
private

Analytical Smagorinsky first coefficient.

◆ m_C1

amrex::Real amr_wind::channel_flow::ChannelFlow::m_C1 {0.0}
private

Analytical Smagorinsky second coefficient.

◆ m_dpdx

amrex::Real amr_wind::channel_flow::ChannelFlow::m_dpdx {0.0}
private

Body forcing (x direction)

◆ m_half

bool amr_wind::channel_flow::ChannelFlow::m_half {false}
private

◆ m_kappa

amrex::Real amr_wind::channel_flow::ChannelFlow::m_kappa {0.41}
private

Von-Karman constant.

◆ m_laminar

bool amr_wind::channel_flow::ChannelFlow::m_laminar {false}
private

◆ m_mean_vel

amrex::Real amr_wind::channel_flow::ChannelFlow::m_mean_vel
private

◆ m_mean_vel_dir

int amr_wind::channel_flow::ChannelFlow::m_mean_vel_dir {0}
private

direction of mean velocity

◆ m_mesh

const amrex::AmrCore& amr_wind::channel_flow::ChannelFlow::m_mesh
private

◆ m_mesh_mapping

bool amr_wind::channel_flow::ChannelFlow::m_mesh_mapping {false}
private

◆ m_mu

amrex::Real amr_wind::channel_flow::ChannelFlow::m_mu {1.0}
private

viscosity

◆ m_norm_dir

int amr_wind::channel_flow::ChannelFlow::m_norm_dir {1}
private

Wall normal direction - Default y direction.

◆ m_output_fname

std::string amr_wind::channel_flow::ChannelFlow::m_output_fname {"channel_flow.log"}
private

error log file

◆ m_perturb_fac

amrex::Real amr_wind::channel_flow::ChannelFlow::m_perturb_fac {0.1}
private

perturbation factor (fraction of utau)

◆ m_perturb_vel

bool amr_wind::channel_flow::ChannelFlow::m_perturb_vel {false}
private

flag for perturbations of the initial condition

◆ m_perturb_y_period

amrex::Real amr_wind::channel_flow::ChannelFlow::m_perturb_y_period {1.0}
private

perturbation period (y-direction)

◆ m_perturb_z_period

amrex::Real amr_wind::channel_flow::ChannelFlow::m_perturb_z_period {1.0}
private

perturbation period (z-direction)

◆ m_re_tau

amrex::Real amr_wind::channel_flow::ChannelFlow::m_re_tau {1000.0}
private

Re_tau.

◆ m_repo

FieldRepo& amr_wind::channel_flow::ChannelFlow::m_repo
private

◆ m_rho

amrex::Real amr_wind::channel_flow::ChannelFlow::m_rho {1.0}
private

initial density value

◆ m_sdr0

amrex::Real amr_wind::channel_flow::ChannelFlow::m_sdr0 {1000.0}
private

initial sdr value

◆ m_sim

CFDSim& amr_wind::channel_flow::ChannelFlow::m_sim
private

CFD simulation controller instance.

◆ m_time

const amr_wind::SimTime& amr_wind::channel_flow::ChannelFlow::m_time
private

◆ m_tke0

amrex::Real amr_wind::channel_flow::ChannelFlow::m_tke0 {0.0}
private

initial tke value

◆ m_turbulence_model

std::string amr_wind::channel_flow::ChannelFlow::m_turbulence_model
private

Turbulence model.

◆ m_utau

amrex::Real amr_wind::channel_flow::ChannelFlow::m_utau {0.01}
private

u_tau

◆ m_w

const int amr_wind::channel_flow::ChannelFlow::m_w {18}
private

output precision

◆ m_wall_func

WallFunction amr_wind::channel_flow::ChannelFlow::m_wall_func
private

◆ m_ytau

amrex::Real amr_wind::channel_flow::ChannelFlow::m_ytau {0.001}
private

y_tau


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