GRINS-0.7.0
solid_mechanics_abstract.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 // libMesh
34 #include "libmesh/getpot.h"
35 #include "libmesh/fem_system.h"
36 
37 namespace GRINS
38 {
40  const GetPot& input )
41  : Physics(physics_name,input),
42  _disp_vars(input,physics_name,false,true)// is_2D = false, is_3D = true
43  {
44  this->register_variables();
45 
46  // For solid mechanics problems, we need to set the sign for tractions
47  // to '-' since the second order time solvers use a Newton residual of the form
48  // M(u)\ddot{u} + C(u)\dot{u} + F(u) + G(u) = 0
49  // In this case, then, the natural boundary conditions for the weak form
50  // will all have a '-', so we need to set that so the input tractions are
51  // positive.
53  }
54 
55  void SolidMechanicsAbstract::init_variables( libMesh::FEMSystem* system )
56  {
57  _disp_vars.init(system);
58  }
59 
60  void SolidMechanicsAbstract::set_time_evolving_vars( libMesh::FEMSystem* system )
61  {
62  // Tell the system to march temperature forward in time
63  system->time_evolving(_disp_vars.u());
64  system->time_evolving(_disp_vars.v());
65  system->time_evolving(_disp_vars.w());
66  }
67 
69  {
71  this->_disp_vars);
72  }
73 
74 } // end namespace GRINS
Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.
Definition: physics.h:107
static std::string displacement_section()
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Set which variables are time evolving.
static void check_and_register_variable(const std::string &var_name, const FEVariablesBase &variable)
First check if var_name is registered and then register.
GRINS namespace.
void set_neumann_bc_is_positive(bool is_positive)
Reset whetever Neumann bc is postive or not.
std::string PhysicsName
virtual void init(libMesh::FEMSystem *system)
Initialize System variables.
virtual void init_variables(libMesh::FEMSystem *system)
Initialize variables for this physics.

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