GRINS-0.7.0
List of all members | Public Member Functions | Static Public Member Functions
GRINS::MaterialsParsing Class Reference

Helper functions for parsing material properties. More...

#include <materials_parsing.h>

Public Member Functions

 MaterialsParsing ()
 
 ~MaterialsParsing ()
 

Static Public Member Functions

static bool have_material (const GetPot &input, const std::string &physics)
 Check if Physics/physics section has a material variable. More...
 
static std::string material_name (const GetPot &input, const std::string &physics)
 Get the name of the material in the Physics/physics section. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static void read_density (const std::string &core_physics_name, const GetPot &input, ParameterUser &params, libMesh::Real &rho)
 Helper function to reading density from input. More...
 
static void read_specific_heat (const std::string &core_physics_name, const GetPot &input, ParameterUser &params, libMesh::Real &cp)
 Helper function to reading scalar specific heat from input. More...
 
static void read_property (const GetPot &input, const std::string &old_option, const std::string &property, const std::string &core_physics, ParameterUser &param_user, libMesh::Real &value)
 Helper function for parsing/maintaing backward compatibility. More...
 
static void dep_input_warning (const std::string &old_option, const std::string &property)
 Helper function for parsing/maintaing backward compatibility. More...
 
static void duplicate_input_test (const GetPot &input, const std::string &option1, const std::string &option2)
 Helper function for parsing/maintaing backward compatibility. More...
 
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. More...
 
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. More...
 
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. More...
 
static libMesh::Real parse_lewis_number (const GetPot &input, const std::string &material)
 
static std::string parse_chemical_kinetics_datafile_name (const GetPot &input, const std::string &material)
 

Detailed Description

Helper functions for parsing material properties.

There's no state needed for these functions so we put them in a namespace instead of an object.

Definition at line 42 of file materials_parsing.h.

Constructor & Destructor Documentation

GRINS::MaterialsParsing::MaterialsParsing ( )
inline

Definition at line 45 of file materials_parsing.h.

45 {};
GRINS::MaterialsParsing::~MaterialsParsing ( )
inline

Definition at line 46 of file materials_parsing.h.

46 {};

Member Function Documentation

void GRINS::MaterialsParsing::check_for_input_option ( const GetPot &  input,
const std::string &  option 
)
inlinestatic

Helper function to check for option and error out if it's not found.

Definition at line 159 of file materials_parsing.h.

Referenced by GRINS::PhysicsFactoryHelper::parse_antioch_models().

160  {
161  if( !input.have_variable(option) )
162  libmesh_error_msg("ERROR: Could not find required input parameter "+option+"!");
163  }
void GRINS::MaterialsParsing::dep_input_warning ( const std::string &  old_option,
const std::string &  property 
)
static
void GRINS::MaterialsParsing::duplicate_input_test ( const GetPot &  input,
const std::string &  option1,
const std::string &  option2 
)
static
bool GRINS::MaterialsParsing::have_material ( const GetPot &  input,
const std::string &  physics 
)
inlinestatic
std::string GRINS::MaterialsParsing::material_name ( const GetPot &  input,
const std::string &  physics 
)
inlinestatic
std::string GRINS::MaterialsParsing::parse_chemical_kinetics_datafile_name ( const GetPot &  input,
const std::string &  material 
)
static

Definition at line 408 of file materials_parsing.C.

References dep_input_warning(), and duplicate_input_test().

Referenced by GRINS::AntiochMixture::AntiochMixture(), and GRINS::CanteraMixture::CanteraMixture().

410  {
411  // Can't specify both old_option and property
413  "Physics/Chemistry/chem_file",
414  "Materials/"+material+"/GasMixture/kinetics_data");
415 
416  std::string filename;
417  if( input.have_variable("Physics/Chemistry/chem_file") )
418  {
419  MaterialsParsing::dep_input_warning("Physics/Chemistry/chem_file",
420  "GasMixture/kinetics_data" );
421 
422  filename = input("Physics/Chemistry/chem_file","DIE!");
423  }
424  else if( input.have_variable("Materials/"+material+"/GasMixture/kinetics_data") )
425  {
426  filename = input("Materials/"+material+"/GasMixture/kinetics_data", "DIE!");
427  }
428  else
429  {
430  libmesh_error_msg("ERROR: Could not find valid input for kinetics_data!");
431  }
432 
433  return filename;
434  }
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
void GRINS::MaterialsParsing::parse_chemical_species ( const GetPot &  input,
const std::string &  material,
std::vector< std::string > &  species_names 
)
static

Helper function for parsing the chemical species.

The user-provided vector will populated with the chemical species names in the input file. "Physics/Chemistry/species" is deprecated in favor of "Material/"+material+"/GasMixture/species"

Todo:
Make this prefix string an input option

Definition at line 326 of file materials_parsing.C.

References dep_input_warning(), and duplicate_input_test().

Referenced by GRINS::AntiochChemistry::AntiochChemistry(), and parse_species_varnames().

329  {
330  // Clear out anything the user might've put in there.
331  species_names.clear();
332 
334  "Physics/Chemistry/species",
335  "Materials/"+material+"/GasMixture/species");
336 
337  std::string species_input;
338  if( input.have_variable("Physics/Chemistry/species") )
339  {
340  MaterialsParsing::dep_input_warning("Physics/Chemistry/species","GasMixture/species");
341  species_input = "Physics/Chemistry/species";
342  }
343  else if( input.have_variable("Materials/"+material+"/GasMixture/species") )
344  {
345  species_input = "Materials/"+material+"/GasMixture/species";
346  }
347  else
348  {
349  libmesh_error_msg("ERROR: Valid input for species not found!");
350  }
351 
352  // Read variable naming info
353  unsigned int n_species = input.vector_variable_size(species_input);
354 
355  species_names.reserve(n_species);
356  for( unsigned int i = 0; i < n_species; i++ )
357  {
360  species_names.push_back( input( species_input, "DIE!", i ) );
361  }
362  }
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
libMesh::Real GRINS::MaterialsParsing::parse_lewis_number ( const GetPot &  input,
const std::string &  material 
)
static

Definition at line 381 of file materials_parsing.C.

References dep_input_warning(), and duplicate_input_test().

Referenced by GRINS::AntiochConstantTransportMixture< Conductivity >::AntiochConstantTransportMixture(), and GRINS::AntiochMixtureAveragedTransportMixture< Thermo, Viscosity, Conductivity, Diffusivity >::specialized_build_diffusivity().

383  {
384 
385  // Can't specify both old_option and property
387  "Physics/Antioch/Le",
388  "Materials/"+material+"/LewisNumber/value");
389 
390  libMesh::Real Le = 0.0;
391  if( input.have_variable("Physics/Antioch/Le") )
392  {
393  MaterialsParsing::dep_input_warning("Physics/Antioch/Le", "LewisNumber/value" );
394  Le = input("Physics/Antioch/Le", 0.0);
395  }
396  else if( input.have_variable("Materials/"+material+"/LewisNumber/value") )
397  {
398  Le = input("Materials/"+material+"/LewisNumber/value", 0.0);
399  }
400  else
401  {
402  libmesh_error_msg("ERROR: Could not find value input for LewisNumber!");
403  }
404 
405  return Le;
406  }
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
void GRINS::MaterialsParsing::parse_species_varnames ( const GetPot &  input,
const std::string &  material,
const std::string &  prefix,
std::vector< std::string > &  species_names 
)
static

Helper function for parsing the chemical species and setting variable name.

The user-provided vector will populated with the chemical species variable names based on the species name the input file. The variable name will used for adding the variable to the libMesh System. "Physics/Chemistry/species" is deprecated in favor of "Material/"+material+"/GasMixture/species"

Definition at line 364 of file materials_parsing.C.

References parse_chemical_species().

Referenced by GRINS::SpeciesMassFractionsFEVariables::SpeciesMassFractionsFEVariables().

368  {
369  std::vector<std::string> species_names;
370  MaterialsParsing::parse_chemical_species(input,material,species_names);
371  unsigned int n_species = species_names.size();
372  species_varnames.reserve(n_species);
373 
374  for( unsigned int i = 0; i < n_species; i++ )
375  {
376  std::string var_name = prefix+species_names[i];
377  species_varnames.push_back(var_name);
378  }
379  }
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.
void GRINS::MaterialsParsing::read_density ( const std::string &  core_physics_name,
const GetPot &  input,
ParameterUser params,
libMesh::Real &  rho 
)
static

Helper function to reading density from input.

In particular, we want to handle backward compatibility before the introduction of material names in the input.

Definition at line 126 of file materials_parsing.C.

References dep_input_warning(), duplicate_input_test(), grins_warning, have_material(), GRINS::PhysicsNaming::incompressible_navier_stokes(), and GRINS::ParameterUser::set_parameter().

Referenced by GRINS::ElasticMembraneBase< StressStrainLaw >::ElasticMembraneBase(), GRINS::HeatConduction< Conductivity >::HeatConduction(), GRINS::HeatTransferBase< Conductivity >::HeatTransferBase(), GRINS::IncompressibleNavierStokesBase< Viscosity >::IncompressibleNavierStokesBase(), and GRINS::AxisymmetricHeatTransfer< Conductivity >::read_input_options().

130  {
131  bool have_material = MaterialsParsing::have_material(input,core_physics_name);
132 
133  std::string material = input("Physics/"+core_physics_name+"/material", "DIE!");
134 
135  // Error if both material/Density and rho are specified
137  "Physics/"+core_physics_name+"/rho",
138  "Materials/"+material+"/Density/value" );
139 
140  // It's deprecated to have nothing and default to 1.0
141  if( !input.have_variable("Physics/"+core_physics_name+"/rho") &&
142  !have_material )
143  {
144  // For some insane reason, we'd originally tied density specifically
145  // to PhysicsNaming::incompressible_navier_stokes(), so we'll check for that first.
146  if( input.have_variable("Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/rho") )
147  {
148  std::string warning = "WARNING: neither Physics/"+core_physics_name+"/rho nor\n";
149  warning += " Physics/"+core_physics_name+"/material options were detected.\n";
150  warning += " But we found Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/rho so we using that.\n";
151  warning += " This behavior is DEPRECATED.\n";
152  warning += " Please update and use Physics/"+core_physics_name+"/material.\n";
153  grins_warning(warning);
154 
155  params.set_parameter
156  (rho, input,
157  "Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/rho", 1.0 /*default*/);
158  }
159  // Otherwise, the insanity continued and we defaulted to 1.0
160  else
161  {
162  std::string warning = "WARNING: neither Physics/"+core_physics_name+"/rho nor\n";
163  warning += " Physics/"+core_physics_name+"/material nor\n";
164  warning += " Physics/"+PhysicsNaming::incompressible_navier_stokes()+"/rho options were detected.\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";
167  grins_warning(warning);
168 
169  params.set_parameter
170  (rho, input,
171  "Physics/"+core_physics_name+"/rho", 1.0 /*default*/);
172  }
173  }
174  // It's deprecated to use rho as the density input
175  else if( input.have_variable("Physics/"+core_physics_name+"/rho") )
176  {
177  MaterialsParsing::dep_input_warning( "Physics/"+core_physics_name+"/rho",
178  "Density/value" );
179 
180  params.set_parameter
181  (rho, input,
182  "Physics/"+core_physics_name+"/rho", 1.0 /*default*/);
183  }
184 
185  // This is the preferred version
186  else if( have_material )
187  {
188  if( !input.have_variable("Materials/"+material+"/Density/value") )
189  libmesh_error_msg("ERROR: Could not find Materials/"+material+"/Density/value in input!");
190 
191  params.set_parameter
192  (rho, input,
193  "Materials/"+material+"/Density/value", 0.0 /*default*/);
194  }
195  // Wat?
196  else
197  libmesh_error();
198 
199  // Let's make sure we actually got a valid density value
200  if( rho <= 0.0 )
201  {
202  libmesh_error_msg("ERROR: Detected non-positive value of density!");
203  }
204  }
#define grins_warning(message)
Definition: common.h:34
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 void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
static bool have_material(const GetPot &input, const std::string &physics)
Check if Physics/physics section has a material variable.
void GRINS::MaterialsParsing::read_property ( const GetPot &  input,
const std::string &  old_option,
const std::string &  property,
const std::string &  core_physics,
ParameterUser param_user,
libMesh::Real &  value 
)
static

Helper function for parsing/maintaing backward compatibility.

This function assumes that one of the old_option or the material-based property input must be specified. If that's not the case, this function should'nt be used. This also assumes that the property value should be positive and will error out if it's not.

Definition at line 286 of file materials_parsing.C.

References dep_input_warning(), duplicate_input_test(), material_name(), and GRINS::ParameterUser::set_parameter().

Referenced by GRINS::ElasticCableAbstract::ElasticCableAbstract(), GRINS::ElasticMembraneBase< StressStrainLaw >::ElasticMembraneBase(), GRINS::ReactingLowMachNavierStokesAbstract::read_input_options(), and GRINS::LowMachNavierStokesBase< Viscosity, SpecificHeat, ThermalConductivity >::read_input_options().

292  {
293  std::string material = MaterialsParsing::material_name(input,core_physics);
294 
295  // Can't specify both old_option and property
297  old_option,
298  "Materials/"+material+"/"+property+"/value" );
299 
300  // Deprecated
301  if( input.have_variable(old_option) )
302  {
303  MaterialsParsing::dep_input_warning( old_option,property+"/value" );
304 
305  param_user.set_parameter(value, input, old_option, 0.0 /*default*/);
306  }
307  // Preferred
308  else if( input.have_variable("Materials/"+material+"/"+property+"/value" ) )
309  {
310  param_user.set_parameter
311  (value, input, "Materials/"+material+"/"+property+"/value", 0.0 /*default*/);
312  }
313  // If nothing was set, that's an error
314  else
315  {
316  libmesh_error_msg("ERROR: No valid input found for "+property+"!");
317  }
318 
319  // Make sure value is positive
320  if( value <= 0.0 )
321  {
322  libmesh_error_msg("ERROR: Detected non-positive "+property+"!");
323  }
324  }
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
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.
void GRINS::MaterialsParsing::read_specific_heat ( const std::string &  core_physics_name,
const GetPot &  input,
ParameterUser params,
libMesh::Real &  cp 
)
static

Helper function to reading scalar specific heat from input.

In particular, we want to handle backward compatibility before the introduction of material names in the input.

Definition at line 206 of file materials_parsing.C.

References dep_input_warning(), duplicate_input_test(), grins_warning, GRINS::PhysicsNaming::heat_transfer(), and GRINS::ParameterUser::set_parameter().

Referenced by GRINS::BoussinesqBuoyancySPGSMStabilization< Viscosity >::BoussinesqBuoyancySPGSMStabilization(), GRINS::HeatConduction< Conductivity >::HeatConduction(), GRINS::HeatTransferBase< Conductivity >::HeatTransferBase(), and GRINS::AxisymmetricHeatTransfer< Conductivity >::read_input_options().

210  {
211  std::string material = input("Physics/"+core_physics_name+"/material", "DIE!");
212 
213  // Error if both material/SpecificHeat and Cp are specified
215  "Physics/"+core_physics_name+"/Cp",
216  "Materials/"+material+"/SpecificHeat/value" );
217 
218  // It's deprecated to have nothing and default to 1.0
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") ) )
222  {
223  // For some insane reason, we'd originally tied Cp specifically
224  // to PhysicsNaming::heat_transfer(), so we'll check for that first.
225  if( input.have_variable("Physics/"+PhysicsNaming::heat_transfer()+"/Cp") )
226  {
227  std::string warning = "WARNING: neither Physics/"+core_physics_name+"/Cp nor\n";
228  warning += " Physics/"+core_physics_name+"/material options were detected.\n";
229  warning += " But we found Physics/"+PhysicsNaming::heat_transfer()+"/Cp so we using that.\n";
230  warning += " This behavior is DEPRECATED.\n";
231  warning += " Please update and use Physics/"+core_physics_name+"/material.\n";
232  grins_warning(warning);
233 
234  params.set_parameter
235  (cp, input,
236  "Physics/"+PhysicsNaming::heat_transfer()+"/Cp", 1.0 /*default*/);
237  }
238  // Otherwise, the insanity continued and we defaulted to 1.0
239  else
240  {
241  std::string warning = "WARNING: neither Physics/"+core_physics_name+"/Cp nor\n";
242  warning += " Physics/"+core_physics_name+"/material nor\n";
243  warning += " Physics/"+PhysicsNaming::heat_transfer()+"/Cp options were detected.\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";
246  grins_warning(warning);
247 
248  params.set_parameter
249  (cp, input,
250  "Physics/"+core_physics_name+"/Cp", 1.0 /*default*/);
251  }
252  }
253 
254  // It's deprecated to use Cp as the specific heat input
255  if( input.have_variable("Physics/"+core_physics_name+"/Cp") )
256  {
257  MaterialsParsing::dep_input_warning( "Physics/"+core_physics_name+"/Cp",
258  "SpecificHeat/value" );
259 
260  params.set_parameter
261  (cp, input,
262  "Physics/"+core_physics_name+"/Cp", 1.0 /*default*/);
263  }
264 
265  // This is the preferred version
266  if( input.have_variable("Physics/"+core_physics_name+"/material") &&
267  input.have_variable("Materials/"+material+"/SpecificHeat/value") )
268  {
269  // This function only supports reading a constant
270  if( input("Materials/"+material+"/SpecificHeat/model", "DIE!") !=
271  std::string("constant") )
272  libmesh_error_msg("ERROR: Only constant SpecificHeat model supported!");
273 
274  params.set_parameter
275  (cp, input,
276  "Materials/"+material+"/SpecificHeat/value", 0.0 /*default*/);
277  }
278 
279  // Let's make sure we actually got a valid density value
280  if( cp <= 0.0 )
281  {
282  libmesh_error_msg("ERROR: Detected non-positive value of cp!");
283  }
284  }
static PhysicsName heat_transfer()
#define grins_warning(message)
Definition: common.h:34
static void dep_input_warning(const std::string &old_option, const std::string &property)
Helper function for parsing/maintaing backward compatibility.
static void duplicate_input_test(const GetPot &input, const std::string &option1, const std::string &option2)
Helper function for parsing/maintaing backward compatibility.
void GRINS::MaterialsParsing::specific_heat_model ( const GetPot &  input,
const std::string &  physics,
const std::string &  material,
std::string &  model 
)
static

Parse the specific heat model for the given material.

Definition at line 65 of file materials_parsing.C.

Referenced by GRINS::PhysicsFactoryHelper::parse_specific_heat_model().

69  {
70  if( !input.have_variable("Materials/"+material+"/SpecificHeat/model") )
71  {
72  libmesh_error_msg("Error: Could not find Materials/"+material+"/SpecificHeat/model in input file.");
73  }
74 
75  model = input( "Materials/"+material+"/SpecificHeat/model", "DIE!" );
76  }
void GRINS::MaterialsParsing::stress_strain_model ( const GetPot &  input,
const std::string &  ,
const std::string &  material,
std::string &  model,
std::string &  strain_energy 
)
static

Parse the stress-strain model for the given material.

Definition at line 91 of file materials_parsing.C.

References grins_warning.

Referenced by GRINS::PhysicsFactoryHelper::parse_stress_strain_model().

96  {
97  if( !input.have_variable("Materials/"+material+"/StressStrainLaw/model") )
98  {
99  libmesh_error_msg("Error: Could not find Materials/"+material+"/StressStrainLaw/model in input file!");
100  }
101 
102  model = input("Materials/"+material+"/StressStrainLaw/model", "DIE!");
103  strain_energy = input("Materials/"+material+"/StressStrainLaw/strain_energy", "none");
104  // These options are deprecated
105  if( model == std::string( "HookesLaw" ) )
106  {
107  std::string warning = "WARNING: Detected model HookesLaw. This is DEPRECATED!\n";
108  warning += " Please update to use hookes_law.\n";
109  grins_warning(warning);
110 
111  model = std::string("hookes_law");
112  }
113 
114  if( model == std::string( "MooneyRivlin" ) )
115  {
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";
119  grins_warning(warning);
120 
121  model = std::string("incompressible_hyperelasticity");
122  strain_energy = std::string("mooney_rivlin");
123  }
124  }
#define grins_warning(message)
Definition: common.h:34
void GRINS::MaterialsParsing::thermal_conductivity_model ( const GetPot &  input,
const std::string &  physics,
const std::string &  material,
std::string &  model 
)
static

Parse the conductivity model for the given material.

Definition at line 50 of file materials_parsing.C.

Referenced by GRINS::PhysicsFactoryHelper::parse_conductivity_model().

54  {
55  if( !input.have_variable("Materials/"+material+"/ThermalConductivity/model") )
56  {
57  libmesh_error_msg("Error: Could not find Materials/"+material+"/ThermalConductivity/model in input file.");
58  }
59 
60  model = input( "Materials/"+material+"/ThermalConductivity/model", "DIE!" );
61 
62  return;
63  }
void GRINS::MaterialsParsing::turb_viscosity_model ( const GetPot &  input,
const std::string &  physics,
const std::string &  material,
std::string &  model 
)
static

Parse the turbulence viscosity model for the given material.

Definition at line 78 of file materials_parsing.C.

Referenced by GRINS::PhysicsFactoryHelper::parse_turb_viscosity_model().

82  {
83  if( !input.have_variable("Materials/"+material+"/Viscosity/turb_visc_model") )
84  {
85  libmesh_error_msg("Error: Could not find Materials/"+material+"/Viscosity/turb_visc_model in input file.");
86  }
87 
88  model = input( "Materials/"+material+"/Viscosity/turb_visc_model", "DIE!" );
89  }
void GRINS::MaterialsParsing::viscosity_model ( const GetPot &  input,
const std::string &  physics,
const std::string &  material,
std::string &  model 
)
static

Parse the viscosity model for the given material.

Definition at line 35 of file materials_parsing.C.

Referenced by GRINS::PhysicsFactoryHelper::parse_viscosity_model().

39  {
40  if( !input.have_variable("Materials/"+material+"/Viscosity/model") )
41  {
42  libmesh_error_msg("Error: Could not find Materials/"+material+"/Viscosity/model in input file.");
43  }
44 
45  model = input( "Materials/"+material+"/Viscosity/model", "DIE!" );
46 
47  return;
48  }

The documentation for this class was generated from the following files:

Generated on Thu Jun 2 2016 21:52:31 for GRINS-0.7.0 by  doxygen 1.8.10