From 109ce589d674f0d2bb21f5bfef04a21fdb53cae1 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 15 Feb 2017 12:08:08 +0100 Subject: [PATCH] [web] Added all elliptic benchmarks. --- ProcessLib/GroundwaterFlow/CMakeLists.txt | 3 +- .../elliptic/groundwater-flow-dirichlet.md | 120 ++++++++++++++++++ .../elliptic/groundwater-flow-neumann.md | 5 +- .../elliptic/groundwater-flow-robin.md | 49 +++++++ web/layouts/shortcodes/project-link.html | 3 + 5 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md create mode 100644 web/content/docs/benchmarks/elliptic/groundwater-flow-robin.md create mode 100644 web/layouts/shortcodes/project-link.html diff --git a/ProcessLib/GroundwaterFlow/CMakeLists.txt b/ProcessLib/GroundwaterFlow/CMakeLists.txt index cc571b40f2a..5c95ffbed06 100644 --- a/ProcessLib/GroundwaterFlow/CMakeLists.txt +++ b/ProcessLib/GroundwaterFlow/CMakeLists.txt @@ -34,8 +34,6 @@ foreach(mesh_size 1e0 1e1 1e2 1e3) ABSTOL 1e-1 RELTOL 1e-1 DIFF_DATA cube_1x1x1_hex_${mesh_size}.vtu cube_${mesh_size}_neumann_pcs_0_ts_1_t_1.000000.vtu D1_left_front_N1_right pressure - VIS - cube_${mesh_size}_neumann_pcs_0_ts_1_t_1.000000.vtu ) endforeach() @@ -90,6 +88,7 @@ foreach(mesh_size 1e0 1e1 1e2 1e3 1e4) ABSTOL 1e-1 RELTOL 1e-1 DIFF_DATA square_1x1_quad_${mesh_size}.vtu square_${mesh_size}_neumann_pcs_0_ts_1_t_1.000000.vtu D1_left_bottom_N1_right pressure + VIS square_${mesh_size}_neumann_pcs_0_ts_1_t_1.000000.vtu ) endforeach() diff --git a/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md b/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md new file mode 100644 index 00000000000..8a55915a7d1 --- /dev/null +++ b/web/content/docs/benchmarks/elliptic/groundwater-flow-dirichlet.md @@ -0,0 +1,120 @@ ++++ +date = "2017-02-15T11:17:39+01:00" +title = "Groundwater Flow (Dirichlet)" +project = "Elliptic/square_1x1_GroundWaterFlow/square_1e2.prj" +author = "Dmitri Naumov" + +[menu] + [menu.benchmarks] + weight = 1 + parent = "elliptic" + ++++ + +{{< project-link >}} + +## Equations + +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 Neumann-type 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$. + +## Problem specification and analytical solution + +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. +$$ + +## Input files + +TODO: {asset:247:link} + +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 mesh file + - the geometry file + - introduce more/different Dirichlet boundary conditions (different geometry or values) + +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. + +## Running simulation + +To start the simulation (after successful compilation) run: +```bash +$ ogs square_1e2.prj +``` + +It will produce some output and write the computed result into the `square_1e2_result.dat`, which is a simple list of values for every node of the mesh. + +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.666667e-06 +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 : ||b-Ax||_2 <= 1.0e-16 * ||b-Ax_0||_2 +matrix storage format : CSR +linear solver status : normal end + +info: iteration: 28/1000000 + +info: residual: 3.004753e-17 + +info: ------------------------------------------------------------------ + +``` + +A major part of the output was produced by the linear equation solver (LIS in this case). + +## Results and evaluation + +{{< vis path="Elliptic/square_1x1_GroundWaterFlow/square_1e2_pcs_0_ts_1_t_1.000000.vtu" >}} + +The result, written in the `square_1e2_result.dat`, can be visualized with Paraview, for example, by including the values into the `square_1x1_quad_1e2.vtu` file in the `PointData` section: +``` +... + + +1 +0.8 +0.6 +0.4 +0.2 +... +-0.6 +-0.8 +-1 + + +``` +(The next releases shall simplify this procedure.) diff --git a/web/content/docs/benchmarks/elliptic/groundwater-flow-neumann.md b/web/content/docs/benchmarks/elliptic/groundwater-flow-neumann.md index db091f21952..168faf770dc 100644 --- a/web/content/docs/benchmarks/elliptic/groundwater-flow-neumann.md +++ b/web/content/docs/benchmarks/elliptic/groundwater-flow-neumann.md @@ -2,13 +2,14 @@ date = "2017-01-31T14:27:10+01:00" author = "Dmitri Naumov" title = "Groundwater flow (Neumann)" +project = "Elliptic/square_1x1_GroundWaterFlow/square_1e2_neumann.prj" aliases = [ "/docs/benchmarks/" ] # First benchmark page [menu] [menu.benchmarks] parent = "elliptic" - weight = 0 + weight = 2 +++ ## Equations @@ -112,7 +113,7 @@ A last major part of the output was produced by the linear equation solver (LIS ## Results and evaluation -{{< vis path="Elliptic/square_1x1_GroundWaterFlow/square_1e2_pcs_0_ts_1_t_1.000000.vtu" >}} +{{< vis path="Elliptic/square_1x1_GroundWaterFlow/square_1e2_neumann_pcs_0_ts_1_t_1.000000.vtu" >}} Compared to the analytical solution presented above the results are very good but in a single point: diff --git a/web/content/docs/benchmarks/elliptic/groundwater-flow-robin.md b/web/content/docs/benchmarks/elliptic/groundwater-flow-robin.md new file mode 100644 index 00000000000..519f90a1de7 --- /dev/null +++ b/web/content/docs/benchmarks/elliptic/groundwater-flow-robin.md @@ -0,0 +1,49 @@ ++++ +date = "2017-02-15T11:46:49+01:00" +title = "Groundwater Flow (Robin)" +project = "Elliptic/line_1_GroundWaterFlow/line_1e1_robin_left_picard.prj" +author = "Dmitri Naumov" + +[menu] + + [menu.benchmarks] + weight = 3 + parent = "elliptic" + ++++ + +{{< project-link >}} + +## Equations + +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 Neumann-type 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$. + +## Problem specification and analytical solution + +We solve the Laplace equation on a line 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,y=0) \subset \Gamma_D,\cr +k {\partial h(x,y) \over \partial n} = 1 &\quad \text{on } (x=1,y) \subset \Gamma_N,\cr +k {\partial h(x,y) \over \partial n} = 0 &\quad \text{on } (x,y=1) \subset \Gamma_N. +}$$ + +The solution of this problem is +$$ +\begin{equation} +h(x,y) = 1 + \sum_{k=1}^\infty A_k \sin\bigg(C_k y\bigg) \sinh\bigg(C_k x\bigg), +\end{equation} +$$ diff --git a/web/layouts/shortcodes/project-link.html b/web/layouts/shortcodes/project-link.html new file mode 100644 index 00000000000..b09e2dbd37b --- /dev/null +++ b/web/layouts/shortcodes/project-link.html @@ -0,0 +1,3 @@ +<a href="https://github.com/ufz/ogs-data/blob/master/{{ .Page.Params.project }}"> + Project file on GitHub <i class="fi-arrow-right"></i> +</a> -- GitLab