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
23 changes: 23 additions & 0 deletions inputFiles/constitutiveDriver/constitutiveDriver.ats
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from geos.ats.test_builder import TestDeck, RestartcheckParameters, generate_geos_tests

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

def create_pvt_test(name, description=None):
if description is None: description = name
TestDeck(
name=name,
description=description,
partitions=((1, 1, 1)),
restart_step=0,
restartcheck_params=RestartcheckParameters(**restartcheck_params))

decks = [
create_pvt_test("testPVT"),
create_pvt_test("testPVT_CO2Brine", "PVT Driver test for CO2 fluid models"),
create_pvt_test("testPVT_CO2BrineTables", "PVT Driver test for CO2 fluid models with solubility tables"),
create_pvt_test("testPVT_PhaseComposition", "PVT Driver test with composition output"),
create_pvt_test("testPVT_ThreePhaseCompositional", "PVT Driver test for three phase compositional models"),
create_pvt_test("testPVT_docExample", "PVT Driver documentation example")
]

generate_geos_tests(decks)
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
feedComposition="{ 0.1, 0.9 }"
pressureControl="pressureFunction"
temperatureControl="temperatureFunction"
steps="49"
baseline="testPVT_hydrogenMixtureA.txt"
steps="50"
output="testPVT_hydrogenMixtureA.txt"
logLevel="1"/>

<PVTDriver
Expand All @@ -18,8 +18,8 @@
feedComposition="{ 0.5, 0.5 }"
pressureControl="pressureFunction"
temperatureControl="temperatureFunction"
steps="49"
baseline="testPVT_hydrogenMixtureB.txt"
steps="50"
output="testPVT_hydrogenMixtureB.txt"
logLevel="1"/>

<PVTDriver
Expand All @@ -28,8 +28,8 @@
feedComposition="{ 1.0, 0.0 }"
pressureControl="pressureFunction"
temperatureControl="temperatureFunction"
steps="49"
baseline="testPVT_CO2.txt"
steps="50"
output="testPVT_hydrogenMixtureB.txt"
logLevel="1"/>

<PVTDriver
Expand All @@ -38,11 +38,16 @@
feedComposition="{ 0.0, 1.0 }"
pressureControl="pressureFunction"
temperatureControl="temperatureFunction"
steps="49"
baseline="testPVT_brine.txt"
steps="50"
output="testPVT_hydrogenMixtureB.txt"
logLevel="1"/>
</Tasks>

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

<Events
maxTime="1">
<SoloEvent
Expand All @@ -60,6 +65,12 @@
<SoloEvent
name="eventD"
target="/Tasks/testBrine"/>

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

<Constitutive>
Expand Down Expand Up @@ -95,25 +106,4 @@
coordinates="{ 0.0, 1.0 }"
values="{ 350, 350 }"/>
</Functions>

<!-- Mesh is not used, but GEOSX throws an error without one. Will resolve soon-->
<Mesh>
<InternalMesh
name="mesh1"
elementTypes="{ C3D8 }"
xCoords="{ 0, 1 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 1 }"
ny="{ 1 }"
nz="{ 1 }"
cellBlockNames="{ cellBlock01 }"/>
</Mesh>

<ElementRegions>
<CellElementRegion
name="dummy"
cellBlocks="{ * }"
materialList="{ dummy }"/>
</ElementRegions>
</Problem>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2Brine_testCo2BrinePhillipsMixtureA.txt"
output="testPVT_CO2Brine_testCo2BrinePhillipsMixtureA.txt"
logLevel="1" />
<PVTDriver
name="testCo2BrinePhillipsMixtureB"
Expand All @@ -22,7 +22,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2Brine_testCo2BrinePhillipsMixtureB.txt"
output="testPVT_CO2Brine_testCo2BrinePhillipsMixtureB.txt"
precision="6"
logLevel="1" />
<PVTDriver
Expand All @@ -34,7 +34,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2Brine_testCo2BrineEzrokhiMixtureA.txt"
output="testPVT_CO2Brine_testCo2BrineEzrokhiMixtureA.txt"
logLevel="1" />
<PVTDriver
name="testCo2BrineEzrokhiMixtureB"
Expand All @@ -45,7 +45,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2Brine_testCo2BrineEzrokhiMixtureB.txt"
output="testPVT_CO2Brine_testCo2BrineEzrokhiMixtureB.txt"
logLevel="1" />
<PVTDriver
name="testCo2SpycherPruessBrinePhillipsMixtureA"
Expand All @@ -56,7 +56,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2Brine_testCo2SpycherPruessBrinePhillipsMixtureA.txt"
output="testPVT_CO2Brine_testCo2SpycherPruessBrinePhillipsMixtureA.txt"
logLevel="1" />
<PVTDriver
name="testCo2SpycherPruessBrinePhillipsMixtureB"
Expand All @@ -67,7 +67,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2Brine_testCo2SpycherPruessBrinePhillipsMixtureB.txt"
output="testPVT_CO2Brine_testCo2SpycherPruessBrinePhillipsMixtureB.txt"
logLevel="1" />
<PVTDriver
name="testCo2BrinePhillipsMixtureThermalA"
Expand All @@ -79,7 +79,7 @@
outputCompressibility="1"
outputPhaseComposition="1"
outputMassDensity="1"
baseline="testPVT_CO2Brine_testCo2BrinePhillipsMixtureThermalA.txt"
output="testPVT_CO2Brine_testCo2BrinePhillipsMixtureThermalA.txt"
logLevel="1" />
<PVTDriver
name="testCo2BrinePhillipsMixtureThermalB"
Expand All @@ -91,9 +91,14 @@
outputCompressibility="1"
outputPhaseComposition="1"
outputMassDensity="1"
baseline="testPVT_CO2Brine_testCo2BrinePhillipsMixtureThermalB.txt"
output="testPVT_CO2Brine_testCo2BrinePhillipsMixtureThermalB.txt"
logLevel="1" />
</Tasks>

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

<Events
maxTime="1">
Expand Down Expand Up @@ -121,6 +126,12 @@
<SoloEvent
name="eventCo2BrinePhillipsMixtureThermalB"
target="/Tasks/testCo2BrinePhillipsMixtureThermalB" />

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

<Constitutive>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2BrineTables_testCo2BrinePhillipsMixtureA.txt"
output="testPVT_CO2BrineTables_testCo2BrinePhillipsMixtureA.txt"
logLevel="1" />
<PVTDriver
name="testCo2BrinePhillipsMixtureB"
Expand All @@ -22,11 +22,16 @@
steps="20"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_CO2BrineTables_testCo2BrinePhillipsMixtureB.txt"
output="testPVT_CO2BrineTables_testCo2BrinePhillipsMixtureB.txt"
precision="6"
logLevel="1" />
</Tasks>

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

<Events
maxTime="1">
<SoloEvent
Expand All @@ -35,6 +40,12 @@
<SoloEvent
name="eventCo2BrinePhillipsMixtureB"
target="/Tasks/testCo2BrinePhillipsMixtureB" />

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

<Constitutive>
Expand Down Expand Up @@ -79,25 +90,4 @@
coordinateFiles="{ testPVT_data/pres.txt, testPVT_data/temp.txt }"
voxelFile="testPVT_data/h20Vapourisation.txt" />
</Functions>

<!-- Mesh is not used, but GEOSX throws an error without one. Will resolve soon-->
<Mesh>
<InternalMesh
name="mesh1"
elementTypes="{ C3D8 }"
xCoords="{ 0, 1 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 1 }"
ny="{ 1 }"
nz="{ 1 }"
cellBlockNames="{ cellBlock01 }" />
</Mesh>

<ElementRegions>
<CellElementRegion
name="dummy"
cellBlocks="{ * }"
materialList="{ dummy }" />
</ElementRegions>
</Problem>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
outputMassDensity="1"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_Compositional_liveOilPR.txt"
output="testPVT_Compositional_liveOilPR.txt"
logLevel="1"/>
<PVTDriver
name="testLiveOilPRLBC"
Expand All @@ -24,7 +24,7 @@
outputMassDensity="1"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_Compositional_liveOilPRLBC.txt"
output="testPVT_Compositional_liveOilPRLBC.txt"
logLevel="1"/>
<PVTDriver
name="testLiveOilSRK"
Expand All @@ -36,7 +36,7 @@
outputMassDensity="1"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_Compositional_liveOilSRK.txt"
output="testPVT_Compositional_liveOilSRK.txt"
logLevel="1"/>
<PVTDriver
name="testLiveOilSRKLBC"
Expand All @@ -48,10 +48,15 @@
outputMassDensity="1"
outputCompressibility="1"
outputPhaseComposition="1"
baseline="testPVT_Compositional_liveOilSRKLBC.txt"
output="testPVT_Compositional_liveOilSRKLBC.txt"
logLevel="1"/>
</Tasks>

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

<Events
maxTime="1">
<SoloEvent
Expand All @@ -66,13 +71,19 @@
<SoloEvent
name="eventLiveOilSRKLBC"
target="/Tasks/testLiveOilSRKLBC"/>

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

<Constitutive>
<CompositionalTwoPhaseFluid
name="liveOilPR"
phaseNames="{ oil, gas }"
equationsOfState="{ pr, pr }"
equationsOfState="{ PengRobinson, PengRobinson }"
componentNames="{ CO2, N2, C1, C2, C3, C4, C5, C6, C7+ }"
componentCriticalPressure="{ 73.8659e5, 33.9439e5, 46.0421e5, 48.8387e5, 42.4552e5, 37.47e5, 33.5892e5, 30.1037e5, 20.549e5 }"
componentCriticalTemperature="{ 304.7, 126.2, 190.6, 305.43, 369.8, 419.5, 465.9, 507.5, 678.8 }"
Expand All @@ -93,7 +104,7 @@
<CompositionalTwoPhaseFluidLohrenzBrayClark
name="liveOilPRLBC"
phaseNames="{ oil, gas }"
equationsOfState="{ pr, pr }"
equationsOfState="{ PengRobinson, PengRobinson }"
componentNames="{ CO2, N2, C1, C2, C3, C4, C5, C6, C7+ }"
componentCriticalPressure="{ 73.8659e5, 33.9439e5, 46.0421e5, 48.8387e5, 42.4552e5, 37.47e5, 33.5892e5, 30.1037e5, 20.549e5 }"
componentCriticalTemperature="{ 304.7, 126.2, 190.6, 305.43, 369.8, 419.5, 465.9, 507.5, 678.8 }"
Expand All @@ -115,7 +126,7 @@
<CompositionalTwoPhaseFluid
name="liveOilSRK"
phaseNames="{ oil, gas }"
equationsOfState="{ srk, srk }"
equationsOfState="{ SoaveRedlichKwong, SoaveRedlichKwong }"
componentNames="{ CO2, N2, C1, C2, C3, C4, C5, C6, C7+ }"
componentCriticalPressure="{ 73.8659e5, 33.9439e5, 46.0421e5, 48.8387e5, 42.4552e5, 37.47e5, 33.5892e5, 30.1037e5, 20.549e5 }"
componentCriticalTemperature="{ 304.7, 126.2, 190.6, 305.43, 369.8, 419.5, 465.9, 507.5, 678.8 }"
Expand All @@ -136,7 +147,7 @@
<CompositionalTwoPhaseFluidLohrenzBrayClark
name="liveOilSRKLBC"
phaseNames="{ oil, gas }"
equationsOfState="{ srk, srk }"
equationsOfState="{ SoaveRedlichKwong, SoaveRedlichKwong }"
componentNames="{ CO2, N2, C1, C2, C3, C4, C5, C6, C7+ }"
componentCriticalPressure="{ 73.8659e5, 33.9439e5, 46.0421e5, 48.8387e5, 42.4552e5, 37.47e5, 33.5892e5, 30.1037e5, 20.549e5 }"
componentCriticalTemperature="{ 304.7, 126.2, 190.6, 305.43, 369.8, 419.5, 465.9, 507.5, 678.8 }"
Expand Down Expand Up @@ -170,25 +181,4 @@
coordinates="{ 0.0, 1.0, 2.0 }"
values="{ 553.15, 583.15, 583.15 }"/>
</Functions>

<!-- Mesh is not used, but GEOSX throws an error without one. Will resolve soon-->
<Mesh>
<InternalMesh
name="mesh1"
elementTypes="{ C3D8 }"
xCoords="{ 0, 1 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 1 }"
ny="{ 1 }"
nz="{ 1 }"
cellBlockNames="{ cellBlock01 }"/>
</Mesh>

<ElementRegions>
<CellElementRegion
name="dummy"
cellBlocks="{ cellBlock01 }"
materialList="{ dummy }"/>
</ElementRegions>
</Problem>
Loading
Loading