Static elasticity

This tutorial extends the Poisson example to a vector-valued finite-element problem. You will configure material coefficients, displacement boundary data, and a linear solve for a small 2D body.

The executable is elastic_static, implemented by apps/app_elastic_static.cc and ElasticStaticProblem. The canonical input is tutorials/elastic_static/elastic_static.prm.in:

set dimension       = 2
set space dimension = 2

subsection Elastic static
  set FE degree              = 1
  set Initial refinement     = 0
  set Dirichlet boundary ids = 0, 2, 3
  set Neumann boundary ids   = 1
  set Output directory       = @TEST_OUTPUT_DIR@/tutorial-output/elastic-static
  set Output name            = elastic_static
  subsection Grid generation
    set Domain type              = generate
    set Grid generator           = hyper_cube
    set Grid generator arguments = 0: 1: true
    set Grid scale               = 1
    set Triangulation type       = distributed
  end
  subsection Refinement
    set Number of refinement cycles = 1
  end
  subsection Functions
    subsection Right hand side
      set Function expression = 1; 0
      set Variable names      = x,y,t
    end
    subsection Dirichlet boundary conditions
      set Function expression = 0; 0
      set Variable names      = x,y,t
    end
    subsection Dirichlet boundary conditions 0
      set Function expression = x; 0
      set Variable names      = x,y,t
    end
    subsection Dirichlet boundary conditions 2
      set Function expression = 0; y
      set Variable names      = x,y,t
    end
    subsection Dirichlet boundary conditions 3
      set Function expression = x; y
      set Variable names      = x,y,t
    end
    subsection Neumann boundary conditions
      set Function expression = 0; 1
      set Variable names      = x,y,t
    end
  end
  subsection Material properties
    subsection default
      set Lame mu     = 2
      set Lame lambda = 3
    end
  end
end

The square uses a vector FE_Q space. Three faces have prescribed displacement and the remaining face has a Neumann load. The Material properties subsection defines Lamé coefficients; the function expressions have one component per spatial dimension.

Run the configured input from the repository root:

cmake --build build -j
./build/elastic_static_debug \
  build/tutorials/elastic_static/elastic_static.prm

Results are written below build/test_output/tutorial-output/elastic-static. The application smoke test runs this exact input and checks the generated output. The elasticity executable provides immersed and verification workflows; its strong/weak/Neumann and MMS cases are kept under tutorials/elasticity/ and are separate from this introductory example.

For boundary-condition choices, see Choose boundary conditions. For the time-dependent extension, continue with Elastodynamics.