Demo: A 3-D linear elasticity problem

This code solves three-dimensional linearized elastostatics problems. Its main structure is exactly the same as the 2-D code. So we will only outline the main differences with the former example.

  • First we invoke the 3-D elasticity equation, i.e. class Elas3DT4.

       Elas3DT4 eq(ms,u);

  • Next, before calling the member function run to solve the problem, we choose to use an iterative solver of the linear system. Here we use the Conjugate Gradient method with the Diagonal Incomplete LU preconditioner:

       eq.setSolver(CG_SOLVER,DILU_PREC);

  

An example

Let us run this program with the data presented in the following project file:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<OFELI_File>
   <info>
      <title></title>
      <date></date>
      <author></author>
   </info>
   <Project name="beam">
      <verbose>1</verbose>
      <save>1</save>
      <plot>1</plot>
      <init>1</init>
      <mesh_file>beam.m</mesh_file>
      <plot_file>beam.d</plot_file>
   </Project>
   <Prescription>
      <BodyForce dof="3">-1.0</BodyForce>
      <Traction code="7" dof="1">10000</Traction>
   </Prescription>
</OFELI_File>

We note here that the file gives project parameters and prescriptions as well. Indeed, we have prescribed a vertical body force equal to -1 to the beam.