## Equations

We consider the Poisson equation: $$$$\nabla\cdot(\nabla T) + Q_T = 0 \quad \text{in }\Omega$$$$ w.r.t Dirichlet-type boundary conditions \eqalign{ T(x) = 0 &\quad \text{on }\Gamma_D,\cr } where $T$ could be temperature, the subscripts $D$ denotes the Dirichlet-type boundary conditions. Here, the temperature distribution under the impact of a line shaped source term should be studied.

## Problem Specifications and Analytical Solution

In OGS there are several benchmarks for line source terms in 2d and 3d domains available. Here, some of the 3d benchmarks are described.

### Cylindrical domain

The Poisson equation on cylindrical domain of height $1$ and radius $r=1$ is solved. In the following figure the geometry, partly semi-transparent, is sketched. Furthermore, the mesh resolution is shown in the cylindrical domain within the first quadrant of the coordinate system. In the second quadrant the simulated temperature distribution is depicted.

The source term is defined along the line in the center of the cylinder: $$$$Q(x) = 1 \quad \text{at } x=0, y=0.$$$$ In the above figure the source term is the red vertical line in the origin of the coordinate system.

The analytical solution for a line source in the cylinder is $$$$T(x) = - \frac{1}{2 \pi} \ln \sqrt{x^2 + y^2}.$$$$

#### Analytical solution in ParaView

Since the analytical solution has a singularity at $(x, y) = (0, 0)$ the analytical solution in ParaView is generated as follows:

    
if (coordsX^2<0.0001 & coordsY^2<0.0001, temperature, -1/(4*asin(1))*ln(sqrt(coordsX^2+coordsY^2))



#### Results and evaluation

The following plot shows the temperature along the white line in the figure above.

• Comparison with analytical solution:

The differences of analytical and computed solutions for two different domain discretizations are small outside of the center. In the finer mesh the error outside of the middle region is smaller than in the coarser mesh.

Due to the numerical evaluation of the relative error of the computed solution the error grows in the vicinity of the boundary and in the center.

#### Input files

The project files for the described models are 49k.prj and 286k.prj. The project files describe the processes to be solved and the related process variables together with their initial and boundary conditions as well as the source terms.

The input meshes are stored in the VTK file format and can be directly visualized in ParaView for example.

### Cylindrical domain - axisymmetric example

The Poisson equation on cylindrical domain of height $1$ and radius $r=1$ is solved. The cylindrical domain is defined as axisymmetric.

#### Results and evaluation

The above figure shows the computed temperature distribution.

The following plot shows the temperature along the white line in the figure above.

The error and relative error shows the same behaviour like in the simulation models above. Outside of the center, that has a singularity in the analytical solution, the errors decreases very fast.

#### Input files

The project file for the described model is line_source_term_in_cylinder.prj.

This article was written by Thomas Fischer. If you are missing something or you find an error please let us know.
Generated with Hugo 0.101.0 in CI job 282302 | Last revision: November 22, 2022
Commit: [PL/THM] Implement freezing for temperature eq. 68ebbec  | Edit this page on