Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add HU simplified 2-phase version, refactor IHU implementation and fix bugs where possible, change phase/component flux logic #3401

Open
wants to merge 106 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
d83a609
move into folder and clean up includes
Sep 25, 2024
9d9915c
Remove duplicates of NoOpFunc
Sep 25, 2024
fde7cab
Update SinglePhasePoromechanicsEmbeddedFractures.hpp
paveltomin Sep 25, 2024
d2c590b
more move into subfolders
Sep 25, 2024
ffc24fe
split FlowSolverBaseKernels.hpp
Sep 26, 2024
451b40a
rename
Sep 26, 2024
d00af05
Merge branch 'develop' into pt/flow-kernels-folder
paveltomin Sep 26, 2024
2ce059c
split SinglePhaseBaseKernels.hpp
Sep 26, 2024
6d25f34
Merge branch 'pt/flow-kernels-folder' into pt/remove-noopfunc-duplicates
paveltomin Sep 26, 2024
e20b031
thermal base
Sep 26, 2024
f4bd0f7
rename
Sep 26, 2024
f84dfc3
thermal flux
Sep 26, 2024
616724a
last things
Sep 26, 2024
c30034e
Merge branch 'develop' into pt/flow-kernels-split
paveltomin Sep 26, 2024
9f133ea
remove
Sep 26, 2024
93f76ef
missing file
Sep 26, 2024
3cc1446
code style
Sep 26, 2024
3e6c238
unused
Sep 26, 2024
8527f35
unused
Sep 26, 2024
2ba3f8e
cuda build
Sep 27, 2024
4e9ffab
try this
Sep 27, 2024
e4edeeb
revert to avoid cuda errors
Sep 27, 2024
7255e9d
first pass for compositional
Sep 28, 2024
f78b597
Merge branch 'pt/remove-noopfunc-duplicates' into pt/flow-kernels-split
paveltomin Sep 28, 2024
da6ed32
isothermal accum kernel
Sep 28, 2024
1ebcd9a
thermal accum
Sep 28, 2024
ee44033
flux helpers
Sep 28, 2024
0aa4f12
more or less ready
Sep 28, 2024
c5f4901
some includes cleanup
Sep 29, 2024
890af39
includes cleanup and code style
Sep 30, 2024
695b4e2
crash fix
Sep 30, 2024
efc864f
Merge branch 'pt/flow-kernels-split' into pt/flow-kernel-comp-split
paveltomin Sep 30, 2024
7f3d622
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-fo…
Oct 3, 2024
042c3ee
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-fo…
Oct 15, 2024
fb41429
Merge branch 'pt/flow-kernels-folder' into pt/remove-noopfunc-duplicates
paveltomin Oct 15, 2024
5d69959
Merge remote-tracking branch 'origin/pt/remove-noopfunc-duplicates' i…
Oct 15, 2024
683733e
build fix
Oct 15, 2024
8035b8c
Merge branch 'pt/flow-kernels-split' into pt/flow-kernel-comp-split
Oct 15, 2024
86952e8
2-phase simplified version of HU
Oct 16, 2024
d1d113c
make it able to run
Oct 16, 2024
5423f89
debug and some bug fixes
Oct 16, 2024
5ef0eea
wip
Oct 18, 2024
e4a6465
some bug fixes
Oct 18, 2024
4b46fee
missing file
Oct 18, 2024
188f5db
wip
Oct 19, 2024
d800f67
try to clean up
Oct 21, 2024
abc4e27
Merge branch 'develop' into pt/flow-kernels-folder
paveltomin Oct 25, 2024
c9e8b07
Merge branch 'pt/flow-kernels-folder' into pt/remove-noopfunc-duplicates
paveltomin Oct 25, 2024
3a07987
Merge branch 'pt/remove-noopfunc-duplicates' into pt/flow-kernels-split
paveltomin Oct 25, 2024
a5115a8
Merge branch 'pt/flow-kernels-split' into pt/flow-kernel-comp-split
paveltomin Oct 25, 2024
647b273
wip
Oct 28, 2024
c2e290f
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-fo…
Oct 28, 2024
70b5857
Merge branch 'pt/flow-kernels-folder' into pt/remove-noopfunc-duplicates
paveltomin Oct 28, 2024
31eee96
Merge remote-tracking branch 'origin/pt/remove-noopfunc-duplicates' i…
Oct 28, 2024
1f57fd8
Merge remote-tracking branch 'origin/pt/flow-kernels-split' into pt/f…
Oct 28, 2024
604578e
Merge branch 'pt/flow-kernel-comp-split' into pt/hu-2phase
paveltomin Oct 28, 2024
9852365
Merge branch 'pt/hu-2phase' of https://github.com/GEOS-DEV/GEOS into …
Oct 28, 2024
6bdb951
cap flux
Oct 28, 2024
c331044
some cleanup
Oct 28, 2024
a41abed
Update HU2PhaseFlux.hpp
paveltomin Oct 28, 2024
48bdee6
fix total mobility bug for IHU and simplify viscosu part logic
Oct 29, 2024
3bc9523
revert
Oct 30, 2024
64e6b22
clean up a bit
Oct 30, 2024
dcf0c9c
try to re-use the code
Oct 30, 2024
d0252ef
code style
Oct 30, 2024
7726a03
restore old behavior
Oct 31, 2024
c723c28
restore tests
Oct 31, 2024
c7e229a
throw an error
Oct 31, 2024
8680576
bug fix
Nov 1, 2024
dabc5cd
Merge branch 'pt/flow-kernels-split' into pt/flow-kernel-comp-split
paveltomin Nov 1, 2024
418f665
Merge branch 'pt/flow-kernel-comp-split' into pt/hu-2phase
paveltomin Nov 1, 2024
c2a20f4
code style
Nov 1, 2024
a40ef9f
flip
Nov 4, 2024
f17aa9a
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-fo…
Nov 4, 2024
ab71fca
Merge branch 'pt/flow-kernels-folder' into pt/remove-noopfunc-duplicates
paveltomin Nov 4, 2024
7d15d4e
Merge remote-tracking branch 'origin/pt/remove-noopfunc-duplicates' i…
Nov 4, 2024
3b3cec9
Merge remote-tracking branch 'origin/pt/flow-kernels-split' into pt/f…
Nov 4, 2024
f9a1006
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-fo…
Nov 5, 2024
1e5821b
Merge branch 'pt/flow-kernels-folder' into pt/remove-noopfunc-duplicates
paveltomin Nov 5, 2024
cd88ff2
Merge branch 'develop' into pt/remove-noopfunc-duplicates
paveltomin Nov 5, 2024
28657ae
Merge remote-tracking branch 'origin/pt/remove-noopfunc-duplicates' i…
Nov 6, 2024
407f4ea
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-split
Nov 6, 2024
612ce7b
Merge remote-tracking branch 'origin/pt/flow-kernels-split' into pt/f…
Nov 6, 2024
10d7f12
Merge branch 'pt/flow-kernel-comp-split' into pt/hu-2phase
paveltomin Nov 7, 2024
5768a8c
bug fix
Nov 7, 2024
1c5609b
Merge remote-tracking branch 'origin/develop' into pt/flow-kernels-split
Nov 8, 2024
38cc1b5
Merge remote-tracking branch 'origin/pt/flow-kernels-split' into pt/f…
Nov 8, 2024
89567bc
Merge remote-tracking branch 'origin/pt/flow-kernel-comp-split' into …
Nov 8, 2024
6ea1514
Merge branch 'develop' into pt/flow-kernels-split
paveltomin Nov 9, 2024
f6ac68f
Merge branch 'pt/flow-kernels-split' into pt/flow-kernel-comp-split
paveltomin Nov 9, 2024
4b9a7b3
bugfix
Nov 9, 2024
ed8a419
Merge branch 'pt/flow-kernels-split' into pt/flow-kernel-comp-split
paveltomin Nov 9, 2024
45ff2af
Merge branch 'pt/flow-kernel-comp-split' into pt/hu-2phase
paveltomin Nov 9, 2024
b7956a1
code style
Nov 9, 2024
6ed8fd7
Merge remote-tracking branch 'origin/develop' into pt/hu-2phase
Nov 11, 2024
2562b52
sync with new density treatment for gravity
Nov 12, 2024
49cd55a
Merge branch 'develop' into pt/hu-2phase
paveltomin Nov 17, 2024
b0cd8ff
Merge branch 'develop' into pt/hu-2phase
paveltomin Nov 21, 2024
4c008c2
Merge branch 'develop' into pt/hu-2phase
paveltomin Nov 22, 2024
f55d40e
Merge remote-tracking branch 'origin/develop' into pt/hu-2phase
Dec 23, 2024
8bfe9c5
Merge branch 'develop' into pt/hu-2phase
paveltomin Jan 8, 2025
6eba544
build fix
Jan 8, 2025
9833264
Merge branch 'develop' into pt/hu-2phase
paveltomin Jan 13, 2025
be8dfca
Merge branch 'develop' into pt/hu-2phase
paveltomin Jan 15, 2025
22cfb2e
sync gravity thing
Jan 15, 2025
5e0ffdd
code style
Jan 15, 2025
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
149 changes: 149 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_1d_base.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
<?xml version="1.0" ?>

<Problem>
<Solvers gravityVector="{-1, 0, 0}">
<CompositionalMultiphaseFVM
name="compflow"
logLevel="1"
discretization="fluidTPFA"
targetRegions="{ Region1 }"
temperature="297.15">
<NonlinearSolverParameters
newtonTol="5e-4"
lineSearchAction="None"
newtonMaxIter="100"/>
<LinearSolverParameters
directParallel="0"/>
</CompositionalMultiphaseFVM>
</Solvers>

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

<Events
maxTime="1.0368e8">
<PeriodicEvent
name="outputs"
cycleFrequency="1"
target="/Outputs/vtkOutput"/>

<PeriodicEvent
name="solverApplications1"
forceDt="1.728e6"
target="/Solvers/compflow"/>

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

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

<Constitutive>
<CO2BrinePhillipsFluid
name="fluid"
logLevel="1"
phaseNames="{ gas, water }"
componentNames="{ co2, water }"
componentMolarWeight="{ 44e-3, 18e-3 }"
phasePVTParaFiles="{ pvtgas.txt, pvtliquid.txt }"
flashModelParaFile="co2flash.txt"/>

<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"/>

<BrooksCoreyRelativePermeability
name="relperm"
phaseNames="{ gas, water }"
phaseMinVolumeFraction="{ 0.0, 0.0 }"
phaseRelPermExponent="{ 2.0, 2.5 }"
phaseRelPermMaxValue="{ 0.9, 0.9 }"/>

<ConstantPermeability
name="rockPerm"
permeabilityComponents="{ 5.0e-15, 5.0e-15, 5.0e-15 }"/>
</Constitutive>

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

<FieldSpecification
name="initialComposition_co2"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/Region1/block1"
fieldName="globalCompFraction"
component="0"
functionName="initial_co2"
scale="1"/>

<FieldSpecification
name="initialComposition_water"
initialCondition="1"
setNames="{ all }"
objectPath="ElementRegions/Region1/block1"
fieldName="globalCompFraction"
component="1"
functionName="initial_water"
scale="1"/>

<!--
<SourceFlux
name="sourceTerm"
logLevel="10"
objectPath="ElementRegions/Region1/block1"
component="0"
scale="-1e-3"
setNames="{ source }"/>
-->

</FieldSpecifications>

<Functions>
<TableFunction name="initial_co2"
inputVarNames="{elementCenter}"
coordinates="{0.0, 10.}"
values="{1.0, 0.0}"
/>
<TableFunction name="initial_water"
inputVarNames="{elementCenter}"
coordinates="{0.0, 10.}"
values="{0.0, 1.0}"
/>
</Functions>

<Outputs>
<Restart
name="restartOutput"/>
</Outputs>
</Problem>
18 changes: 18 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_grav_1d_base.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" ?>

<Problem>

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

</Problem>
27 changes: 27 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_grav_visc_1d_hu2ph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" ?>

<Problem>

<Included>
<File name="co2_1d_base.xml"/>
</Included>

<Included>
<File name="co2_grav_1d_base.xml"/>
</Included>

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

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="co2_grav_1d_hu2ph"/>
</Outputs>
</Problem>
26 changes: 26 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_grav_visc_1d_ppu2ph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" ?>

<Problem>

<Included>
<File name="co2_1d_base.xml"/>
</Included>

<Included>
<File name="co2_grav_1d_base.xml"/>
</Included>

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

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="co2_grav_1d_ppu2ph"/>
</Outputs>
</Problem>
18 changes: 18 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_visc_1d_base.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" ?>

<Problem>

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

</Problem>
27 changes: 27 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_visc_1d_hu2ph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" ?>

<Problem>

<Included>
<File name="co2_1d_base.xml"/>
</Included>

<Included>
<File name="co2_visc_1d_base.xml"/>
</Included>

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

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="co2_visc_1d_hu2ph"/>
</Outputs>
</Problem>
26 changes: 26 additions & 0 deletions inputFiles/compositionalMultiphaseFlow/co2_visc_1d_ppu2ph.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" ?>

<Problem>

<Included>
<File name="co2_1d_base.xml"/>
</Included>

<Included>
<File name="co2_visc_1d_base.xml"/>
</Included>

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

<Outputs>
<VTK
name="vtkOutput"
plotFileRoot="co2_visc_1d_ppu2ph"/>
</Outputs>
</Problem>
26 changes: 13 additions & 13 deletions inputFiles/compositionalMultiphaseFlow/pvdg.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Pg(Pa) Bg(m3/sm3) Visc(Pa.s)
3000000 0.04234 0.00005344
6000000 0.02046 0.0000542
9000000 0.01328 0.00005526
12000000 0.00977 0.0000566
15000000 0.00773 0.00005818
18000000 0.006426 0.00005994
21000000 0.005541 0.00006181
24000000 0.004919 0.0000637
27000000 0.004471 0.00006559
29500000 0.004194 0.00006714
31000000 0.004031 0.00006806
33000000 0.00391 0.00006832
53000000 0.003868 0.00006935
3000000 0.04234 1
6000000 0.02046 1
9000000 0.01328 1
12000000 0.00977 1
15000000 0.00773 1
18000000 0.006426 1
21000000 0.005541 1
24000000 0.004919 1
27000000 0.004471 1
29500000 0.004194 1
31000000 0.004031 1
33000000 0.00391 1
53000000 0.003868 1
8 changes: 0 additions & 8 deletions inputFiles/compositionalMultiphaseFlow/pvdg_m.txt

This file was deleted.

14 changes: 7 additions & 7 deletions inputFiles/compositionalMultiphaseFlow/pvdo.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# P[Pa] Bo[m3/sm3] Visc(Pa.s)
2000000 1.09 0.000449
5000000 1.08 0.00051
10000000 1.07 0.000594
20000000 1.05 0.000695
30000000 1.04 0.00083
40000000 1.03 0.00091
50000000.7 1.02 0.000975
2000000 1.09 1
5000000 1.08 1
10000000 1.07 1
20000000 1.05 1
30000000 1.04 1
40000000 1.03 1
50000000.7 1.02 1
8 changes: 0 additions & 8 deletions inputFiles/compositionalMultiphaseFlow/pvdo_m.txt

This file was deleted.

1 change: 0 additions & 1 deletion src/coreComponents/constitutive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ set( constitutive_headers
thermalConductivity/MultiPhaseVolumeWeightedThermalConductivity.hpp
thermalConductivity/SinglePhaseThermalConductivity.hpp
thermalConductivity/SinglePhaseThermalConductivityBase.hpp
thermalConductivity/SinglePhaseThermalConductivityFields.hpp
thermalConductivity/SinglePhaseThermalConductivitySelector.hpp
thermalConductivity/ThermalConductivityFields.hpp
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

/**
* @file multiFluidSelector.hpp
* @file MultiFluidSelector.hpp
*/
#ifndef GEOS_CONSTITUTIVE_FLUID_MULTIFLUIDSELECTOR_HPP_
#define GEOS_CONSTITUTIVE_FLUID_MULTIFLUIDSELECTOR_HPP_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

#include "SinglePhaseThermalConductivityBase.hpp"
#include "ThermalConductivityFields.hpp"
#include "SinglePhaseThermalConductivityFields.hpp"

namespace geos
{
Expand Down
Loading
Loading