Skip to content

Commit 873714f

Browse files
committed
Add space and time tests
1 parent 679434b commit 873714f

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Space and time convergence tests
2+
3+
**Author:** [Riccardo Tosi](https://github.com/riccardotosi)
4+
5+
**Kratos version:** 9.0
6+
7+
**Source files:** [section 2.7 of [1]](https://github.com/KratosMultiphysics/Documentation/blob/master/Resources_files/convection_diffusion_explicit_elements/Eulerian_convection_diffusion_explicit_element.pdf)
8+
9+
## Space convergence
10+
11+
We solve the transient convection diffusion equation
12+
<img src="https://render.githubusercontent.com/render/math?math=\frac{\partial \phi}{\partial t} %2B v \cdot \nabla \phi %2B \phi \nabla \cdot v - \nabla \cdot k \nabla \phi = f"> and validate its reference implementation. We refer to section 2.7.1 of [1] for details.
13+
14+
We validate the implementation by computing the <img src="https://render.githubusercontent.com/render/math?math=l^2"> norm of the error as <img src="https://render.githubusercontent.com/render/math?math=\varepsilon = \sqrt{\int_{\Omega} (\phi - \phi_h)^2 }">, where <img src="https://render.githubusercontent.com/render/math?math=h"> is the mesh size, <img src="https://render.githubusercontent.com/render/math?math=\phi"> and <img src="https://render.githubusercontent.com/render/math?math=\phi_h"> are the analytic and FEM solutions, respectively.
15+
16+
<p align="center">
17+
<img src="convergence_error_convection_diffusion_explicit_solution.jpg"alt="velocity" style="width: 500px;"/>
18+
</p>
19+
20+
The figure shows that the error <img src="https://render.githubusercontent.com/render/math?math=\varepsilon"> converges as expected for both quasi-static ASGS and quasi-static OSS.
21+
22+
## Time convergence
23+
24+
We solve the transient convection diffusion equation
25+
<img src="https://render.githubusercontent.com/render/math?math=\frac{\partial \phi}{\partial t} %2B v \cdot \nabla \phi %2B \phi \nabla \cdot v - \nabla \cdot k \nabla \phi = f"> and validate its reference implementation. We refer to section 2.7.2 of [1] for details.
26+
27+
The analytic solution at time <img src="https://render.githubusercontent.com/render/math?math=t"> is <img src="https://render.githubusercontent.com/render/math?math=\phi(t) = x - \sin(t)">. Therefore, it is possible to compute the <img src="https://render.githubusercontent.com/render/math?math=l^2"> norm of the error as
28+
<img src="https://render.githubusercontent.com/render/math?math=\varepsilon = \sqrt{\int_{\Omega} (\phi - \phi_h)^2 }">, where <img src="https://render.githubusercontent.com/render/math?math=h"> is the mesh size, <img src="https://render.githubusercontent.com/render/math?math=\phi"> and <img src="https://render.githubusercontent.com/render/math?math=\phi_h"> are the analytic and FEM solutions, respectively. It is expected to obtain an order four accuracy for the Runge-Kutta 4 time integration scheme.
29+
30+
<p align="center">
31+
<img src="convergence_error_time_convection_diffusion_bar.jpg"alt="velocity" style="width: 500px;"/>
32+
</p>
33+
34+
The figure shows that the time accuracy is of order four, as expected.
35+
36+
37+
## References
38+
39+
[1] Tosi, R. (2020). Eulerian convection diffusion explicit elements (p. 27). p. 27. Retrieved from https://github.com/KratosMultiphysics/Documentation/blob/master/Resources_files/convection_diffusion_explicit_elements/Eulerian_convection_diffusion_explicit_element.pdf
36.4 KB
Loading
50.2 KB
Loading

0 commit comments

Comments
 (0)