26 #include "grins_config.h"
39 #include "libmesh/string_to_enum.h"
40 #include "libmesh/quadrature.h"
41 #include "libmesh/fem_system.h"
45 template<
typename Mixture,
typename Evaluator>
62 template<
typename Mixture,
typename Evaluator>
68 template<
typename Mixture,
typename Evaluator>
72 this->_species_FE_family = libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
reacting_low_mach_navier_stokes+
"/species_FE_family",
"LAGRANGE") );
74 this->_V_FE_family = libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
reacting_low_mach_navier_stokes+
"/V_FE_family",
"LAGRANGE") );
76 this->_P_FE_family = libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
reacting_low_mach_navier_stokes+
"/P_FE_family",
"LAGRANGE") );
78 this->_T_FE_family = libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
reacting_low_mach_navier_stokes+
"/T_FE_family",
"LAGRANGE") );
81 this->_species_order = libMesh::Utility::string_to_enum<GRINSEnums::Order>( input(
"Physics/"+
reacting_low_mach_navier_stokes+
"/species_order",
"SECOND") );
90 this->_n_species = input.vector_variable_size(
"Physics/Chemistry/species");
92 _species_var_names.reserve(this->_n_species);
93 for(
unsigned int i = 0; i < this->_n_species; i++ )
96 std::string var_name =
"w_"+std::string(input(
"Physics/Chemistry/species",
"DIE!", i ));
97 _species_var_names.push_back( var_name );
112 if( _enable_thermo_press_calc )
114 _p0_var_name = input(
"Physics/VariableNames/thermo_presure",
"p0" );
129 template<
typename Mixture,
typename Evaluator>
133 this->_dim = system->get_mesh().mesh_dimension();
135 _species_vars.reserve(this->_n_species);
136 for(
unsigned int i = 0; i < this->_n_species; i++ )
138 _species_vars.push_back( system->add_variable( _species_var_names[i],
139 this->_species_order, _species_FE_family) );
142 _u_var = system->add_variable( _u_var_name, this->_V_order, _V_FE_family);
143 _v_var = system->add_variable( _v_var_name, this->_V_order, _V_FE_family);
146 _w_var = system->add_variable( _w_var_name, this->_V_order, _V_FE_family);
150 _p_var = system->add_variable( _p_var_name, this->_P_order, _P_FE_family);
151 _T_var = system->add_variable( _T_var_name, this->_T_order, _T_FE_family);
155 if( _enable_thermo_press_calc )
156 _p0_var = system->add_variable( _p0_var_name, libMesh::FIRST, libMesh::SCALAR);
161 template<
typename Mixture,
typename Evaluator>
164 const unsigned int dim = system->get_mesh().mesh_dimension();
166 for(
unsigned int i = 0; i < this->_n_species; i++ )
168 system->time_evolving( _species_vars[i] );
171 system->time_evolving(_u_var);
172 system->time_evolving(_v_var);
175 system->time_evolving(_w_var);
177 system->time_evolving(_T_var);
178 system->time_evolving(_p_var);
180 if( _enable_thermo_press_calc )
181 system->time_evolving(_p0_var);
186 template<
typename Mixture,
typename Evaluator>
192 context.get_element_fe(_species_vars[0])->get_JxW();
193 context.get_element_fe(_species_vars[0])->get_phi();
194 context.get_element_fe(_species_vars[0])->get_dphi();
195 context.get_element_fe(_species_vars[0])->get_xyz();
197 context.get_element_fe(_u_var)->get_JxW();
198 context.get_element_fe(_u_var)->get_phi();
199 context.get_element_fe(_u_var)->get_dphi();
200 context.get_element_fe(_u_var)->get_xyz();
202 context.get_element_fe(_T_var)->get_JxW();
203 context.get_element_fe(_T_var)->get_phi();
204 context.get_element_fe(_T_var)->get_dphi();
205 context.get_element_fe(_T_var)->get_xyz();
207 context.get_element_fe(_p_var)->get_phi();
208 context.get_element_fe(_p_var)->get_xyz();
virtual void set_parameter(libMesh::Number ¶m_variable, const GetPot &input, const std::string ¶m_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Sets velocity variables to be time-evolving.
ReactingLowMachNavierStokesBase()
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.
virtual void read_input_options(const GetPot &input)
Read options from GetPot input file.
const std::string p_var_name_default
pressure
const std::string v_var_name_default
y-velocity
const std::string T_var_name_default
temperature
~ReactingLowMachNavierStokesBase()
const std::string u_var_name_default
Default physics variable names.
const PhysicsName reacting_low_mach_navier_stokes
virtual void init_variables(libMesh::FEMSystem *system)
Initialize variables for this physics.
const std::string w_var_name_default
z-velocity
libMesh::Real _fixed_rho_value