GRINS-0.7.0
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
GRINS::ElasticCableBase< StressStrainLaw > Class Template Reference

#include <elastic_cable_base.h>

Inheritance diagram for GRINS::ElasticCableBase< StressStrainLaw >:
Inheritance graph
[legend]
Collaboration diagram for GRINS::ElasticCableBase< StressStrainLaw >:
Collaboration graph
[legend]

Public Member Functions

 ElasticCableBase (const GRINS::PhysicsName &physics_name, const GetPot &input, bool is_compressible)
 
virtual ~ElasticCableBase ()
 
- Public Member Functions inherited from GRINS::ElasticCableAbstract
 ElasticCableAbstract (const GRINS::PhysicsName &physics_name, const GetPot &input)
 
virtual ~ElasticCableAbstract ()
 
virtual void init_context (AssemblyContext &context)
 Initialize context for added physics variables. More...
 
- Public Member Functions inherited from GRINS::SolidMechanicsAbstract
 SolidMechanicsAbstract (const GRINS::PhysicsName &physics_name, const GetPot &input)
 
virtual ~SolidMechanicsAbstract ()
 
virtual void init_variables (libMesh::FEMSystem *system)
 Initialize variables for this physics. More...
 
virtual void set_time_evolving_vars (libMesh::FEMSystem *system)
 Set which variables are time evolving. More...
 
- Public Member Functions inherited from GRINS::Physics
 Physics (const GRINS::PhysicsName &physics_name, const GetPot &input)
 
virtual ~Physics ()
 
virtual bool enabled_on_elem (const libMesh::Elem *elem)
 Find if current physics is active on supplied element. More...
 
void set_is_steady (bool is_steady)
 Sets whether this physics is to be solved with a steady solver or not. More...
 
bool is_steady () const
 Returns whether or not this physics is being solved with a steady solver. More...
 
virtual void auxiliary_init (MultiphysicsSystem &system)
 Any auxillary initialization a Physics class may need. More...
 
virtual void register_postprocessing_vars (const GetPot &input, PostProcessedQuantities< libMesh::Real > &postprocessing)
 Register name of postprocessed quantity with PostProcessedQuantities. More...
 
virtual void element_time_derivative (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Time dependent part(s) of physics for element interiors. More...
 
virtual void side_time_derivative (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Time dependent part(s) of physics for boundaries of elements on the domain boundary. More...
 
virtual void nonlocal_time_derivative (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Time dependent part(s) of physics for scalar variables. More...
 
virtual void element_constraint (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Constraint part(s) of physics for element interiors. More...
 
virtual void side_constraint (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Constraint part(s) of physics for boundaries of elements on the domain boundary. More...
 
virtual void nonlocal_constraint (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Constraint part(s) of physics for scalar variables. More...
 
virtual void damping_residual (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Damping matrix part(s) for element interiors. All boundary terms lie within the time_derivative part. More...
 
virtual void mass_residual (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Mass matrix part(s) for element interiors. All boundary terms lie within the time_derivative part. More...
 
virtual void nonlocal_mass_residual (bool compute_jacobian, AssemblyContext &context, CachedValues &cache)
 Mass matrix part(s) for scalar variables. More...
 
void init_ics (libMesh::FEMSystem *system, libMesh::CompositeFunction< libMesh::Number > &all_ics)
 
virtual void compute_element_time_derivative_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_side_time_derivative_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_nonlocal_time_derivative_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_element_constraint_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_side_constraint_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_nonlocal_constraint_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_damping_residual_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_mass_residual_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_nonlocal_mass_residual_cache (const AssemblyContext &context, CachedValues &cache)
 
virtual void compute_postprocessed_quantity (unsigned int quantity_index, const AssemblyContext &context, const libMesh::Point &point, libMesh::Real &value)
 
ICHandlingBaseget_ic_handler ()
 
- 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...
 

Protected Member Functions

void mass_residual_impl (bool compute_jacobian, AssemblyContext &context, InteriorFuncType interior_solution, VarDerivType get_solution_deriv, libMesh::Real mu=1.0)
 Implementation of mass_residual. More...
 
void compute_metric_tensors (unsigned int qp, const libMesh::FEBase &elem, const AssemblyContext &context, const libMesh::Gradient &grad_u, const libMesh::Gradient &grad_v, const libMesh::Gradient &grad_w, libMesh::TensorValue< libMesh::Real > &a_cov, libMesh::TensorValue< libMesh::Real > &a_contra, libMesh::TensorValue< libMesh::Real > &A_cov, libMesh::TensorValue< libMesh::Real > &A_contra, libMesh::Real &lambda_sq)
 
- Protected Member Functions inherited from GRINS::ElasticCableAbstract
const libMesh::FEGenericBase< libMesh::Real > * get_fe (const AssemblyContext &context)
 
- Protected Member Functions inherited from GRINS::Physics
libMesh::UniquePtr< libMesh::FEGenericBase< libMesh::Real > > build_new_fe (const libMesh::Elem *elem, const libMesh::FEGenericBase< libMesh::Real > *fe, const libMesh::Point p)
 
void parse_enabled_subdomains (const GetPot &input, const std::string &physics_name)
 

Protected Attributes

StressStrainLaw _stress_strain_law
 
bool _is_compressible
 
- Protected Attributes inherited from GRINS::ElasticCableAbstract
libMesh::Real _A
 Cross-sectional area of the cable. More...
 
libMesh::Real _rho
 Cable density. More...
 
- Protected Attributes inherited from GRINS::SolidMechanicsAbstract
DisplacementFEVariables _disp_vars
 
- Protected Attributes inherited from GRINS::Physics
const PhysicsName _physics_name
 Name of the physics object. Used for reading physics specific inputs. More...
 
GRINS::ICHandlingBase_ic_handler
 
std::set< libMesh::subdomain_id_type > _enabled_subdomains
 Subdomains on which the current Physics class is enabled. More...
 

Private Member Functions

 ElasticCableBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from GRINS::Physics
static void set_is_axisymmetric (bool is_axisymmetric)
 Set whether we should treat the problem as axisymmetric. More...
 
static bool is_axisymmetric ()
 
- 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...
 
- Protected Types inherited from GRINS::SolidMechanicsAbstract
typedef const libMesh::DenseSubVector< libMesh::Number > &(libMesh::DiffContext::* VarFuncType) (unsigned int) const
 
typedef void(libMesh::FEMContext::* InteriorFuncType) (unsigned int, unsigned int, libMesh::Real &) const
 
typedef libMesh::Real(libMesh::DiffContext::* VarDerivType) () const
 
- Static Protected Attributes inherited from GRINS::Physics
static bool _is_steady = false
 Caches whether or not the solver that's being used is steady or not. More...
 
static bool _is_axisymmetric = false
 Caches whether we are solving an axisymmetric problem or not. More...
 

Detailed Description

template<typename StressStrainLaw>
class GRINS::ElasticCableBase< StressStrainLaw >

Definition at line 34 of file elastic_cable_base.h.

Constructor & Destructor Documentation

template<typename StressStrainLaw >
GRINS::ElasticCableBase< StressStrainLaw >::ElasticCableBase ( const GRINS::PhysicsName physics_name,
const GetPot &  input,
bool  is_compressible 
)

Definition at line 40 of file elastic_cable_base.C.

43  : ElasticCableAbstract(physics_name,input),
45  _is_compressible(is_compressible)
46  {}
static PhysicsName elastic_cable()
StressStrainLaw _stress_strain_law
static std::string material_name(const GetPot &input, const std::string &physics)
Get the name of the material in the Physics/physics section.
template<typename StressStrainLaw >
virtual GRINS::ElasticCableBase< StressStrainLaw >::~ElasticCableBase ( )
inlinevirtual

Definition at line 42 of file elastic_cable_base.h.

42 {};
template<typename StressStrainLaw >
GRINS::ElasticCableBase< StressStrainLaw >::ElasticCableBase ( )
private

Member Function Documentation

template<typename StressStrainLaw >
void GRINS::ElasticCableBase< StressStrainLaw >::compute_metric_tensors ( unsigned int  qp,
const libMesh::FEBase &  elem,
const AssemblyContext context,
const libMesh::Gradient &  grad_u,
const libMesh::Gradient &  grad_v,
const libMesh::Gradient &  grad_w,
libMesh::TensorValue< libMesh::Real > &  a_cov,
libMesh::TensorValue< libMesh::Real > &  a_contra,
libMesh::TensorValue< libMesh::Real > &  A_cov,
libMesh::TensorValue< libMesh::Real > &  A_contra,
libMesh::Real &  lambda_sq 
)
protected

Definition at line 107 of file elastic_cable_base.C.

118  {
119  const std::vector<libMesh::RealGradient>& dxdxi = elem.get_dxyzdxi();
120 
121  const std::vector<libMesh::Real>& dxidx = elem.get_dxidx();
122  const std::vector<libMesh::Real>& dxidy = elem.get_dxidy();
123  const std::vector<libMesh::Real>& dxidz = elem.get_dxidz();
124 
125  libMesh::RealGradient dxi( dxidx[qp], dxidy[qp], dxidz[qp] );
126 
127  libMesh::RealGradient dudxi( grad_u(0), grad_v(0), grad_w(0) );
128 
129  // Covariant metric tensor of reference configuration
130  a_cov.zero();
131  a_cov(0,0) = dxdxi[qp]*dxdxi[qp];
132  a_cov(1,1) = 1.0;
133  a_cov(2,2) = 1.0;
134 
135  // Covariant metric tensor of current configuration
136  A_cov.zero();
137  A_cov(0,0) = (dxdxi[qp] + dudxi)*(dxdxi[qp] + dudxi);
138 
139  // Contravariant metric tensor of reference configuration
140  a_contra.zero();
141  a_contra(0,0) = 1/a_cov(0,0);
142  a_contra(1,1) = 1.0;
143  a_contra(2,2) = 1.0;
144 
145  // Contravariant metric tensor in current configuration is A_cov^{-1}
146  A_contra.zero();
147  A_contra(0,0) = 1/A_cov(0,0);
148 
149  // If the material is compressible, then lambda_sq is an independent variable
150  if( _is_compressible )
151  {
152  libmesh_not_implemented();
153  //lambda_sq = context.interior_value(this->_lambda_sq_var, qp);
154  }
155  else
156  {
157  // If the material is incompressible, lambda^2 is known
158  lambda_sq = a_cov(0,0)/A_cov(0,0);//det_a/det_A;
159  }
160 
161  //Update the covariant and contravariant tensors of current configuration
162  A_cov(1,1) = lambda_sq;
163  A_cov(2,2) = lambda_sq;
164  A_contra(1,1) = 1.0/lambda_sq;
165  A_contra(2,2) = 1.0/lambda_sq;
166  }
template<typename StressStrainLaw >
void GRINS::ElasticCableBase< StressStrainLaw >::mass_residual_impl ( bool  compute_jacobian,
AssemblyContext context,
InteriorFuncType  interior_solution,
VarDerivType  get_solution_deriv,
libMesh::Real  mu = 1.0 
)
protected

Implementation of mass_residual.

The mu argument is needed to support Rayleigh Damping.

Definition at line 49 of file elastic_cable_base.C.

Referenced by GRINS::ElasticCable< StressStrainLaw >::mass_residual().

54  {
55  const unsigned int n_u_dofs = context.get_dof_indices(this->_disp_vars.u()).size();
56 
57  const std::vector<libMesh::Real> &JxW =
58  this->get_fe(context)->get_JxW();
59 
60  const std::vector<std::vector<libMesh::Real> >& u_phi =
61  this->get_fe(context)->get_phi();
62 
63  // Residuals that we're populating
64  libMesh::DenseSubVector<libMesh::Number> &Fu = context.get_elem_residual(this->_disp_vars.u());
65  libMesh::DenseSubVector<libMesh::Number> &Fv = context.get_elem_residual(this->_disp_vars.v());
66  libMesh::DenseSubVector<libMesh::Number> &Fw = context.get_elem_residual(this->_disp_vars.w());
67 
68  libMesh::DenseSubMatrix<libMesh::Number>& Kuu = context.get_elem_jacobian(this->_disp_vars.u(),this->_disp_vars.u());
69  libMesh::DenseSubMatrix<libMesh::Number>& Kvv = context.get_elem_jacobian(this->_disp_vars.v(),this->_disp_vars.v());
70  libMesh::DenseSubMatrix<libMesh::Number>& Kww = context.get_elem_jacobian(this->_disp_vars.w(),this->_disp_vars.w());
71 
72  unsigned int n_qpoints = context.get_element_qrule().n_points();
73 
74  for (unsigned int qp=0; qp != n_qpoints; qp++)
75  {
76  libMesh::Real jac = JxW[qp];
77 
78  libMesh::Real u_ddot, v_ddot, w_ddot;
79  (context.*interior_solution)( this->_disp_vars.u(), qp, u_ddot );
80  (context.*interior_solution)( this->_disp_vars.v(), qp, v_ddot );
81  (context.*interior_solution)( this->_disp_vars.w(), qp, w_ddot );
82 
83  for (unsigned int i=0; i != n_u_dofs; i++)
84  {
85  libMesh::Real value = this->_rho*this->_A*u_phi[i][qp]*jac*mu;
86  Fu(i) += value*u_ddot;
87  Fv(i) += value*v_ddot;
88  Fw(i) += value*w_ddot;
89 
90  if( compute_jacobian )
91  {
92  for (unsigned int j=0; j != n_u_dofs; j++)
93  {
94  libMesh::Real jac_term = mu*this->_rho*this->_A*u_phi[i][qp]*u_phi[j][qp]*jac;
95  jac_term *= (context.*get_solution_deriv)();
96 
97  Kuu(i,j) += jac_term;
98  Kvv(i,j) += jac_term;
99  Kww(i,j) += jac_term;
100  }
101  }
102  }
103  }
104  }
libMesh::Real _rho
Cable density.
libMesh::Real _A
Cross-sectional area of the cable.
const libMesh::FEGenericBase< libMesh::Real > * get_fe(const AssemblyContext &context)

Member Data Documentation

template<typename StressStrainLaw >
bool GRINS::ElasticCableBase< StressStrainLaw >::_is_compressible
protected

Definition at line 68 of file elastic_cable_base.h.

template<typename StressStrainLaw >
StressStrainLaw GRINS::ElasticCableBase< StressStrainLaw >::_stress_strain_law
protected

Definition at line 66 of file elastic_cable_base.h.


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

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