We start with simple linear homogeneous elliptic problem: $$ \begin{equation} k\; \Delta h = 0 \quad \text{in }\Omega \end{equation}$$ w.r.t boundary conditions $$ \eqalign{ h(x) = g_D(x) &\quad \text{on }\Gamma_D,\cr k\;{\partial h(x) \over \partial n} = g_N(x) &\quad \text{on }\Gamma_N, }$$
where $h$ could be hydraulic head, the subscripts $D$ and $N$ denote the Dirichlet and Neumanntype boundary conditions, $n$ is the normal vector pointing outside of $\Omega$, and $\Gamma = \Gamma_D \cup \Gamma_N$ and $\Gamma_D \cap \Gamma_N = \emptyset$.
We solve the Laplace equation on a square domain $[0\times 1]^2$ with $k = 1$ w.r.t. the specific boundary conditions: $$ \eqalign{ h(x,y) = 1 &\quad \text{on } (x=0,y) \subset \Gamma_D,\cr h(x,y) = 1 &\quad \text{on } (x=1,y) \subset \Gamma_D,\cr k\;{\partial h(x,y) \over \partial n} = 0 &\quad \text{on }\Gamma_N. }$$ The solution of this problem is $$ h(x,y) = 1  2x. $$
The main project file is square_1e2.prj
. It describes the processes to be solved and the related process variables together with their initial and boundary conditions. It also references the mesh and geometrical objects defined on the mesh.
As of now a small portion of possible inputs is implemented; one can change:
The geometries used to specify the boundary conditions are given in the square_1x1.gml
file.
The input mesh square_1x1_quad_1e2.vtu
is stored in the VTK file format and can be directly visualized in ParaView for example.
To start the simulation (after successful compilation) run:
ogs square_1e2.prj
It will produce the output files square_1e2_pcs_0.pvd
,
square_1e2_pcs_0_ts_0_t_0.000000.vtu
and
square_1e2_pcs_0_ts_1_t_1.000000.vtu
. The last file contains the results
computed in the first time step.
The output on the console will be similar to the following one (ignore the spurious error messages “Could not find POINT…”):
error: GEOObjects::getGeoObject(): Could not find POINT "left" in geometry.
error: GEOObjects::getGeoObject(): Could not find POINT "right" in geometry.
info: Initialize processes.
info: Solve processes.
info: > max. absolute value of diagonal entries = 2.666667e06
info: > penalty scaling = 1.000000e+10
info: 
info: *** LIS solver computation
info: > solve
initial vector x : user defined
precision : double
linear solver : CG
preconditioner : none
convergence condition : bAx_2 <= 1.0e16 * bAx_0_2
matrix storage format : CSR
linear solver status : normal end
info: iteration: 28/1000000
info: residual: 3.004753e17
info: 
A major part of the output was produced by the linear equation solver (LIS in this case).
This article was written by Dmitri Naumov. If you are missing something or you find an error please let us know.
Generated with Hugo 0.117.0
in CI job 364423

Last revision: July 24, 2023
Commit: [PL/PhF] Rename x_dot to x_prev 648b0315
 Edit this page on