www.mooseframework.org
Public Member Functions | Protected Types | Protected Attributes | List of all members
NSAction Class Reference

This is a base Action class for the Navier-Stokes module which is responsible for building lists of names that other Actions can subsequently use. More...

#include <NSAction.h>

Inheritance diagram for NSAction:
[legend]

Public Member Functions

 NSAction (InputParameters parameters)
 
virtual ~NSAction ()
 
virtual void act ()
 

Protected Types

typedef std::vector< VariableName > CoupledName
 

Protected Attributes

std::vector< std::string > _vars
 
std::vector< std::string > _auxs
 
unsigned int _dim
 

Detailed Description

This is a base Action class for the Navier-Stokes module which is responsible for building lists of names that other Actions can subsequently use.

Subclasses should call its act() function prior to doing their own work.

Definition at line 26 of file NSAction.h.

Member Typedef Documentation

◆ CoupledName

typedef std::vector<VariableName> NSAction::CoupledName
protected

Definition at line 43 of file NSAction.h.

Constructor & Destructor Documentation

◆ NSAction()

NSAction::NSAction ( InputParameters  parameters)

Definition at line 30 of file NSAction.C.

30 : Action(parameters), _dim(0) {}
unsigned int _dim
Definition: NSAction.h:40

◆ ~NSAction()

NSAction::~NSAction ( )
virtual

Definition at line 32 of file NSAction.C.

32 {}

Member Function Documentation

◆ act()

void NSAction::act ( )
virtual

Reimplemented in AddNavierStokesICsAction, AddNavierStokesVariablesAction, and AddNavierStokesKernelsAction.

Definition at line 35 of file NSAction.C.

Referenced by AddNavierStokesKernelsAction::act(), AddNavierStokesVariablesAction::act(), and AddNavierStokesICsAction::act().

36 {
37  _vars.clear();
38  _auxs.clear();
39 
40  _dim = _mesh->dimension();
41 
42  // Build up the vector of variable names for the user, depending on
43  // the mesh dimension.
44  _vars.push_back(NS::density);
45  _vars.push_back(NS::momentum_x);
46  if (_dim >= 2)
47  _vars.push_back(NS::momentum_y);
48  if (_dim >= 3)
49  _vars.push_back(NS::momentum_z);
50  _vars.push_back(NS::total_energy);
51 
52  // Add Aux variables. These are all required in order for the code
53  // to run, so they should not be independently selectable by the
54  // user.
55  _auxs.push_back(NS::velocity_x);
56  if (_dim >= 2)
57  _auxs.push_back(NS::velocity_y);
58  if (_dim >= 3)
59  _auxs.push_back(NS::velocity_z);
60 
61  _auxs.push_back(NS::pressure);
62  _auxs.push_back(NS::temperature);
63  _auxs.push_back(NS::enthalpy);
64  _auxs.push_back(NS::mach_number);
65 
66  // Needed for FluidProperties calculations
67  _auxs.push_back(NS::internal_energy);
68  _auxs.push_back(NS::specific_volume);
69 }
const std::string momentum_x
Definition: NS.h:18
const std::string mach_number
Definition: NS.h:29
std::vector< std::string > _auxs
Definition: NSAction.h:36
const std::string velocity_z
Definition: NS.h:25
const std::string density
Definition: NS.h:17
const std::string velocity_x
Definition: NS.h:23
const std::string temperature
Definition: NS.h:27
const std::string enthalpy
Definition: NS.h:28
unsigned int _dim
Definition: NSAction.h:40
std::vector< std::string > _vars
Definition: NSAction.h:35
const std::string specific_volume
Definition: NS.h:31
const std::string velocity_y
Definition: NS.h:24
const std::string momentum_y
Definition: NS.h:19
const std::string pressure
Definition: NS.h:26
const std::string total_energy
Definition: NS.h:21
const std::string internal_energy
Definition: NS.h:30
const std::string momentum_z
Definition: NS.h:20

Member Data Documentation

◆ _auxs

std::vector<std::string> NSAction::_auxs
protected

◆ _dim

unsigned int NSAction::_dim
protected

◆ _vars

std::vector<std::string> NSAction::_vars
protected

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