Skip to content

Commit

Permalink
Implement STONE II model for three phase relperm interpolation (#2525)
Browse files Browse the repository at this point in the history
  • Loading branch information
jafranc committed Dec 8, 2023
1 parent a1fd561 commit d859ac4
Show file tree
Hide file tree
Showing 24 changed files with 2,369 additions and 59 deletions.
249 changes: 249 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/deadoil_3ph_stone2_1d.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
<?xml version="1.0" ?>

<Problem>
<Solvers>
<CompositionalMultiphaseFVM
name="compflow"
logLevel="1"
discretization="fluidTPFA"
targetRegions="{ region }"
temperature="300">
<NonlinearSolverParameters
newtonTol="1.0e-10"
newtonMaxIter="15"
lineSearchMaxCuts="2"/>
<LinearSolverParameters
directParallel="0"/>
</CompositionalMultiphaseFVM>
</Solvers>

<Mesh>
<InternalMesh
name="mesh"
elementTypes="{ C3D8 }"
xCoords="{ 0, 10 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 10 }"
ny="{ 1 }"
nz="{ 1 }"
cellBlockNames="{ block1 }"/>
</Mesh>

<Geometry>
<Box
name="source"
xMin="{ -0.01, -0.01, -0.01 }"
xMax="{ 1.01, 1.01, 1.01 }"/>

<Box
name="sink"
xMin="{ 8.99, -0.01, -0.01 }"
xMax="{ 10.01, 1.01, 1.01 }"/>
</Geometry>

<Events
maxTime="2e7">
<PeriodicEvent
name="outputs"
timeFrequency="1e6"
target="/Outputs/siloOutput"/>

<PeriodicEvent
name="solverApplications1"
forceDt="1e4"
endTime="1e5"
target="/Solvers/compflow"/>

<PeriodicEvent
name="solverApplications2"
forceDt="1e5"
beginTime="1e5"
target="/Solvers/compflow"/>

<PeriodicEvent
name="statistics"
timeFrequency="1e6"
target="/Tasks/compflowStatistics"/>

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

<NumericalMethods>
<FiniteVolume>
<TwoPointFluxApproximation
name="fluidTPFA"/>
</FiniteVolume>
</NumericalMethods>

<ElementRegions>
<CellElementRegion
name="region"
cellBlocks="{ block1 }"
materialList="{ fluid, rock, relperm }"/>
</ElementRegions>

<Constitutive>
<DeadOilFluid
name="fluid"
phaseNames="{ oil, gas, water }"
surfaceDensities="{ 800.0, 0.9907, 1022.0 }"
componentMolarWeight="{ 114e-3, 16e-3, 18e-3 }"
tableFiles="{ pvdo.txt, pvdg.txt, pvtw.txt }"/>

<CompressibleSolidConstantPermeability
name="rock"
solidModelName="nullSolid"
porosityModelName="rockPorosity"
permeabilityModelName="rockPerm"/>

<NullModel
name="nullSolid"/>

<PressurePorosity
name="rockPorosity"
defaultReferencePorosity="0.05"
referencePressure="0.0"
compressibility="1.0e-9"/>

<BrooksCoreyStone2RelativePermeability
name="relperm"
phaseNames="{ oil, gas, water }"
phaseMinVolumeFraction="{ 0.05, 0.05, 0.05 }"
waterOilRelPermExponent="{ 2.5, 1.5 }"
waterOilRelPermMaxValue="{ 0.8, 0.9 }"
gasOilRelPermExponent="{ 3, 3 }"
gasOilRelPermMaxValue="{ 0.4, 0.9 }"/>

<ConstantPermeability
name="rockPerm"
permeabilityComponents="{ 1.0e-16, 1.0e-16, 1.0e-16 }"/>
</Constitutive>

<FieldSpecifications>
<!-- Initial pressure: ~5 bar -->
<FieldSpecification
name="initialPressure"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/region/block1"
fieldName="pressure"
scale="7.5e6"/>

<!-- Initial composition: no water, only heavy hydrocarbon components and N2 -->
<FieldSpecification
name="initialComposition_oil"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="0"
scale="0.6"/>

<FieldSpecification
name="initialComposition_gas"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="1"
scale="0.399"/>

<FieldSpecification
name="initialComposition_water"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="2"
scale="0.001"/>

<!-- Injection pressure: ~10 bar -->
<FieldSpecification
name="sourceTermPressure"
objectPath="ElementRegions/region/block1"
fieldName="pressure"
scale="1e7"
setNames="{ source }"/>

<!-- Injection stream: mostly water -->
<FieldSpecification
name="sourceTermComposition_oil"
setNames="{ source }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="0"
scale="0.1"/>

<FieldSpecification
name="sourceTermComposition_gas"
setNames="{ source }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="1"
scale="0.1"/>

<FieldSpecification
name="sourceTermComposition_water"
setNames="{ source }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="2"
scale="0.8"/>

<!-- Production pressure: ~40 bar, -->
<FieldSpecification
name="sinkTerm"
objectPath="ElementRegions/region/block1"
fieldName="pressure"
scale="4e6"
setNames="{ sink }"/>

<!-- Production stream: same as initial (should not matter due to upwinding) -->
<FieldSpecification
name="sinkTermComposition_oil"
setNames="{ sink }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="0"
scale="0.6"/>

<FieldSpecification
name="sinkTermComposition_gas"
setNames="{ sink }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="1"
scale="0.399"/>

<FieldSpecification
name="sinkTermComposition_water"
setNames="{ sink }"
objectPath="ElementRegions/region/block1"
fieldName="globalCompFraction"
component="2"
scale="0.001"/>
</FieldSpecifications>

<Outputs>
<Silo
name="siloOutput"/>

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

<Tasks>
<CompositionalMultiphaseStatistics
name="compflowStatistics"
flowSolverName="compflow"
logLevel="1"
computeCFLNumbers="1"
computeRegionStatistics="1"/>
</Tasks>

</Problem>
Loading

0 comments on commit d859ac4

Please sign in to comment.