37 #include "libmesh/getpot.h"
38 #include "libmesh/string_to_enum.h"
39 #include "libmesh/fem_system.h"
44 template<
class Mu,
class SH,
class TC>
56 template<
class Mu,
class SH,
class TC>
62 template<
class Mu,
class SH,
class TC>
67 libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
low_mach_navier_stokes+
"/V_FE_family",
"LAGRANGE") );
70 libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
low_mach_navier_stokes+
"/P_FE_family",
"LAGRANGE") );
73 libMesh::Utility::string_to_enum<GRINSEnums::FEFamily>( input(
"Physics/"+
low_mach_navier_stokes+
"/T_FE_family",
"LAGRANGE") );
76 libMesh::Utility::string_to_enum<GRINSEnums::Order>( input(
"Physics/"+
low_mach_navier_stokes+
"/V_order",
"SECOND") );
79 libMesh::Utility::string_to_enum<GRINSEnums::Order>( input(
"Physics/"+
low_mach_navier_stokes+
"/P_order",
"FIRST") );
82 libMesh::Utility::string_to_enum<GRINSEnums::Order>( input(
"Physics/"+
low_mach_navier_stokes+
"/T_order",
"SECOND") );
101 std::cerr <<
"=========================================" << std::endl
102 <<
" Error: Gas constant R must be positive. " << std::endl
103 <<
" Detected value R = " << _R << std::endl
104 <<
"=========================================" << std::endl;
112 if( _enable_thermo_press_calc )
114 _p0_var_name = input(
"Physics/VariableNames/thermo_presure",
"p0" );
129 template<
class Mu,
class SH,
class TC>
133 this->_dim = system->get_mesh().mesh_dimension();
135 _u_var = system->add_variable( _u_var_name, this->_V_order, _V_FE_family);
136 _v_var = system->add_variable( _v_var_name, this->_V_order, _V_FE_family);
139 _w_var = system->add_variable( _w_var_name, this->_V_order, _V_FE_family);
143 _p_var = system->add_variable( _p_var_name, this->_P_order, _P_FE_family);
144 _T_var = system->add_variable( _T_var_name, this->_T_order, _T_FE_family);
148 if( _enable_thermo_press_calc )
149 _p0_var = system->add_variable( _p0_var_name, libMesh::FIRST, libMesh::SCALAR);
154 template<
class Mu,
class SH,
class TC>
157 const unsigned int dim = system->get_mesh().mesh_dimension();
159 system->time_evolving(_u_var);
160 system->time_evolving(_v_var);
163 system->time_evolving(_w_var);
165 system->time_evolving(_T_var);
166 system->time_evolving(_p_var);
168 if( _enable_thermo_press_calc )
169 system->time_evolving(_p0_var);
174 template<
class Mu,
class SH,
class TC>
180 context.get_element_fe(_u_var)->get_JxW();
181 context.get_element_fe(_u_var)->get_phi();
182 context.get_element_fe(_u_var)->get_dphi();
183 context.get_element_fe(_u_var)->get_xyz();
185 context.get_element_fe(_T_var)->get_JxW();
186 context.get_element_fe(_T_var)->get_phi();
187 context.get_element_fe(_T_var)->get_dphi();
188 context.get_element_fe(_T_var)->get_xyz();
190 context.get_element_fe(_p_var)->get_phi();
191 context.get_element_fe(_p_var)->get_xyz();
196 template<
class Mu,
class SH,
class TC>
198 (
const std::string & param_name,
203 _mu.register_parameter(param_name, param_pointer);
204 _cp.register_parameter(param_name, param_pointer);
205 _k.register_parameter(param_name, param_pointer);
LowMachNavierStokesBase()
virtual void read_input_options(const GetPot &input)
Read options from GetPot input file.
Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.
const std::string p_var_name_default
pressure
virtual void register_parameter(const std::string ¶m_name, libMesh::ParameterMultiPointer< libMesh::Number > ¶m_pointer) const
Each subclass will register its copy of an independent.
virtual void init_variables(libMesh::FEMSystem *system)
Initialize variables for this physics.
~LowMachNavierStokesBase()
const std::string v_var_name_default
y-velocity
const std::string T_var_name_default
temperature
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Sets velocity variables to be time-evolving.
const std::string u_var_name_default
Default physics variable names.
virtual void register_parameter(const std::string ¶m_name, libMesh::ParameterMultiPointer< libMesh::Number > ¶m_pointer) const
Each subclass will register its copy of an independent.
const PhysicsName low_mach_navier_stokes
Physics class for Incompressible Navier-Stokes.
virtual void init_context(AssemblyContext &context)
Initialize context for added physics variables.
const std::string w_var_name_default
z-velocity