GRINS-0.8.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-2017 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(GRINSPrivate::VariableWarehouse::get_variable_subclass<DisplacementVariable>(VariablesParsing::disp_variable_name(input,physics_name,VariablesParsing::PHYSICS)))
43  {
44  // For solid mechanics problems, we need to set the sign for tractions
45  // to '-' since the second order time solvers use a Newton residual of the form
46  // M(u)\ddot{u} + C(u)\dot{u} + F(u) + G(u) = 0
47  // In this case, then, the natural boundary conditions for the weak form
48  // will all have a '-', so we need to set that so the input tractions are
49  // positive.
51 
53  }
54 
55  void SolidMechanicsAbstract::set_time_evolving_vars( libMesh::FEMSystem* system )
56  {
57  // Tell the system to march displacement forward in time, for as
58  // many displacement variables as the dimension we're tracking
59  system->time_evolving(_disp_vars.u(), 1);
60 
61  if( this->_disp_vars.dim() > 1 )
62  system->time_evolving(_disp_vars.v(), 1);
63 
64  if( this->_disp_vars.dim() > 2 )
65  system->time_evolving(_disp_vars.w(), 1);
66  }
67 
68 } // end namespace GRINS
Physics abstract base class. Defines API for physics to be added to MultiphysicsSystem.
Definition: physics.h:106
void check_var_subdomain_consistency(const FEVariablesBase &var) const
Check that var is enabled on at least the subdomains this Physics is.
Definition: physics.C:174
virtual void set_time_evolving_vars(libMesh::FEMSystem *system)
Set which variables are time evolving.
GRINS namespace.
void set_neumann_bc_is_positive(bool is_positive)
Reset whetever Neumann bc is postive or not.
std::string PhysicsName
unsigned int dim() const
Number of components.

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