Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions inputFiles/constitutiveDriver/relperm/relperm.ats
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from geos.ats.test_builder import TestDeck, RestartcheckParameters, generate_geos_tests

restartcheck_params = {'atol': 1e-08, 'rtol': 4e-07}

def create_relperm_test(name, description=None):
if description is None: description = name
return TestDeck(
name=name,
description=description,
partitions=[(1, 1, 1)],
restart_step=0,
check_step=0,
restartcheck_params=RestartcheckParameters(**restartcheck_params))

decks = [
create_relperm_test("testRelperm_Table_2_phase", "Relperm driver for 2 phase tables"),
create_relperm_test("testRelperm_Table_3_phase", "Relperm driver for 3 phase tables")
]

generate_geos_tests(decks)
118 changes: 118 additions & 0 deletions inputFiles/constitutiveDriver/relperm/testRelperm_Table_2_phase.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?xml version="1.0" ?>

<Problem>
<Tasks>
<RelpermDriver
name="test_2_phase_residual"
relperm="2_phase_residual"
steps="10"
output="testRelperm_Table_2_phase_2_phase_residual.txt"
logLevel="1" />
<RelpermDriver
name="test_2_phase"
relperm="2_phase"
steps="15"
output="testRelperm_Table_2_phase_2_phase.txt"
logLevel="1" />
<RelpermDriver
name="test_2_phase_hysteresis"
relperm="2_phase_hysteresis"
steps="15"
output="testRelperm_Table_2_phase_2_phase_hysteresis.txt"
logLevel="1" />
<RelpermDriver
name="test_2_phase_hysteresis_historical"
relperm="2_phase_hysteresis"
historicalSaturations="{ 0.55, 0.3 }"
steps="15"
logLevel="1" />
</Tasks>

<Outputs>
<Restart
name="restartOutput"/>
</Outputs>

<Events
maxTime="1">
<SoloEvent
name="event_2_phase_residual"
target="/Tasks/test_2_phase_residual" />
<SoloEvent
name="event_2_phase"
target="/Tasks/test_2_phase" />
<SoloEvent
name="event_2_phase_hysteresis"
target="/Tasks/test_2_phase_hysteresis" />
<SoloEvent
name="event_2_phase_hysteresis_historical"
target="/Tasks/test_2_phase_hysteresis_historical" />

<PeriodicEvent
name="restarts"
timeFrequency="1"
targetExactTimestep="0"
target="/Outputs/restartOutput" />
</Events>

<Constitutive>
<TableRelativePermeability
name="2_phase_residual"
phaseNames="{ gas, water }"
wettingNonWettingRelPermTableNames="{ KRW_D1, KRG_D1 }" />
<TableRelativePermeability
name="2_phase"
phaseNames="{ gas, water }"
wettingNonWettingRelPermTableNames="{ KRW_D0, KRG_D0 }" />
<TableRelativePermeabilityHysteresis
name="2_phase_hysteresis"
phaseNames="{ gas, water }"
drainageWettingNonWettingRelPermTableNames="{ KRW_D1, KRG_D1 }"
imbibitionNonWettingRelPermTableName="KRG_I1"
imbibitionWettingRelPermTableName="KRW_I1" />
</Constitutive>

<Functions>
<TableFunction
name="KRW_D1"
coordinates="{ 0.15, 0.2095, 0.269, 0.3285, 0.3965, 0.456, 0.5155, 0.575, 0.6345, 0.694, 0.7535, 0.8215, 0.881, 0.9405, 1 }"
values="{ 0, 0, 0.0001, 0.0007, 0.0036, 0.0105, 0.0242, 0.0483, 0.087, 0.1454, 0.2291, 0.3643, 0.5251, 0.7341, 1 }"
interpolation="linear" />
<TableFunction
name="KRG_D1"
coordinates="{ 0, 0.0595, 0.119, 0.1785, 0.2465, 0.306, 0.3655, 0.425, 0.4845, 0.544, 0.6035, 0.6715, 0.731, 0.7905, 0.85 }"
values="{ 0, 0.0035, 0.0142, 0.0319, 0.0608, 0.0936, 0.1336, 0.1806, 0.2347, 0.2959, 0.3642, 0.4509, 0.5344, 0.6249, 0.64 }"
interpolation="linear" />
<TableFunction
name="KRW_I1"
coordinates="{ 0.15, 0.2095, 0.234, 0.276, 0.324, 0.366, 0.408, 0.45, 0.492, 0.534, 0.576, 0.624, 0.666, 0.708, 0.75 }"
values="{ 0, 0, 0.0021, 0.0103, 0.0274, 0.0492, 0.0772, 0.1116, 0.1522, 0.1991, 0.2524, 0.3209, 0.3877, 0.4607, 0.54 }"
interpolation="linear" />
<TableFunction
name="KRG_I1"
coordinates="{ 0.25, 0.292, 0.334, 0.376, 0.424, 0.466, 0.508, 0.55, 0.592, 0.634, 0.676, 0.724, 0.766, 0.808, 0.85 }"
values="{ 0, 0.0002, 0.0018, 0.0059, 0.0156, 0.0299, 0.0509, 0.08, 0.1185, 0.1678, 0.2291, 0.3155, 0.4071, 0.5148, 0.64 }"
interpolation="linear" />

<TableFunction
name="KRW_D0"
coordinates="{ 0,0.07,0.14,0.21,0.29,0.36,0.43,0.5,0.57,0.64,0.71,0.79,0.86,0.93,1 }"
values="{ 0,0.0001,0.0002,0.0008,0.0034,0.0091,0.0206,0.0412,0.0753,0.1284,0.2069,0.3381,0.4997,0.7162,1 }"
interpolation="linear" />
<TableFunction
name="KRG_D0"
coordinates="{ 0,0.07,0.14,0.21,0.29,0.36,0.43,0.5,0.57,0.64,0.71,0.79,0.86,0.93,1 }"
values="{ 0,0.0142,0.043,0.0823,0.138,0.195,0.2591,0.3299,0.4068,0.4897,0.5781,0.6858,0.7856,0.8904,1 }"
interpolation="linear" />
<TableFunction
name="KRW_I0"
coordinates="{ 0,0.07,0.14,0.21,0.29,0.36,0.43,0.5,0.57,0.64,0.71,0.79,0.86,0.93,1 }"
values="{ 0,0.0142,0.043,0.0823,0.138,0.195,0.2591,0.3299,0.4068,0.4897,0.5781,0.6858,0.7856,0.8904,1 }"
interpolation="linear" />
<TableFunction
name="KRG_I0"
coordinates="{ 0,0.07,0.14,0.21,0.29,0.36,0.43,0.5,0.57,0.64,0.71,0.79,0.86,0.93,1 }"
values="{ 0,0.0001,0.0008,0.0036,0.0116,0.0253,0.0479,0.0825,0.1322,0.2006,0.2914,0.428,0.581,0.7701,1 }"
interpolation="linear" />
</Functions>
</Problem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" ?>

<Problem>
<Tasks>
<RelpermDriver
name="test_3_phase_hysteresis"
relperm="3_phase_hysteresis"
steps="15"
logLevel="1" />
</Tasks>

<Outputs>
<Restart
name="restartOutput"/>
</Outputs>

<Events
maxTime="1">
<SoloEvent
name="event_3_phase_hysteresis"
target="/Tasks/test_3_phase_hysteresis" />

<PeriodicEvent
name="restarts"
timeFrequency="1"
targetExactTimestep="0"
target="/Outputs/restartOutput" />
</Events>

<Constitutive>
<TableRelativePermeabilityHysteresis
name="3_phase_hysteresis"
phaseNames="{ gas, water }"
drainageWettingNonWettingRelPermTableNames="{ KRW_D1, KRG_D1 }"
imbibitionNonWettingRelPermTableName="KRG_I1"
imbibitionWettingRelPermTableName="KRW_I1" />
</Constitutive>

<Functions>
</Functions>
</Problem>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void constitutiveUpdatePassThru( RelativePermeabilityBase const & relPerm,
BrooksCoreyBakerRelativePermeability,
BrooksCoreyStone2RelativePermeability,
TableRelativePermeability,
constitutive::TableRelativePermeabilityHysteresis,
TableRelativePermeabilityHysteresis,
VanGenuchtenBakerRelativePermeability,
VanGenuchtenStone2RelativePermeability >::execute( relPerm, std::forward< LAMBDA >( lambda ) );
}
Expand All @@ -64,7 +64,7 @@ void constitutiveUpdatePassThru( RelativePermeabilityBase & relPerm,
BrooksCoreyBakerRelativePermeability,
BrooksCoreyStone2RelativePermeability,
TableRelativePermeability,
constitutive::TableRelativePermeabilityHysteresis,
TableRelativePermeabilityHysteresis,
VanGenuchtenBakerRelativePermeability,
VanGenuchtenStone2RelativePermeability >::execute( relPerm, std::forward< LAMBDA >( lambda ) );
}
Expand Down
Loading
Loading