GRINS-0.7.0
physics_factory_incompressible_turb_flow.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
31 
32 // Physics whose factories we're instantiating
33 #include "grins/spalart_allmaras.h"
35 
36 namespace GRINS
37 {
38  template<template<typename> class DerivedPhysics>
39  libMesh::UniquePtr<Physics> PhysicsFactoryIncompressibleTurbFlow<DerivedPhysics>::build_physics( const GetPot& input,
40  const std::string& physics_name )
41  {
42  std::string core_physics = this->find_core_physics_name(physics_name);
43 
44  std::string viscosity;
45  PhysicsFactoryHelper::parse_turb_viscosity_model(input,core_physics,viscosity);
46 
47  libMesh::UniquePtr<Physics> new_physics;
48 
49  if( viscosity == "constant" )
50  new_physics.reset( new DerivedPhysics<ConstantViscosity>(physics_name,input) );
51 
52  else
53  this->visc_error_msg(physics_name, viscosity);
54 
55  libmesh_assert(new_physics);
56 
57  return new_physics;
58  }
59 
60  template<template<typename> class DerivedPhysics>
62  const std::string& viscosity ) const
63  {
64  std::string error = "================================================================\n";
65  error += "Invalid turblence viscosity model for "+physics+"\n";
66  error += "Viscosity model = "+viscosity+"\n";
67  error += "================================================================\n";
68 
69  libmesh_error_msg(error);
70  }
71 
72  // Instantiate all the "turbulent incompressble flow" Physics factories.
75 
78 
79 } // end namespace GRINS
static PhysicsName spalart_allmaras()
virtual libMesh::UniquePtr< Physics > build_physics(const GetPot &input, const std::string &physics_name)
void visc_error_msg(const std::string &physics, const std::string &viscosity) const
static PhysicsName spalart_allmaras_spgsm_stab()
GRINS namespace.
PhysicsFactoryIncompressibleTurbFlow< SpalartAllmarasSPGSMStabilization > grins_factory_spalart_allmaras_spgsm_stab(PhysicsNaming::spalart_allmaras_spgsm_stab(), PhysicsNaming::spalart_allmaras())
PhysicsFactoryIncompressibleTurbFlow< SpalartAllmaras > grins_factory_spalart_allmaras(PhysicsNaming::spalart_allmaras(), PhysicsNaming::spalart_allmaras())
static void parse_turb_viscosity_model(const GetPot &input, const std::string &physics, std::string &model)
Determine viscosity model used by turblence classes.

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