37                                           const std::string& material,
 
   40     if( !input.have_variable(
"Materials/"+material+
"/Viscosity/model") )
 
   42         libmesh_error_msg(
"Error: Could not find Materials/"+material+
"/Viscosity/model in input file.");
 
   45     model = input( 
"Materials/"+material+
"/Viscosity/model", 
"DIE!" );
 
   52                                                      const std::string& material,
 
   55     if( !input.have_variable(
"Materials/"+material+
"/ThermalConductivity/model") )
 
   57         libmesh_error_msg(
"Error: Could not find Materials/"+material+
"/ThermalConductivity/model in input file.");
 
   60     model = input( 
"Materials/"+material+
"/ThermalConductivity/model", 
"DIE!" );
 
   67                                               const std::string& material,
 
   70     if( !input.have_variable(
"Materials/"+material+
"/SpecificHeat/model") )
 
   72         libmesh_error_msg(
"Error: Could not find Materials/"+material+
"/SpecificHeat/model in input file.");
 
   75     model = input( 
"Materials/"+material+
"/SpecificHeat/model", 
"DIE!" );
 
   80                                                const std::string& material,
 
   83     if( !input.have_variable(
"Materials/"+material+
"/Viscosity/turb_visc_model") )
 
   85         libmesh_error_msg(
"Error: Could not find Materials/"+material+
"/Viscosity/turb_visc_model in input file.");
 
   88     model = input( 
"Materials/"+material+
"/Viscosity/turb_visc_model", 
"DIE!" );
 
   93                                               const std::string& material,
 
   95                                               std::string& strain_energy )
 
   97     if( !input.have_variable(
"Materials/"+material+
"/StressStrainLaw/model") )
 
   99         libmesh_error_msg(
"Error: Could not find Materials/"+material+
"/StressStrainLaw/model in input file!");
 
  102     model = input(
"Materials/"+material+
"/StressStrainLaw/model", 
"DIE!");
 
  103     strain_energy = input(
"Materials/"+material+
"/StressStrainLaw/strain_energy", 
"none");
 
  105     if( model == std::string( 
"HookesLaw" ) )
 
  107         std::string warning = 
"WARNING: Detected model HookesLaw. This is DEPRECATED!\n";
 
  108         warning += 
"         Please update to use hookes_law.\n";
 
  111         model = std::string(
"hookes_law");
 
  114     if( model == std::string( 
"MooneyRivlin" ) )
 
  116         std::string warning = 
"WARNING: Detected model MooneyRivlin. This is DEPRECATED!\n";
 
  117         warning += 
"         Please update model to use incompressible_hyperelasticity and\n";
 
  118         warning += 
"         set strain_energy to mooney_rivlin.\n";
 
  121         model = std::string(
"incompressible_hyperelasticity");
 
  122         strain_energy = std::string(
"mooney_rivlin");
 
  133     std::string material = input(
"Physics/"+core_physics_name+
"/material", 
"DIE!");
 
  137                                            "Physics/"+core_physics_name+
"/rho",
 
  138                                            "Materials/"+material+
"/Density/value" );
 
  141     if( !input.have_variable(
"Physics/"+core_physics_name+
"/rho") &&
 
  148             std::string warning = 
"WARNING: neither Physics/"+core_physics_name+
"/rho nor\n";
 
  149             warning += 
"         Physics/"+core_physics_name+
"/material options were detected.\n";
 
  151             warning += 
"        This behavior is DEPRECATED.\n";
 
  152             warning += 
"         Please update and use Physics/"+core_physics_name+
"/material.\n";
 
  162             std::string warning = 
"WARNING: neither Physics/"+core_physics_name+
"/rho nor\n";
 
  163             warning += 
"         Physics/"+core_physics_name+
"/material  nor\n";
 
  165             warning += 
"         We are assuming a density value of 1.0. This is DEPRECATED.\n";
 
  166             warning += 
"         Please update and use Physics/"+core_physics_name+
"/material.\n";
 
  171                "Physics/"+core_physics_name+
"/rho", 1.0 );
 
  175     else if( input.have_variable(
"Physics/"+core_physics_name+
"/rho") )
 
  182            "Physics/"+core_physics_name+
"/rho", 1.0 );
 
  186     else if( have_material )
 
  188         if( !input.have_variable(
"Materials/"+material+
"/Density/value") )
 
  189           libmesh_error_msg(
"ERROR: Could not find Materials/"+material+
"/Density/value in input!");
 
  193            "Materials/"+material+
"/Density/value", 0.0 );
 
  202         libmesh_error_msg(
"ERROR: Detected non-positive value of density!");
 
  211     std::string material = input(
"Physics/"+core_physics_name+
"/material", 
"DIE!");
 
  215                                            "Physics/"+core_physics_name+
"/Cp",
 
  216                                            "Materials/"+material+
"/SpecificHeat/value" );
 
  219     if( !input.have_variable(
"Physics/"+core_physics_name+
"/Cp") &&
 
  220         ( !input.have_variable(
"Physics/"+core_physics_name+
"/material") ||
 
  221           !input.have_variable(
"Materials/"+material+
"/SpecificHeat/value") ) )
 
  227             std::string warning = 
"WARNING: neither Physics/"+core_physics_name+
"/Cp nor\n";
 
  228             warning += 
"         Physics/"+core_physics_name+
"/material options were detected.\n";
 
  230             warning += 
"        This behavior is DEPRECATED.\n";
 
  231             warning += 
"         Please update and use Physics/"+core_physics_name+
"/material.\n";
 
  241             std::string warning = 
"WARNING: neither Physics/"+core_physics_name+
"/Cp nor\n";
 
  242             warning += 
"         Physics/"+core_physics_name+
"/material  nor\n";
 
  244             warning += 
"         We are assuming a specific heat value of 1.0. This is DEPRECATED.\n";
 
  245             warning += 
"         Please update and use Physics/"+core_physics_name+
"/material.\n";
 
  250                "Physics/"+core_physics_name+
"/Cp", 1.0 );
 
  255     if( input.have_variable(
"Physics/"+core_physics_name+
"/Cp") )
 
  258                                              "SpecificHeat/value" );
 
  262            "Physics/"+core_physics_name+
"/Cp", 1.0 );
 
  266     if( input.have_variable(
"Physics/"+core_physics_name+
"/material") &&
 
  267         input.have_variable(
"Materials/"+material+
"/SpecificHeat/value") )
 
  270         if( input(
"Materials/"+material+
"/SpecificHeat/model", 
"DIE!") !=
 
  271             std::string(
"constant") )
 
  272           libmesh_error_msg(
"ERROR: Only constant SpecificHeat model supported!");
 
  276            "Materials/"+material+
"/SpecificHeat/value", 0.0 );
 
  282         libmesh_error_msg(
"ERROR: Detected non-positive value of cp!");
 
  287                                         const std::string& old_option,
 
  288                                         const std::string& property,
 
  289                                         const std::string& core_physics,
 
  291                                         libMesh::Real& value )
 
  298                                            "Materials/"+material+
"/"+property+
"/value" );
 
  301     if( input.have_variable(old_option) )
 
  308     else if( input.have_variable(
"Materials/"+material+
"/"+property+
"/value" ) )
 
  311           (value, input, 
"Materials/"+material+
"/"+property+
"/value", 0.0 );
 
  316         libmesh_error_msg(
"ERROR: No valid input found for "+property+
"!");
 
  322         libmesh_error_msg(
"ERROR: Detected non-positive "+property+
"!");
 
  327                                                  const std::string& material,
 
  328                                                  std::vector<std::string>& species_names )
 
  331     species_names.clear();
 
  334                                             "Physics/Chemistry/species",
 
  335                                             "Materials/"+material+
"/GasMixture/species");
 
  337     std::string species_input;
 
  338     if( input.have_variable(
"Physics/Chemistry/species") )
 
  341         species_input = 
"Physics/Chemistry/species";
 
  343     else if( input.have_variable(
"Materials/"+material+
"/GasMixture/species") )
 
  345         species_input = 
"Materials/"+material+
"/GasMixture/species";
 
  349         libmesh_error_msg(
"ERROR: Valid input for species not found!");
 
  353     unsigned int n_species = input.vector_variable_size(species_input);
 
  355     species_names.reserve(n_species);
 
  356     for( 
unsigned int i = 0; i < n_species; i++ )
 
  360         species_names.push_back( input( species_input, 
"DIE!", i ) );
 
  365                                                  const std::string& material,
 
  366                                                  const std::string& prefix,
 
  367                                                  std::vector<std::string>& species_varnames )
 
  369     std::vector<std::string> species_names;
 
  371     unsigned int n_species = species_names.size();
 
  372     species_varnames.reserve(n_species);
 
  374     for( 
unsigned int i = 0; i < n_species; i++ )
 
  376         std::string var_name = prefix+species_names[i];
 
  377         species_varnames.push_back(var_name);
 
  382                                                       const std::string& material )
 
  387                                            "Physics/Antioch/Le",
 
  388                                            "Materials/"+material+
"/LewisNumber/value");
 
  390     libMesh::Real Le = 0.0;
 
  391     if( input.have_variable(
"Physics/Antioch/Le") )
 
  394         Le = input(
"Physics/Antioch/Le", 0.0);
 
  396     else if( input.have_variable(
"Materials/"+material+
"/LewisNumber/value") )
 
  398         Le = input(
"Materials/"+material+
"/LewisNumber/value", 0.0);
 
  402         libmesh_error_msg(
"ERROR: Could not find value input for LewisNumber!");
 
  409                                                                        const std::string& material )
 
  413                                            "Physics/Chemistry/chem_file",
 
  414                                            "Materials/"+material+
"/GasMixture/kinetics_data");
 
  416     std::string filename;
 
  417     if( input.have_variable(
"Physics/Chemistry/chem_file") )
 
  420                                             "GasMixture/kinetics_data" );
 
  422         filename = input(
"Physics/Chemistry/chem_file",
"DIE!");
 
  424     else if( input.have_variable(
"Materials/"+material+
"/GasMixture/kinetics_data") )
 
  426         filename = input(
"Materials/"+material+
"/GasMixture/kinetics_data", 
"DIE!");
 
  430         libmesh_error_msg(
"ERROR: Could not find valid input for kinetics_data!");
 
  437                                             const std::string& property )
 
  439     std::string warning = 
"WARNING: Input option "+old_option+
" is DEPRECATED!\n";
 
  440     warning += 
"         Please update to use Materials/MATERIAL_NAME/"+
property+
"\n";
 
  445                                                const std::string& option1,
 
  446                                                const std::string& option2 )
 
  448     if( input.have_variable(option1) &&
 
  449         input.have_variable(option2) )
 
  451         libmesh_error_msg(
"ERROR: Can't specify both "+option1+
" and "+option2+
"!");
 
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. 
 
static void parse_species_varnames(const GetPot &input, const std::string &material, const std::string &prefix, std::vector< std::string > &species_names)
Helper function for parsing the chemical species and setting variable name. 
 
static PhysicsName heat_transfer()
 
#define grins_warning(message)
 
static void viscosity_model(const GetPot &input, const std::string &physics, const std::string &material, std::string &model)
Parse the viscosity model for the given material. 
 
static void stress_strain_model(const GetPot &input, const std::string &, const std::string &material, std::string &model, std::string &strain_energy)
Parse the stress-strain model for the given material. 
 
static void read_density(const std::string &core_physics_name, const GetPot &input, ParameterUser ¶ms, libMesh::Real &rho)
Helper function to reading density from input. 
 
static void turb_viscosity_model(const GetPot &input, const std::string &physics, const std::string &material, std::string &model)
Parse the turbulence viscosity model for the given material. 
 
static void read_specific_heat(const std::string &core_physics_name, const GetPot &input, ParameterUser ¶ms, libMesh::Real &cp)
Helper function to reading scalar specific heat from input. 
 
static libMesh::Real parse_lewis_number(const GetPot &input, const std::string &material)
 
static void specific_heat_model(const GetPot &input, const std::string &physics, const std::string &material, std::string &model)
Parse the specific heat model for the given material. 
 
ParameterUser base class. Utility methods for subclasses. 
 
static void parse_chemical_species(const GetPot &input, const std::string &material, std::vector< std::string > &species_names)
Helper function for parsing the chemical species. 
 
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility. 
 
static PhysicsName incompressible_navier_stokes()
 
static std::string parse_chemical_kinetics_datafile_name(const GetPot &input, const std::string &material)
 
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility. 
 
static void read_property(const GetPot &input, const std::string &old_option, const std::string &property, const std::string &core_physics, ParameterUser ¶m_user, libMesh::Real &value)
Helper function for parsing/maintaing backward compatibility. 
 
static std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section. 
 
static bool have_material(const GetPot &input, const std::string &physics)
Check if Physics/physics section has a material variable. 
 
static void thermal_conductivity_model(const GetPot &input, const std::string &physics, const std::string &material, std::string &model)
Parse the conductivity model for the given material.