GRINS-0.8.0
List of all members | Public Member Functions | Private Attributes
GRINS::ConstantPrandtlConductivity Class Reference

#include <constant_prandtl_conductivity.h>

Inheritance diagram for GRINS::ConstantPrandtlConductivity:
Inheritance graph
[legend]
Collaboration diagram for GRINS::ConstantPrandtlConductivity:
Collaboration graph
[legend]

Public Member Functions

 ConstantPrandtlConductivity (const GetPot &input, const std::string &material)
 Constructor with specified material. More...
 
 ConstantPrandtlConductivity (const GetPot &input)
 Deprecated constructor. More...
 
 ~ConstantPrandtlConductivity ()
 
libMesh::Real operator() (const libMesh::Real mu, const libMesh::Real cp) const
 
- Public Member Functions inherited from GRINS::ParameterUser
 ParameterUser (const std::string &user_name)
 
virtual ~ParameterUser ()
 
virtual void set_parameter (libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
 Each subclass can simultaneously read a parameter value from. More...
 
virtual void set_parameter (libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void set_parameter (libMesh::ParsedFEMFunction< libMesh::Number > &func, const GetPot &input, const std::string &func_param_name, const std::string &param_default)
 Each subclass can simultaneously read a parsed function from. More...
 
virtual void move_parameter (const libMesh::Number &old_parameter, libMesh::Number &new_parameter)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &old_func, libMesh::ParsedFunction< libMesh::Number, libMesh::Gradient > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void move_parameter (const libMesh::ParsedFEMFunction< libMesh::Number > &old_func, libMesh::ParsedFEMFunction< libMesh::Number > &new_func)
 When cloning an object, we need to update parameter pointers. More...
 
virtual void register_parameter (const std::string &param_name, libMesh::ParameterMultiAccessor< libMesh::Number > &param_pointer) const
 Each subclass will register its copy of an independent. More...
 

Private Attributes

libMesh::Real _Pr
 

Additional Inherited Members

- Static Public Attributes inherited from GRINS::ParameterUser
static std::string zero_vector_function = std::string("{0}")
 A parseable function string with LIBMESH_DIM components, all 0. More...
 

Detailed Description

Definition at line 39 of file constant_prandtl_conductivity.h.

Constructor & Destructor Documentation

GRINS::ConstantPrandtlConductivity::ConstantPrandtlConductivity ( const GetPot &  input,
const std::string &  material 
)

Constructor with specified material.

Will look in the input file for [Materials/material/ThermalConductivity/Pr] for the value of viscosity.

Definition at line 59 of file constant_prandtl_conductivity.C.

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

60  : ParameterUser("ConstantPrandtlConductivity"),
61  _Pr(0.0)
62  {
63  // We can't have both the materials version and the old versions
65  "Materials/"+material+"/PrandtlNumber/value",
66  "Materials/Conductivity/Pr" );
67 
68  // If we have the "new" version, then parse it
69  if( input.have_variable("Materials/"+material+"/PrandtlNumber/value") )
70  {
71  this->set_parameter
72  (_Pr, input, "Materials/"+material+"/PrandtlNumber/value", _Pr);
73  }
74  // If instead we have the old version, use that.
75  else if( input.have_variable("Materials/Conductivity/Pr") )
76  {
77  MaterialsParsing::dep_input_warning( "Materials/Conductivity/Pr",
78  "PrandtlNumber/value" );
79 
80  this->set_parameter
81  (_Pr, input, "Materials/Conductivity/Pr", _Pr);
82  }
83  }
virtual void set_parameter(libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
ParameterUser(const std::string &user_name)
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.
GRINS::ConstantPrandtlConductivity::ConstantPrandtlConductivity ( const GetPot &  input)

Deprecated constructor.

Definition at line 39 of file constant_prandtl_conductivity.C.

References _Pr, grins_warning, and GRINS::ParameterUser::set_parameter().

40  : ParameterUser("ConstantPrandtlConductivity"),
41  _Pr(0.0)
42  {
43  // Warning about this constructor being deprecated
44  {
45  std::string warning = "WARNING: Use of this constructor is DEPRECATED.\n";
46  warning += " Please update to use constructor with input material name.\n";
47  grins_warning(warning);
48  }
49 
50  if( !input.have_variable("Materials/Conductivity/Pr") )
51  {
52  libmesh_error_msg("Error: Must specify Prandtl number for constant_prandtl conductivity model!");
53  }
54 
55  this->set_parameter
56  (_Pr, input, "Materials/Conductivity/Pr", _Pr);
57  }
virtual void set_parameter(libMesh::Number &param_variable, const GetPot &input, const std::string &param_name, libMesh::Number param_default)
Each subclass can simultaneously read a parameter value from.
#define grins_warning(message)
Definition: common.h:34
ParameterUser(const std::string &user_name)
GRINS::ConstantPrandtlConductivity::~ConstantPrandtlConductivity ( )

Definition at line 85 of file constant_prandtl_conductivity.C.

86  {
87  return;
88  }

Member Function Documentation

libMesh::Real GRINS::ConstantPrandtlConductivity::operator() ( const libMesh::Real  mu,
const libMesh::Real  cp 
) const
inline

Definition at line 62 of file constant_prandtl_conductivity.h.

References _Pr.

63  {
64  return mu*cp/_Pr;
65  }

Member Data Documentation

libMesh::Real GRINS::ConstantPrandtlConductivity::_Pr
private

Definition at line 56 of file constant_prandtl_conductivity.h.

Referenced by ConstantPrandtlConductivity(), and operator()().


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

Generated on Tue Dec 19 2017 12:47:30 for GRINS-0.8.0 by  doxygen 1.8.9.1