KineticEnergy Class Reference

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

#include <KineticEnergy.H>

Inheritance diagram for amr_wind::kinetic_energy::KineticEnergy:
[legend]
Collaboration diagram for amr_wind::kinetic_energy::KineticEnergy:
[legend]

Public Member Functions

 KineticEnergy (CFDSim &, std::string)
 
 ~KineticEnergy () override
 
void pre_init_actions () override
 Perform actions before mesh is created.
 
void initialize () override
 Read user inputs and create the different data probe instances.
 
void post_advance_work () override
 Interpolate fields at a given timestep and output to disk.
 
void post_regrid_actions () override
 
amrex::Real calculate_kinetic_energy ()
 calculate the L2 norm of a given field and component
 

Static Public Member Functions

static std::string identifier ()
 

Private Member Functions

void prepare_ascii_file ()
 prepare ASCII file and directory
 
void write_ascii ()
 Output sampled data in ASCII format.
 

Private Attributes

amrex::Real m_total_kinetic_energy {0.0}
 store the total kinetic energy
 
CFDSimm_sim
 Reference to the CFD sim.
 
const std::string m_label
 
const Fieldm_velocity
 reference to velocity
 
const Fieldm_density
 reference to density
 
std::string m_out_fname
 filename for ASCII output
 
int m_out_freq {10}
 Frequency of data sampling and output.
 
int m_width {22}
 width in ASCII output
 
int m_precision {12}
 precision in ASCII output
 

Detailed Description

kinetic energy object

A concrete implementation of the post-processing interface that deals with integrating total kinetic energy

Constructor & Destructor Documentation

◆ KineticEnergy()

amr_wind::kinetic_energy::KineticEnergy::KineticEnergy ( CFDSim & sim,
std::string label )

◆ ~KineticEnergy()

amr_wind::kinetic_energy::KineticEnergy::~KineticEnergy ( )
overridedefault

Member Function Documentation

◆ calculate_kinetic_energy()

amrex::Real amr_wind::kinetic_energy::KineticEnergy::calculate_kinetic_energy ( )

calculate the L2 norm of a given field and component

◆ identifier()

static std::string amr_wind::kinetic_energy::KineticEnergy::identifier ( )
inlinestatic

◆ initialize()

void amr_wind::kinetic_energy::KineticEnergy::initialize ( )
override

Read user inputs and create the different data probe instances.

◆ post_advance_work()

void amr_wind::kinetic_energy::KineticEnergy::post_advance_work ( )
override

Interpolate fields at a given timestep and output to disk.

◆ post_regrid_actions()

void amr_wind::kinetic_energy::KineticEnergy::post_regrid_actions ( )
inlineoverride

◆ pre_init_actions()

void amr_wind::kinetic_energy::KineticEnergy::pre_init_actions ( )
inlineoverride

Perform actions before mesh is created.

◆ prepare_ascii_file()

void amr_wind::kinetic_energy::KineticEnergy::prepare_ascii_file ( )
private

prepare ASCII file and directory

◆ write_ascii()

void amr_wind::kinetic_energy::KineticEnergy::write_ascii ( )
private

Output sampled data in ASCII format.

Member Data Documentation

◆ m_density

const Field& amr_wind::kinetic_energy::KineticEnergy::m_density
private

reference to density

◆ m_label

const std::string amr_wind::kinetic_energy::KineticEnergy::m_label
private

Name of this sampling object.

The label is used to read user inputs from file and is also used for naming files directories depending on the output format.

◆ m_out_fname

std::string amr_wind::kinetic_energy::KineticEnergy::m_out_fname
private

filename for ASCII output

◆ m_out_freq

int amr_wind::kinetic_energy::KineticEnergy::m_out_freq {10}
private

Frequency of data sampling and output.

◆ m_precision

int amr_wind::kinetic_energy::KineticEnergy::m_precision {12}
private

precision in ASCII output

◆ m_sim

CFDSim& amr_wind::kinetic_energy::KineticEnergy::m_sim
private

Reference to the CFD sim.

◆ m_total_kinetic_energy

amrex::Real amr_wind::kinetic_energy::KineticEnergy::m_total_kinetic_energy {0.0}
private

store the total kinetic energy

◆ m_velocity

const Field& amr_wind::kinetic_energy::KineticEnergy::m_velocity
private

reference to velocity

◆ m_width

int amr_wind::kinetic_energy::KineticEnergy::m_width {22}
private

width in ASCII output


The documentation for this class was generated from the following files:
  • /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/sampling/KineticEnergy.H
  • /home/runner/work/amr-wind/amr-wind/amr-wind/utilities/sampling/KineticEnergy.cpp