test_stress_convergence module
Contents
test_stress_convergence module¶
Module to gather tests for convergence of decoupled stress system.
This file is executed by pytest
to have good CI.
- class test_stress_convergence.TestStressConvergence[source]¶
Bases:
object
Class to bundle all stress convergence tests.
All tests are compared against reference errors.
- working_dir = 'tests/2d_stress'¶
- solver_path = 'fenicsR13'¶
- run_solver(inputfile)[source]¶
Run the solver as subprocess with the given input file.
Test fails if subprocess return Exception or error.
- compare_errors(errorsfile, ref_errorsfile)[source]¶
Check against reference errors. Compares absolute differences.
Absolute Error allowed:
1E-10
Return exception if diff returns with !=0 A comparison for complete equalness can be obtained with:subprocess.check_call([ "diff", "-u", "--strip-trailing-cr", errorsfile, ref_errorsfile ], cwd=self.working_dir)
- create_meshes()[source]¶
Create the test meshes. Executed before any test of the class.
Often not needed if meshes are in Git through LFS for reproducability.
- test_stress_01_nosource_rot_p1p1p1_gls()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(0.1\)
\(f_{\mathrm{mass}}\)
\(0\)
\(v_t^1\)
\(10.0\)
Elements
\(P_1P_1P_1\)
Stabilization
GLS
- test_stress_01_nosource_rot_p1p1p1_stab()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(0.1\)
\(f_{\mathrm{mass}}\)
\(0\)
\(v_t^1\)
\(10.0\)
Elements
\(P_1P_1P_1\)
Stabilization
CIP, \(\delta_u=1, \delta_p=0.01\)
- test_stress_01_source_norot_p1p1p1_stab()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(0.1\)
\(f_{\mathrm{mass}}\)
\(0.4(1-\frac{5R^2}{18{Kn}^2})\cos(\phi)\)
\(v_t^1\)
\(0\)
Elements
\(P_1P_1P_1\)
Stabilization
CIP, \(\delta_u=1, \delta_p=0.01\)
- test_stress_01_source_rot_p1p1p1_stab()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(0.1\)
\(f_{\mathrm{mass}}\)
\(0.4(1-\frac{5R^2}{18{Kn}^2})\cos(\phi)\)
\(v_t^1\)
\(10.0\)
Elements
\(P_1P_1P_1\)
Stabilization
CIP, \(\delta_u=1, \delta_p=0.01\)
- test_stress_01_source_rot_p1p2p3_nostab()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(0.1\)
\(f_{\mathrm{mass}}\)
\(0.4(1-\frac{5R^2}{18{Kn}^2})\cos(\phi)\)
\(v_t^1\)
\(10.0\)
Elements
\(P_1P_2P_3\)
Stabilization
CIP, \(\delta_u=1, \delta_p=0.01\)
- test_stress_01_source_rot_p2p2p2_stab()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(0.1\)
\(f_{\mathrm{mass}}\)
\(0.4(1-\frac{5R^2}{18{Kn}^2})\cos(\phi)\)
\(v_t^1\)
\(10.0\)
Elements
\(P_2P_2P_2\)
Stabilization
CIP, \(\delta_u=1, \delta_p=0.01\)
- test_stress_10_source_rot_p1p1p1_stab()[source]¶
Execute decoupled heat system test and check with reference errors.
Parameter Value
\(Kn\)
\(10.0\)
\(f_{\mathrm{mass}}\)
\(0.4(1-\frac{5R^2}{18{Kn}^2})\cos(\phi)\)
\(v_t^1\)
\(10.0\)
Elements
\(P_1P_1P_1\)
Stabilization
CIP, \(\delta_u=1, \delta_p=0.01\)