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 Initial refinement = 1
set Output directory = @TEST_OUTPUT_DIR@/tutorial-output/coupled-poisson-elasticity
set Dirichlet boundary ids = 0, 1
subsection Grid generation
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 Initial refinement = 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 Grid generation
set Domain type = generate
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 creates FESpaceViews for the two native DoFHandlers, names
the solution fields, constructs the lift and the surface normal, and adds a
weak_term to a LinearAdapter. The adapter owns the execution vector and
the coupled solve. Each Problem receives its accepted solution before native
output is written.
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 two Problem outputs and a diagnostics file below the configured output directory. It checks the coupled residual, the pressure factor, and the traction balance. The same input is used by the application integration test.