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

This class allows us to have a section of the input file like the following which automatically adds initial conditions for all the required nonlinear and auxiliary variables. More...

#include <AddNavierStokesICsAction.h>

Inheritance diagram for AddNavierStokesICsAction:
[legend]

Public Member Functions

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

Protected Types

typedef std::vector< VariableName > CoupledName
 

Protected Member Functions

void addICs (std::vector< std::string > &names)
 

Protected Attributes

Real _initial_pressure
 
Real _initial_temperature
 
RealVectorValue _initial_velocity
 
UserObjectName _fp_name
 
std::vector< std::string > _vars
 
std::vector< std::string > _auxs
 
unsigned int _dim
 

Detailed Description

This class allows us to have a section of the input file like the following which automatically adds initial conditions for all the required nonlinear and auxiliary variables.

[NavierStokes] [./ICs] initial_pressure = 101325. initial_temperature = 300. initial_velocity = '173.594354746921 0 0' fluid_properties = ideal_gas [../] []

Definition at line 31 of file AddNavierStokesICsAction.h.

Member Typedef Documentation

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

Definition at line 40 of file NSAction.h.

Constructor & Destructor Documentation

AddNavierStokesICsAction::AddNavierStokesICsAction ( InputParameters  parameters)

Definition at line 42 of file AddNavierStokesICsAction.C.

43  : NSAction(parameters),
44  _initial_pressure(getParam<Real>("initial_pressure")),
45  _initial_temperature(getParam<Real>("initial_temperature")),
46  _initial_velocity(getParam<RealVectorValue>("initial_velocity")),
47  _fp_name(getParam<UserObjectName>("fluid_properties"))
48 {
49 }
NSAction(InputParameters parameters)
Definition: NSAction.C:28
AddNavierStokesICsAction::~AddNavierStokesICsAction ( )
virtual

Definition at line 51 of file AddNavierStokesICsAction.C.

51 {}

Member Function Documentation

void AddNavierStokesICsAction::act ( )
virtual

Reimplemented from NSAction.

Definition at line 54 of file AddNavierStokesICsAction.C.

55 {
56  // Call the base class's act() function to initialize the _vars and _auxs names.
57  NSAction::act();
58 
59  // Now add the ICs for the nonlinear and auxiliary variables
60  addICs(_vars);
61  addICs(_auxs);
62 }
void addICs(std::vector< std::string > &names)
std::vector< std::string > _auxs
Definition: NSAction.h:33
std::vector< std::string > _vars
Definition: NSAction.h:32
virtual void act()
Definition: NSAction.C:33
void AddNavierStokesICsAction::addICs ( std::vector< std::string > &  names)
protected

Definition at line 65 of file AddNavierStokesICsAction.C.

Referenced by act().

66 {
67  for (const auto & name : names)
68  {
69  InputParameters params = _factory.getValidParams("NSInitialCondition");
70  params.set<VariableName>("variable") = name;
71  params.set<Real>("initial_pressure") = _initial_pressure;
72  params.set<Real>("initial_temperature") = _initial_temperature;
73  params.set<RealVectorValue>("initial_velocity") = _initial_velocity;
74  params.set<UserObjectName>("fluid_properties") = _fp_name;
75  _problem->addInitialCondition("NSInitialCondition", name + std::string("_ic"), params);
76  }
77 }

Member Data Documentation

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

Definition at line 33 of file NSAction.h.

Referenced by NSAction::act(), act(), and AddNavierStokesVariablesAction::act().

unsigned int NSAction::_dim
protectedinherited
UserObjectName AddNavierStokesICsAction::_fp_name
protected

Definition at line 46 of file AddNavierStokesICsAction.h.

Referenced by addICs().

Real AddNavierStokesICsAction::_initial_pressure
protected

Definition at line 43 of file AddNavierStokesICsAction.h.

Referenced by addICs().

Real AddNavierStokesICsAction::_initial_temperature
protected

Definition at line 44 of file AddNavierStokesICsAction.h.

Referenced by addICs().

RealVectorValue AddNavierStokesICsAction::_initial_velocity
protected

Definition at line 45 of file AddNavierStokesICsAction.h.

Referenced by addICs().

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

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