We start with Poisson equation:
w.r.t boundary conditions
where
We solve the Poisson equation on a square domain
and the source term is
The solution of this problem is
The main project file is
square_1e2_volumetricsourceterm.prj
. It describes the
processes to be solved and the related process variables together with their
initial and boundary conditions. It also references the bulk mesh and the
boundary meshes associated with the bulk mesh.
To start the simulation (after successful compilation) run:
ogs square_1e2_volumetricsourceterm.prj
OGS writes the computed results (pressure, Darcy velocity) into the output file
square_1e2_volumetricsourceterm_pcs_0_ts_1_t_1.000000.vtu
, which can be
directly visualized and analysed in ParaView for example.
The output on the console will be similar to:
info: ConstantParameter: K
info: ConstantParameter: p0
info: ConstantParameter: p_Dirichlet_left
info: ConstantParameter: p_Dirichlet_right
info: ConstantParameter: volumetric_source_term_parameter
info: Initialize processes.
info: Solve processes.
info: [time] Output of timestep 0 took 0.000145912 s.
info: === Time stepping at step #1 and time 1 with step size 1
info: [time] Assembly took 0.000147104 s.
info: [time] Applying Dirichlet BCs took 1.81198e-05 s.
info: ------------------------------------------------------------------
info: *** Eigen solver computation
info: -> solve with CG (precon DIAGONAL)
info: iteration: 11/10000
info: residual: 3.965614e-17
info: ------------------------------------------------------------------
info: [time] Linear solver took 7.79629e-05 s.
info: [time] Iteration #1 took 0.000268221 s.
info: [time] Solving process #0 took 0.000288963 s in time step #1
info: [time] Time step #1 took 0.000308037 s.
info: [time] Output of timestep 1 took 0.000105858 s.
info: The whole computation of the time stepping took 1 steps, in which
the accepted steps are 1, and the rejected steps are 0.
info: [time] Execution took 0.00692892 s.
info: OGS terminated on 2018-10-12 06:30:13+020
The numerical solution shown in the following picture is almost a linear gradient:
The difference between the computed solution and the analytical solution is in the range of machine precision and therefore almost negligible:
This article was written by Tom Fischer. If you are missing something or you find an error please let us know.
Generated with Hugo 0.122.0
in CI job 538033
|
Last revision: January 16, 2025
Commit: [T] Added performance test for BHE soil element assembly cache 76b73cb
| Edit this page on