~fluidity-core/fluidity/darcy_weak_bcs

« back to all changes in this revision

Viewing changes to tests/darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel/darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel.xml

  • Committer: Brendan Tollit
  • Date: 2012-07-23 10:48:00 UTC
  • Revision ID: brendan.tollit05@imperial.ac.uk-20120723104800-6yytrhxneuwv13zr
Add functionality to adapt mesh at first timestep for darcy model
using same routines as within time step adapt - required to 
recalc all the special darcy impes diagnostic fields

Add an adaptive mesh test and a seperate parallel test

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="UTF-8" ?>
 
2
<!DOCTYPE testproblem SYSTEM "regressiontest.dtd">
 
3
 
 
4
<testproblem>
 
5
  <name>darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel</name>
 
6
  <owner userid="btollit"/>
 
7
  <tags>diml</tags>
 
8
  <problem_definition length="short" nprocs="1">
 
9
    <command_line>
 
10
time mpiexec -n 2 ../../bin/darcy_impes darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.diml 
 
11
    </command_line>
 
12
    <!-- Parallel problem for darcy flow using the IMPES solver with one region with 2 phases using Corey relative permeabilities with a TotalDarcyVelocity BC at the inlet, a strong pressure BC at outlet and the first phase saturation diagnostic. -->
 
13
  </problem_definition>
 
14
  <variables>
 
15
    <variable name="phase1_sat_relpermupwind_max_2d_A" language="python">
 
16
from fluidity_tools import stat_parser
 
17
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
18
phase1_sat_relpermupwind_max_2d_A = s["Phase1"]["Saturation"]["max"][-1]
 
19
    </variable>    
 
20
    <variable name="phase1_sat_relpermupwind_min_2d_A" language="python">
 
21
from fluidity_tools import stat_parser
 
22
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
23
phase1_sat_relpermupwind_min_2d_A = s["Phase1"]["Saturation"]["min"][-1]
 
24
    </variable>    
 
25
    <variable name="phase2_sat_relpermupwind_max_2d_A" language="python">
 
26
from fluidity_tools import stat_parser
 
27
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
28
phase2_sat_relpermupwind_max_2d_A = s["Phase2"]["Saturation"]["max"][-1]
 
29
    </variable>    
 
30
    <variable name="phase2_sat_relpermupwind_min_2d_A" language="python">
 
31
from fluidity_tools import stat_parser
 
32
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
33
phase2_sat_relpermupwind_min_2d_A = s["Phase2"]["Saturation"]["min"][-1]
 
34
    </variable>    
 
35
    <variable name="sum_sat_relpermupwind_max_2d_A" language="python">
 
36
from fluidity_tools import stat_parser
 
37
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
38
sum_sat_relpermupwind_max_2d_A = s["Phase1"]["SumSaturation"]["max"][-1]
 
39
    </variable>    
 
40
    <variable name="sum_sat_relpermupwind_min_2d_A" language="python">
 
41
from fluidity_tools import stat_parser
 
42
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
43
sum_sat_relpermupwind_min_2d_A = s["Phase1"]["SumSaturation"]["min"][-1]
 
44
    </variable>
 
45
    <variable name="sum_sat_relpermupwind_integral_2d_A" language="python">
 
46
from fluidity_tools import stat_parser
 
47
s = stat_parser("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")
 
48
sum_sat_relpermupwind_integral_2d_A = s["Phase1"]["SumSaturation"]["integral"][-1]
 
49
    </variable>
 
50
    <variable name="phase2_sat_relpermupwind_analytic_error_max_2d_A" language="python">
 
51
from fluidity_tools import stat_parser as stat
 
52
phase2_sat_relpermupwind_analytic_error_max_2d_A = stat("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")["Phase2"]["AnalyticSaturationError"]["max"][-1]
 
53
    </variable>
 
54
    <variable name="phase2_sat_relpermupwind_analytic_error_integral_2d_A" language="python">
 
55
from fluidity_tools import stat_parser as stat
 
56
phase2_sat_relpermupwind_analytic_error_integral_2d_A = stat("darcy_impes_p1_2phase_coreyrelperm_velBCinlet_strongpressoutlet_p1satdiag_parallel_relpermupwind_2d_A.stat")["Phase2"]["AnalyticSaturationError"]["integral"][-1]
 
57
    </variable>
 
58
    <variable name="solvers_converged" language="python">
 
59
import os
 
60
files = os.listdir("./")
 
61
solvers_converged = not "matrixdump" in files and not "matrixdump.info" in files
 
62
    </variable>
 
63
  </variables>
 
64
  <pass_tests>
 
65
    <test name="Solvers converged" language="python">
 
66
assert(solvers_converged)
 
67
    </test>
 
68
    <test name="phase 1 using relpermupwind for 2d for mesh A has max(sat) in [0.0, 1.0] with tolerance 1.0e-08" language="python">
 
69
assert abs(phase1_sat_relpermupwind_max_2d_A - 0.5) &lt; (0.5 + 1.0e-08)
 
70
    </test>
 
71
    <test name="phase 1 using relpermupwind for 2d for mesh A has min(sat) in [0.0, 1.0] with tolerance 1.0e-08" language="python">
 
72
assert abs(phase1_sat_relpermupwind_min_2d_A - 0.5) &lt; (0.5 + 1.0e-08)
 
73
    </test>
 
74
    <test name="phase 2 using relpermupwind for 2d for mesh A has max(sat) in [0.0, 1.0] with tolerance 1.0e-08" language="python">
 
75
assert abs(phase2_sat_relpermupwind_max_2d_A - 0.5) &lt; (0.5 + 1.0e-08)
 
76
    </test>
 
77
    <test name="phase 2 using relpermupwind for 2d for mesh A has min(sat) in [0.0, 1.0] with tolerance 1.0e-08" language="python">
 
78
assert abs(phase2_sat_relpermupwind_min_2d_A - 0.5) &lt; (0.5 + 1.0e-08)
 
79
    </test>
 
80
    <test name="Check sum_sat_max using relpermupwind for 2d for mesh A is 1.0 with tolerance 1.0e-08" language="python">
 
81
print 'difference: ',abs(sum_sat_relpermupwind_max_2d_A - 1.0)
 
82
assert abs(sum_sat_relpermupwind_max_2d_A - 1.0) &lt; 1.0e-08
 
83
    </test>
 
84
    <test name="Check sum_sat_min using relpermupwind for 2d for mesh A is 1.0 with tolerance 1.0e-08" language="python">
 
85
print 'difference: ',abs(sum_sat_relpermupwind_min_2d_A - 1.0)
 
86
assert abs(sum_sat_relpermupwind_min_2d_A - 1.0) &lt; 1.0e-08
 
87
    </test>
 
88
    <test name="Check sum_sat_integral using relpermupwind for 2d for mesh A is 1.0 with tolerance 1.0e-08" language="python">
 
89
print 'difference: ',abs(sum_sat_relpermupwind_integral_2d_A - 1.0)
 
90
assert abs(sum_sat_relpermupwind_integral_2d_A - 1.0) &lt; 1.0e-08
 
91
    </test>
 
92
    <test name="Assert max absolute analytic error for saturation phase 2 using modrelpermupwind_satfesweby for 2d on mesh A is less than 5.1e-01" language="python">
 
93
assert(abs(phase2_sat_relpermupwind_analytic_error_max_2d_A) &lt; 5.1e-01)
 
94
    </test>
 
95
    <test name="Assert integral absolute analytic error for saturation phase 2 using modrelpermupwind_satfesweby for 2d on mesh A is less than 7.4e-03" language="python">
 
96
assert(abs(phase2_sat_relpermupwind_analytic_error_integral_2d_A) &lt; 7.4e-03)
 
97
    </test>
 
98
  </pass_tests>
 
99
  <warn_tests>
 
100
  </warn_tests>
 
101
</testproblem>