Helper functions for PhysicsFactory.  
 More...
#include <physics_factory_helper.h>
 | 
| static void  | parse_viscosity_model (const GetPot &input, const std::string &physics, std::string &model) | 
|   | Determine viscosity model based on given physics name.  More...
  | 
|   | 
| static void  | parse_conductivity_model (const GetPot &input, const std::string &physics, std::string &model) | 
|   | Determine conductivity model based on given physics name.  More...
  | 
|   | 
| 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.  More...
  | 
|   | 
| static void  | parse_turb_viscosity_model (const GetPot &input, const std::string &physics, std::string &model) | 
|   | Determine viscosity model used by turblence classes.  More...
  | 
|   | 
| static void  | parse_stress_strain_model (const GetPot &input, const std::string &physics, std::string &model, std::string &strain_energy) | 
|   | Determine stress-strain law used by solid mechanics classes.  More...
  | 
|   | 
| static void  | parse_thermochemistry_model (const GetPot &input, const std::string &physics, std::string &model) | 
|   | Determine thermochemistry model type.  More...
  | 
|   | 
| static void  | parse_antioch_models (const GetPot &input, const std::string &physics, std::string &transport_model, std::string &thermo_model, std::string &viscosity_model, std::string &conductivity_model, std::string &diffusivity_model) | 
|   | 
 | 
| static void  | deprecated_visc_model_parsing (bool have_viscosity_model, bool have_material, const GetPot &input, const std::string &physics, std::string &model) | 
|   | 
Helper functions for PhysicsFactory. 
Definition at line 38 of file physics_factory_helper.h.
 
  
  
      
        
          | GRINS::PhysicsFactoryHelper::PhysicsFactoryHelper  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | GRINS::PhysicsFactoryHelper::~PhysicsFactoryHelper  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::deprecated_visc_model_parsing  | 
          ( | 
          bool  | 
          have_viscosity_model,  | 
         
        
           | 
           | 
          bool  | 
          have_material,  | 
         
        
           | 
           | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprivate   | 
  
 
Definition at line 407 of file physics_factory_helper.C.
References grins_warning, and GRINS::PhysicsNaming::incompressible_navier_stokes().
Referenced by parse_turb_viscosity_model(), and parse_viscosity_model().
  413     bool have_viscosity_model = input.have_variable( 
"Physics/"+physics+
"/viscosity_model");
 
  415     if( (have_material && have_ins_viscosity_model) ||
 
  416         (have_material && have_viscosity_model) )
 
  418         libmesh_error_msg(
"Error: Cannot specify both viscosity_model and material.");
 
  423     if( !have_ins_viscosity_model && !have_material && !have_viscosity_model )
 
  425         std::string warning = 
"Warning: Neither viscosity_model nor material were specified.\n";
 
  426         warning += 
"      We are assuming a constant viscosity model.\n";
 
  427         warning += 
"      This case is DEPRECATED.\n";
 
  428         warning += 
"      Please update and specify Physics/"+physics+
"/material.\n";
 
  434     if( have_ins_viscosity_model )
 
  437         warning += 
"         Please update to use Physics/"+physics+
"/material.\n";
 
  443     if( have_viscosity_model )
 
  445         std::string warning = 
"Warning: Option Physics/"+physics+
"/viscosity_model is DEPRECATED.\n";
 
  446         warning += 
"         Please update to use Physics/"+physics+
"/material.\n";
 
  449         model = input( 
"Physics/"+physics+
"/viscosity_model", 
"constant" );
 
#define grins_warning(message)
 
static PhysicsName incompressible_navier_stokes()
 
 
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_antioch_models  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          transport_model,  | 
         
        
           | 
           | 
          std::string &  | 
          thermo_model,  | 
         
        
           | 
           | 
          std::string &  | 
          viscosity_model,  | 
         
        
           | 
           | 
          std::string &  | 
          conductivity_model,  | 
         
        
           | 
           | 
          std::string &  | 
          diffusivity_model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 296 of file physics_factory_helper.C.
References GRINS::MaterialsParsing::check_for_input_option(), grins_warning, and GRINS::MaterialsParsing::material_name().
Referenced by GRINS::PhysicsFactoryReactingFlows< DerivedPhysics >::build_physics().
  307     bool have_transport_model = input.have_variable( 
"Physics/Antioch/transport_model" );
 
  310     if( have_transport_model &&
 
  311         input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/transport_model") )
 
  313         libmesh_error_msg(
"ERROR: Cannot specify both Materials/"+material+
"/GasMixture/Antioch/transport_model and Physics/Antioch/transport_model!");
 
  317     if( have_transport_model )
 
  319         std::string warning = 
"Warning: Option Physics/Antioch/transport_model is DEPRECATED.\n";
 
  320         warning += 
"         Please update to use Use Materials/MATERIAL_NAME/GasMixture/Antioch/transport_model.\n";
 
  323         transport_model = input( 
"Physics/Antioch/transport_model", 
"mixture_averaged" );
 
  326     else if( input.have_variable(
"Physics/Antioch/mixing_model") )
 
  328          std::string warning = 
"Warning: Option Physics/Antioch/mixing_model is DEPRECATED.\n";
 
  329         warning += 
"         Please update to use Use Materials/MATERIAL_NAME/GasMixture/Antioch/transport_model.\n";
 
  332         transport_model = input( 
"Physics/Antioch/mixing_model" , 
"mixture_averaged" );
 
  335     else if( input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/transport_model") )
 
  337         transport_model = input(
"Materials/"+material+
"/GasMixture/Antioch/transport_model", 
"DIE!");
 
  342         libmesh_error_msg(
"ERROR! Could not find valid transport_model input!");
 
  346     if( transport_model == std::string(
"wilke") )
 
  348         libMesh::err << 
"WARNING: Physics/Antioch/transport_model value of 'wilke' is deprecated!" << std::endl
 
  349                      << 
"         Replace Physics/Antioch/transport_model value with 'mixture_averaged'" 
  352         transport_model = 
"mixture_averaged";
 
  357     if( have_transport_model || input.have_variable(
"Physics/Antioch/mixing_model") )
 
  360         thermo_model = input( 
"Physics/Antioch/thermo_model", 
"stat_mech");
 
  361         viscosity_model = input( 
"Physics/Antioch/viscosity_model", 
"blottner");
 
  362         conductivity_model = input( 
"Physics/Antioch/conductivity_model", 
"eucken");
 
  363         diffusivity_model = input( 
"Physics/Antioch/diffusivity_model", 
"constant_lewis");
 
  366         if( input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/thermo_model")       ||
 
  367             input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/viscosity_model")    ||
 
  368             input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/thermal_conductivity_model") ||
 
  369             input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/mass_diffusivity_model") )
 
  371             libmesh_error_msg(
"ERROR: Cannot specifiy Physics/Antioch/transport_model and then specify Materials/"+material+
"/GasMixture/Antioch/<thermo,viscosity,conductivity,diffusivity>_model!");
 
  375     else if( input.have_variable(
"Materials/"+material+
"/GasMixture/Antioch/transport_model") )
 
  385         thermo_model = input( 
"Materials/"+material+
"/GasMixture/Antioch/thermo_model", 
"DIE!");
 
  386         viscosity_model = input( 
"Materials/"+material+
"/GasMixture/Antioch/viscosity_model", 
"DIE!");
 
  387         conductivity_model = input( 
"Materials/"+material+
"/GasMixture/Antioch/thermal_conductivity_model", 
"DIE!");
 
  388         diffusivity_model = input( 
"Materials/"+material+
"/GasMixture/Antioch/mass_diffusivity_model", 
"DIE!");
 
  391         if( input.have_variable(
"Physics/Antioch/thermo_model")       ||
 
  392             input.have_variable(
"Physics/Antioch/viscosity_model")    ||
 
  393             input.have_variable(
"Physics/Antioch/conductivity_model") ||
 
  394             input.have_variable(
"Physics/Antioch/diffusivity_model") )
 
  396             libmesh_error_msg(
"ERROR: Cannot specifiy Materials/"+material+
"/GasMixture/Antioch/transport_model and then specify Physics/Antioch/<thermo,viscosity,conductivity,diffusivity>_model!");
 
  402         libmesh_error_msg(
"ERROR! Could not find valid transport_model input!");
 
#define grins_warning(message)
 
static void check_for_input_option(const GetPot &input, const std::string &option)
Helper function to check for option and error out if it's not found. 
 
static std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section. 
 
 
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_conductivity_model  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Determine conductivity model based on given physics name. 
Definition at line 61 of file physics_factory_helper.C.
References grins_warning, GRINS::MaterialsParsing::have_material(), GRINS::PhysicsNaming::heat_transfer(), GRINS::MaterialsParsing::material_name(), and GRINS::MaterialsParsing::thermal_conductivity_model().
Referenced by GRINS::PhysicsFactoryHeatTransfer< DerivedPhysics >::build_physics(), and GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >::build_physics().
   71     bool have_conductivity_model = input.have_variable(
"Physics/"+physics+
"/conductivity_model");
 
   73     if( (have_material && have_conductivity_model) ||
 
   74         (have_material && have_ht_conductivity_model) )
 
   76         libmesh_error_msg(
"Error: Cannot specify both conductivity_model and material.");
 
   82     if( !have_conductivity_model && !have_material && !have_ht_conductivity_model )
 
   84         std::string warning = 
"Warning: Neither conductivity_model nor material were specified.\n";
 
   85         warning += 
"      We are assuming a constant conductivity model.\n";
 
   86         warning += 
"      This case is DEPRECATED.\n";
 
   87         warning += 
"      Please update and specify Physics/"+physics+
"/material.\n";
 
   94     if( have_ht_conductivity_model )
 
   97         warning += 
"         Please update to use Physics/"+physics+
"/material.\n";
 
  104     if( have_conductivity_model )
 
  106         std::string warning = 
"Warning: Option Physics/"+physics+
"/conductivity_model is DEPRECATED.\n";
 
  107         warning += 
"         Please update to use Physics/"+physics+
"/material.\n";
 
  110         model = input( 
"Physics/"+physics+
"/conductivity_model", 
"constant" );
 
static PhysicsName heat_transfer()
 
#define grins_warning(message)
 
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. 
 
 
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_specific_heat_model  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_stress_strain_model  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model,  | 
         
        
           | 
           | 
          std::string &  | 
          strain_energy  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Determine stress-strain law used by solid mechanics classes. 
Definition at line 195 of file physics_factory_helper.C.
References grins_warning, GRINS::MaterialsParsing::material_name(), and GRINS::MaterialsParsing::stress_strain_model().
Referenced by GRINS::PhysicsFactoryOneDStressSolids< DerivedPhysics >::build_physics(), and GRINS::PhysicsFactoryPlaneStressSolids< DerivedPhysics >::build_physics().
  204     bool have_elasticity_model = input.have_variable(
"Physics/"+physics+
"/elasticity_model");
 
  207     if( have_elasticity_model &&
 
  208         input.have_variable(
"Materials/"+material+
"/StressStrainLaw/model") )
 
  210         libmesh_error_msg(
"ERROR: Cannot specify both Materials/"+material+
"/StressStrainLaw/model and Physics/"+physics+
"/elasticity_model!");
 
  214     if( !have_elasticity_model &&
 
  215         !input.have_variable(
"Materials/"+material+
"/StressStrainLaw/model") )
 
  218         libmesh_error_msg(
"ERROR: Must specify Materials/"+material+
"/StressStrainLaw/model!");
 
  222     if( have_elasticity_model )
 
  224         std::string warning = 
"Warning: Option Physics/"+physics+
"/elasticity_model is DEPRECATED.\n";
 
  225         warning += 
"         Please update to use Materials/MATERIAL_NAME/StressStrainLaw/model.\n";
 
  228         model = input( 
"Physics/"+physics+
"/elasticity_model", 
"DIE!" );
 
  230         if( model == std::string(
"HookesLaw") )
 
  231           model = 
"hookes_law";
 
  232         if( model == std::string(
"MooneyRivlin") )
 
  234             model = 
"incompressible_hyperelasticity";
 
  235             strain_energy = 
"mooney_rivlin";
 
  240     else if( input.have_variable(
"Materials/"+material+
"/StressStrainLaw/model") )
 
  243                                                model, strain_energy );
 
#define grins_warning(message)
 
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 std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section. 
 
 
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_thermochemistry_model  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_turb_viscosity_model  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Determine viscosity model used by turblence classes. 
Definition at line 155 of file physics_factory_helper.C.
References deprecated_visc_model_parsing(), GRINS::MaterialsParsing::have_material(), GRINS::PhysicsNaming::incompressible_navier_stokes(), GRINS::MaterialsParsing::material_name(), and GRINS::MaterialsParsing::turb_viscosity_model().
Referenced by GRINS::PhysicsFactoryIncompressibleFlow< DerivedPhysics >::build_physics(), and GRINS::PhysicsFactoryIncompressibleTurbFlow< DerivedPhysics >::build_physics().
  175     if( !have_material &&
 
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 PhysicsName incompressible_navier_stokes()
 
static void deprecated_visc_model_parsing(bool have_viscosity_model, bool have_material, const GetPot &input, const std::string &physics, std::string &model)
 
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. 
 
 
 
 
  
  
      
        
          | void GRINS::PhysicsFactoryHelper::parse_viscosity_model  | 
          ( | 
          const GetPot &  | 
          input,  | 
         
        
           | 
           | 
          const std::string &  | 
          physics,  | 
         
        
           | 
           | 
          std::string &  | 
          model  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Determine viscosity model based on given physics name. 
Definition at line 38 of file physics_factory_helper.C.
References deprecated_visc_model_parsing(), GRINS::MaterialsParsing::have_material(), GRINS::PhysicsNaming::incompressible_navier_stokes(), GRINS::MaterialsParsing::material_name(), and GRINS::MaterialsParsing::viscosity_model().
Referenced by GRINS::PhysicsFactoryIncompressibleFlow< DerivedPhysics >::build_physics(), and GRINS::PhysicsFactoryVariableDensityFlow< DerivedPhysics >::build_physics().
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 PhysicsName incompressible_navier_stokes()
 
static void deprecated_visc_model_parsing(bool have_viscosity_model, bool have_material, const GetPot &input, const std::string &physics, std::string &model)
 
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. 
 
 
 
 
The documentation for this class was generated from the following files: