libMesh
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

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

Definition at line 38 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(), ElasticitySystem::kronecker_delta(), and LargeDeformationElasticity::residual().

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