25 #ifndef GRINS_PHYSICS_FACTORY_VARIABLE_DENSITY_FLOW_H
26 #define GRINS_PHYSICS_FACTORY_VARIABLE_DENSITY_FLOW_H
37 template<
template<
typename,
typename,
typename>
class DerivedPhysics>
42 const std::string& core_physics_name )
50 virtual libMesh::UniquePtr<Physics>
build_physics(
const GetPot& input,
51 const std::string& physics_name );
54 const std::string& conductivity,
55 const std::string& viscosity,
56 const std::string& specific_heat )
const;
60 template<
template<
typename,
typename,
typename>
class DerivedPhysics>
63 const std::string& physics_name )
65 std::string core_physics = this->find_core_physics_name(physics_name);
67 std::string conductivity;
70 std::string viscosity;
73 std::string specific_heat;
76 libMesh::UniquePtr<Physics> new_physics;
78 if( conductivity ==
"constant" && viscosity ==
"constant" && specific_heat ==
"constant" )
79 new_physics.reset(
new DerivedPhysics<ConstantViscosity,ConstantSpecificHeat,ConstantConductivity>
80 (physics_name,input) );
83 this->prop_error_msg(physics_name, conductivity, viscosity, specific_heat);
85 libmesh_assert(new_physics);
90 template<
template<
typename,
typename,
typename>
class DerivedPhysics>
93 const std::string& conductivity,
94 const std::string& viscosity,
95 const std::string& specific_heat )
const
97 std::string error =
"================================================================\n";
98 error +=
"Invalid combination of models for "+physics+
"\n";
99 error +=
"Viscosity model = "+viscosity+
"\n";
100 error +=
"Conductivity model = "+conductivity+
"\n";
101 error +=
"Specific heat model = "+specific_heat+
"\n";
102 error +=
"================================================================\n";
104 libmesh_error_msg(error);
109 #endif // GRINS_PHYSICS_FACTORY_VARIABLE_DENSITY_FLOW_H
static void parse_viscosity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine viscosity model based on given physics name.
PhysicsFactory base class for Physics that may have a related "core" Physics.
void prop_error_msg(const std::string &physics, const std::string &conductivity, const std::string &viscosity, const std::string &specific_heat) const
~PhysicsFactoryVariableDensityFlow()
static void parse_conductivity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine conductivity model based on given physics name.
virtual libMesh::UniquePtr< Physics > build_physics(const GetPot &input, const std::string &physics_name)
PhysicsFactoryVariableDensityFlow(const std::string &physics_name, const std::string &core_physics_name)
static void parse_specific_heat_model(const GetPot &input, const std::string &physics, std::string &model)
Determine specific heat model based on given physics name.