Skip to content

Commit

Permalink
EDFM improvements - add CI computation kernel that uses numerical int…
Browse files Browse the repository at this point in the history
…egration. (#1925)

* Implemented CI computation kernel.

* renamed input files and added one with a slanted fractures.

* removed nonconst getters from EmbeddedSurfaceSubRegion

* reorganized singlePhase flow in fractures inputFiles.

* added a mechanics moduli conversion script

* fixed fracture nodes issue and removed debug output.

* modified mgr startegy + direct solver in egg model.
  • Loading branch information
CusiniM committed Jan 12, 2023
1 parent 490f777 commit b0b8753
Show file tree
Hide file tree
Showing 52 changed files with 3,618 additions and 130 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,289 @@
<?xml version="1.0" ?>

<Problem>
<Solvers
gravityVector="{ 0.0, 0.0, 0.0 }">
<CompositionalMultiphaseFVM
name="compflow"
logLevel="1"
discretization="fluidTPFA"
temperature="300"
useMass="0"
targetRegions="{ Domain, Fracture }"
targetRelativePressureChangeInTimeStep="1"
targetPhaseVolFractionChangeInTimeStep="1"
maxCompFractionChange="1"
maxRelativePressureChange="1"
initialDt="1e4">
<NonlinearSolverParameters
newtonTol="1.0e-6"
newtonMaxIter="15"
maxTimeStepCuts="2"
lineSearchMaxCuts="2"/>
<LinearSolverParameters
solverType="direct"
directParallel="0"
logLevel="0"/>
</CompositionalMultiphaseFVM>

<EmbeddedSurfaceGenerator
name="SurfaceGenerator"
logLevel="1"
discretization="FE1"
targetRegions="{ Domain, Fracture }"
fractureRegion="Fracture"
mpiCommOrder="1"/>
</Solvers>

<Mesh>
<InternalMesh
name="mesh1"
elementTypes="{ C3D8 }"
xCoords="{ 0, 1 }"
yCoords="{ 0, 1 }"
zCoords="{ 0, 1 }"
nx="{ 11 }"
ny="{ 11 }"
nz="{ 11 }"
cellBlockNames="{ cb1 }"/>
</Mesh>

<NumericalMethods>
<FiniteVolume>
<TwoPointFluxApproximation
name="fluidTPFA"/>
</FiniteVolume>
<FiniteElements>
<FiniteElementSpace
name="FE1"
order="1"/>
</FiniteElements>
</NumericalMethods>

<Events
maxTime="5e5">
<SoloEvent
name="preFracture"
target="/Solvers/SurfaceGenerator"/>

<PeriodicEvent
name="outputs"
timeFrequency="1e5"
targetExactTimestep="1"
target="/Outputs/vtkOutput"/>

<PeriodicEvent
name="restarts"
timeFrequency="2e5"
targetExactTimestep="0"
target="/Outputs/sidreRestart"/>

<PeriodicEvent
name="solverApplications1"
beginTime="0"
target="/Solvers/compflow"/>
</Events>

<ElementRegions>
<CellElementRegion
name="Domain"
cellBlocks="{ cb1 }"
materialList="{ fluid1, rock, relperm }"/>

<SurfaceElementRegion
name="Fracture"
defaultAperture="1.0e-4"
materialList="{ fluid1, fractureFilling, relperm }"
subRegionType="embeddedElement"/>
</ElementRegions>

<Constitutive>
<DeadOilFluid
name="fluid1"
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 }"/>

<CompressibleSolidParallelPlatesPermeability
name="fractureFilling"
solidModelName="nullSolid"
porosityModelName="fracturePorosity"
permeabilityModelName="fracturePerm"/>

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

<NullModel
name="nullSolid"/>

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

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

<PressurePorosity
name="fracturePorosity"
defaultReferencePorosity="1.00"
referencePressure="0.0"
compressibility="0.0"/>

<ParallelPlatesPermeability
name="fracturePerm"/>

<BrooksCoreyRelativePermeability
name="relperm"
phaseNames="{ oil, gas, water }"
phaseMinVolumeFraction="{ 0.05, 0.05, 0.05 }"
phaseRelPermExponent="{ 1.5, 1.5, 1.5 }"
phaseRelPermMaxValue="{ 0.9, 0.9, 0.9 }"/>
</Constitutive>

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

<FieldSpecification
name="initialFracturePressure"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/Fracture"
fieldName="pressure"
scale="5e6"/>

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

<FieldSpecification
name="initialCompositionFracture_oil"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/Fracture"
fieldName="globalCompFraction"
component="0"
scale="0.6"/>

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

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

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

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

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

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

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

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

<!-- Production pressure: ~2 bar, -->
<FieldSpecification
name="sinkTerm"
objectPath="ElementRegions/Domain/cb1"
fieldName="pressure"
scale="2e5"
setNames="{ sink }"/>

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

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

<FieldSpecification
name="sinkTermComposition_water"
setNames="{ sink }"
objectPath="ElementRegions/Domain/cb1"
fieldName="globalCompFraction"
component="2"
scale="0.001"/>
</FieldSpecifications>
</Problem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" ?>

<Problem>
<Included>
<File name="./deadOil_fractureMatrixFlow_edfm_base.xml" />
</Included>

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

<Box
name="sink"
xMin="{ 0.9, 0.90, -0.01 }"
xMax="{ 1.01, 1.01, 0.11 }"/>

<BoundedPlane
name="FracturePlane"
normal="{ 1, 0, 0 }"
origin="{ 0.5, 0.5, 0.5 }"
lengthVector="{ 0, 1, 0 }"
widthVector="{ 0, 0, 1 }"
dimensions="{ 0.5, 1 }"/>
</Geometry>

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="deadOil_fracMatFlow_edfm_horizontal"
plotLevel="2"
format="ascii"/>

<Restart
name="sidreRestart"/>
</Outputs>
</Problem>
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" ?>

<Problem>
<Included>
<File name="./deadOil_fractureMatrixFlow_edfm_base.xml" />
</Included>

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

<Box
name="sink"
xMin="{ 0.9, 0.90, -0.01 }"
xMax="{ 1.01, 1.01, 0.11 }"/>

<BoundedPlane
name="FracturePlane"
normal="{ 1, -1, 1 }"
origin="{ 0.5, 0.5, 0.5 }"
lengthVector="{ 0.3333, 0.6666, 0.3333 }"
widthVector="{ -0.5, 0, 0.5 }"
dimensions="{ 1.1, 1.1 }"/>
</Geometry>

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="deadOil_fracMatFlow_edfm_inclined"
plotLevel="2"
format="ascii"/>

<Restart
name="sidreRestart"/>
</Outputs>
</Problem>
Loading

0 comments on commit b0b8753

Please sign in to comment.