GRINS-0.7.0
physics_factory_heat_transfer.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 // This class
27 
28 // GRINS
32 
33 // Physics we're instantiating
34 #include "grins/heat_conduction.h"
35 #include "grins/heat_transfer.h"
39 
40 namespace GRINS
41 {
42  template<template<typename> class DerivedPhysics>
43  libMesh::UniquePtr<Physics> PhysicsFactoryHeatTransfer<DerivedPhysics>::build_physics( const GetPot& input,
44  const std::string& physics_name )
45  {
46  std::string core_physics = this->find_core_physics_name(physics_name);
47 
48  std::string conductivity;
49  PhysicsFactoryHelper::parse_conductivity_model(input,core_physics,conductivity);
50 
51  libMesh::UniquePtr<Physics> new_physics;
52 
53  if( conductivity == "constant" )
54  new_physics.reset( new DerivedPhysics<ConstantConductivity>(physics_name,input) );
55 
56  else if( conductivity == "parsed" )
57  new_physics.reset( new DerivedPhysics<ParsedConductivity>(physics_name,input) );
58 
59  else
60  this->cond_error_msg(physics_name, conductivity);
61 
62  libmesh_assert(new_physics);
63 
64  return new_physics;
65  }
66 
67  template<template<typename> class DerivedPhysics>
69  const std::string& conductivity ) const
70  {
71  std::string error = "================================================================\n";
72  error += "Invalid conductivity model for "+physics+"\n";
73  error += "Conductivity model = "+conductivity+"\n";
74  error += "================================================================\n";
75 
76  libmesh_error_msg(error);
77  }
78 
81 
84 
87 
90 
91  // This needs to die. Axisymmetry should be handled within heat_transfer
94 
95 } // end namespace GRINS
static PhysicsName heat_transfer_adjoint_stab()
static PhysicsName heat_transfer()
static PhysicsName heat_transfer_spgsm_stab()
virtual libMesh::UniquePtr< Physics > build_physics(const GetPot &input, const std::string &physics_name)
void cond_error_msg(const std::string &physics, const std::string &conductivity) const
PhysicsFactoryHeatTransfer< HeatConduction > grins_factory_heat_conduction(PhysicsNaming::heat_conduction(), PhysicsNaming::heat_conduction())
GRINS namespace.
PhysicsFactoryHeatTransfer< HeatTransfer > grins_factory_heat_transfer(PhysicsNaming::heat_transfer(), PhysicsNaming::heat_transfer())
static void parse_conductivity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine conductivity model based on given physics name.
PhysicsFactoryHeatTransfer< AxisymmetricHeatTransfer > grins_factory_axi_heat_transfer(PhysicsNaming::axisymmetric_heat_transfer(), PhysicsNaming::axisymmetric_heat_transfer())
PhysicsFactoryHeatTransfer< HeatTransferAdjointStabilization > grins_factory_heat_transfer_adjoint_stab(PhysicsNaming::heat_transfer_adjoint_stab(), PhysicsNaming::heat_transfer())
static PhysicsName axisymmetric_heat_transfer()
PhysicsFactoryHeatTransfer< HeatTransferAdjointStabilization > grins_factory_heat_transfer_spgsm_stab(PhysicsNaming::heat_transfer_spgsm_stab(), PhysicsNaming::heat_transfer())
static PhysicsName heat_conduction()

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