Coupled Poisson–elasticity¶
This application composes a 1D-in-3D Poisson Problem with a 3D static elasticity Problem. The Poisson solution is multiplied by two, lifted from the representative cylinder, converted to a normal traction, and assembled against the elasticity displacement test field:
PoissonSolver<1,3> -> value -> lift -> normal traction
-> test(displacement)
ElasticStaticProblem<3,3> ------------^
The executable is coupled_poisson_elasticity, from
apps/app_coupled_poisson_elasticity.cc. Its input is
tutorials/coupled_poisson_elasticity/coupled_poisson_elasticity.prm.in:
subsection Poisson
set FE degree = 2
set Output directory = @TEST_OUTPUT_DIR@/tutorial-output/coupled-poisson-elasticity
set Dirichlet boundary ids = 0, 1
subsection Domain
set Initial refinement = 1
set Grid generator = hyper_cube
set Grid generator arguments = 0: 1: false
set Triangulation type = fullydistributed
end
subsection Right hand side
set Function expression = 1
set Variable names = x,y,z,t
end
subsection Dirichlet boundary conditions
set Function expression = 0
set Variable names = x,y,z,t
end
end
subsection Pressure lift
set Thickness = 0.2
subsection Representative quadrature
set Type = gauss
set Number of points = 3
set Number of repetitions = 1
end
subsection Cross section
set Geometry type = hyper_ball
set Refinement level = 1
set Maximum basis degree = 0
set Selected modes = 0
set Quadrature type = gauss
set Number of points = 4
set Number of repetitions = 1
end
end
subsection Elastic static
set FE degree = 1
set Dirichlet boundary ids = 0
set Neumann boundary ids =
set Output directory = @TEST_OUTPUT_DIR@/tutorial-output/coupled-poisson-elasticity
set Output name = coupled_elasticity
subsection Domain
set Initial refinement = 1
set Grid generator = hyper_cube
set Grid generator arguments = 0: 1: false
set Grid scale = 1
set Triangulation type = fullydistributed
end
subsection Functions
subsection Right hand side
set Function expression = 0; 0; 0
set Variable names = x,y,z,t
end
subsection Dirichlet boundary conditions
set Function expression = 0; 0; 0
set Variable names = x,y,z,t
end
subsection Neumann boundary conditions
set Function expression = 0; 0; 0
set Variable names = x,y,z,t
end
end
end
The application calls setup() on each Problem and adds both Problems to a
LinearAdapter. It forms the traction from their semantic Fields with
make_lift(2. * value(poisson.solution), pressure_lift) * normal(surface) and
adds the resulting weak_term against test(elastic.displacement). The adapter
owns the execution vector and coupled solve. OutputHandler writes both
semantic Fields directly from the adapter state.
Run the configured input with:
mpirun -np 1 ./build/coupled_poisson_elasticity_debug \
build/tutorials/coupled_poisson_elasticity/coupled_poisson_elasticity.prm
The executable writes the pressure and displacement Fields below the configured output directory. Integration tests check the coupled residual, pressure scaling, and traction balance; the application test checks the configured output.