Loading [MathJax]/extensions/tex2jax.js
libMesh
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Functions
assembly.C File Reference

Go to the source code of this file.

Functions

Real kronecker_delta (unsigned int i, unsigned int j)
 
Real elasticity_tensor (unsigned int i, unsigned int j, unsigned int k, unsigned int l)
 

Function Documentation

◆ elasticity_tensor()

Real elasticity_tensor ( unsigned int  i,
unsigned int  j,
unsigned int  k,
unsigned int  l 
)

Definition at line 43 of file assembly.C.

References kronecker_delta(), and libMesh::Real.

Referenced by LinearElasticity::assemble(), compute_stresses(), LinearElasticity::compute_stresses(), LargeDeformationElasticity::compute_stresses(), ElasticitySystem::element_time_derivative(), AssemblyA0::interior_assembly(), AssemblyA1::interior_assembly(), AssemblyA2::interior_assembly(), LargeDeformationElasticity::jacobian(), and LargeDeformationElasticity::residual().

47 {
48  // Define the Poisson ratio and Young's modulus
49  const Real nu = 0.3;
50  const Real E = 1.;
51 
52  // Define the Lame constants (lambda_1 and lambda_2) based on nu and E
53  const Real lambda_1 = E * nu / ((1. + nu) * (1. - 2.*nu));
54  const Real lambda_2 = 0.5 * E / (1. + nu);
55 
56  return lambda_1 * kronecker_delta(i, j) * kronecker_delta(k, l)
57  + lambda_2 * (kronecker_delta(i, k) * kronecker_delta(j, l) + kronecker_delta(i, l) * kronecker_delta(j, k));
58 }
Real kronecker_delta(unsigned int i, unsigned int j)
Definition: assembly.C:37
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ kronecker_delta()

Real kronecker_delta ( unsigned int  i,
unsigned int  j 
)
inline