-
Notifications
You must be signed in to change notification settings - Fork 97
Add energy balance equation to Compositional solver. #1225
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
Merged
francoishamon
merged 55 commits into
GEOS-DEV:develop
from
CusiniM:feature/addEnergyBalance
Apr 10, 2022
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
abfd5fe
Initial commit
e747d60
thermalKernels
CusiniM 74010fa
Assembly up to accumulation is done.
CusiniM 35b57b2
Merge branch 'develop' into feature/addEnergyBalance
CusiniM 4818635
Added all views. Modified input for FluxKernels.
CusiniM fe9f916
done kernels and solver.
CusiniM e68e82a
FluidModels: added enthalpy and internalEnergy
CusiniM b26299e
Enthalpy and Internal energy functions
CusiniM e664d8f
dummy functions and derivatives for enthalpy and internalEnergy.
CusiniM f673df4
fixed comp errors for const. model.
CusiniM 104e987
Fixed some errors.
CusiniM 2d4d860
missing only intEnergy for solid material.
CusiniM 7529364
down to 1 linking error.
CusiniM 86d6599
Finally builds.
CusiniM c845d52
bug fix.
CusiniM 97c6daa
xml file
CusiniM fcc4890
added CO2 and brine enthalpy functions
yue-2018 8ab80ab
Merge remote-tracking branch 'upstream/develop' into feature/addEnerg…
CusiniM 9781d2a
Merge remote-tracking branch 'upstream/develop' into feature/addEnerg…
CusiniM e259158
Post merge fixes. Mainly fixing the strings.
CusiniM afafbe6
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 628cdd0
removed old files not compiled
francoishamon 74c66cd
additional fix
francoishamon c833866
Merge branch 'develop' into feature/addEnergyBalance
francoishamon e518cb6
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 9289225
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 6af1845
added thermal accumulation and volume balance in the new style
francoishamon f5e969a
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 581a125
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 1514ba7
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 59b5959
implemented thermal flux kernel in the new style
francoishamon d33a78f
some cleanup in the kernels
francoishamon 68cddc0
Merge branch 'develop' into feature/addEnergyBalance
francoishamon faeb418
added conduction term
francoishamon 0749d24
Merge branch 'develop' into feature/addEnergyBalance
francoishamon ee8e38e
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 01b2478
implemented temperature BC
francoishamon 2e694fd
removed unused variable
francoishamon d609aff
various fixes
francoishamon d263562
Merge branch 'develop' into feature/addEnergyBalance
francoishamon f0d3e9a
first working version
francoishamon c697f85
added integrated test; made ready for review
francoishamon b719ba8
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 3481c7f
passing unit test for thermal compositional
francoishamon 320f685
start addressing Matteo's comments
francoishamon ab98b35
Merge branch 'develop' into feature/addEnergyBalance
francoishamon f2d59f9
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 444cbfa
Merge branch 'develop' into feature/addEnergyBalance
francoishamon d5ce276
passing all integrated tests
francoishamon 2edbe72
Merge branch 'develop' into feature/addEnergyBalance
francoishamon e15a028
Merge branch 'develop' into feature/addEnergyBalance
francoishamon ba77f5b
removed enum string in CO2-brine fluid
francoishamon 90d4dcc
Merge branch 'develop' into feature/addEnergyBalance
francoishamon 7abf516
addressed Sergey's comments
francoishamon 6a49e3f
Merge branch 'develop' into feature/addEnergyBalance
francoishamon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,223 @@ | ||
| <?xml version="1.0" ?> | ||
|
|
||
| <Problem> | ||
| <Solvers> | ||
| <CompositionalMultiphaseFVM | ||
| name="compflow" | ||
| logLevel="1" | ||
| discretization="fluidTPFA" | ||
| temperature="368.15" | ||
| useMass="1" | ||
| isThermal="1" | ||
| initialDt="1e3" | ||
| maxCompFractionChange="0.5" | ||
| targetRegions="{ region }"> | ||
| <NonlinearSolverParameters | ||
| newtonTol="1.0e-6" | ||
| newtonMaxIter="100" | ||
| lineSearchAction="None" | ||
| maxTimeStepCuts="5"/> | ||
| <LinearSolverParameters | ||
| directParallel="0"/> | ||
| </CompositionalMultiphaseFVM> | ||
| </Solvers> | ||
|
|
||
| <Mesh> | ||
| <InternalMesh | ||
| name="mesh1" | ||
| elementTypes="{ C3D8 }" | ||
| xCoords="{ 0, 100 }" | ||
| yCoords="{ 0, 100 }" | ||
| zCoords="{ 0, 1 }" | ||
| nx="{ 10 }" | ||
| ny="{ 10 }" | ||
| nz="{ 1 }" | ||
| cellBlockNames="{ cb }"/> | ||
| </Mesh> | ||
|
|
||
| <Geometry> | ||
| <Box | ||
| name="sink" | ||
| xMin="{ 89.99, 89.99, -0.01 }" | ||
| xMax="{ 101.01, 101.01, 1.01 }"/> | ||
|
|
||
| <Box | ||
| name="source" | ||
| xMin="{ -0.01, -0.01, -0.01 }" | ||
| xMax="{ 10.01, 10.01, 1.01 }"/> | ||
| </Geometry> | ||
|
|
||
| <Events | ||
| maxTime="1.5e5"> | ||
| <PeriodicEvent | ||
| name="outputs" | ||
| timeFrequency="2.5e4" | ||
| target="/Outputs/vtkOutput"/> | ||
|
|
||
| <PeriodicEvent | ||
| name="solverApplications" | ||
| maxEventDt="2.5e4" | ||
| target="/Solvers/compflow"/> | ||
|
|
||
| <PeriodicEvent | ||
| name="restarts" | ||
| timeFrequency="7.5e4" | ||
| target="/Outputs/sidreRestart"/> | ||
| </Events> | ||
|
|
||
| <NumericalMethods> | ||
| <FiniteVolume> | ||
| <TwoPointFluxApproximation | ||
| name="fluidTPFA"/> | ||
| </FiniteVolume> | ||
| </NumericalMethods> | ||
|
|
||
| <ElementRegions> | ||
| <CellElementRegion | ||
| name="region" | ||
| cellBlocks="{ cb }" | ||
| materialList="{ fluid, rock, relperm, thermalCond }"/> | ||
| </ElementRegions> | ||
|
|
||
| <Constitutive> | ||
|
|
||
| <CompressibleSolidConstantPermeability | ||
| name="rock" | ||
| solidModelName="nullSolid" | ||
| porosityModelName="rockPorosity" | ||
| permeabilityModelName="rockPerm" | ||
| solidInternalEnergyModelName="rockInternalEnergy"/> | ||
| <NullModel | ||
| name="nullSolid"/> | ||
| <PressurePorosity | ||
| name="rockPorosity" | ||
| defaultReferencePorosity="0.2" | ||
| referencePressure="0.0" | ||
| compressibility="1.0e-9"/> | ||
| <SolidInternalEnergy | ||
| name="rockInternalEnergy" | ||
| volumetricHeatCapacity="1.95e6" | ||
| referenceTemperature="368.15" | ||
| referenceInternalEnergy="0"/> | ||
| <ConstantPermeability | ||
| name="rockPerm" | ||
| permeabilityComponents="{ 1.0e-13, 1.0e-13, 1.0e-13 }"/> | ||
|
|
||
| <CO2BrinePhillipsThermalFluid | ||
| name="fluid" | ||
| phaseNames="{ gas, water }" | ||
| componentNames="{ co2, water }" | ||
| componentMolarWeight="{ 44e-3, 18e-3 }" | ||
| phasePVTParaFiles="{ pvtgas.txt, pvtliquid.txt }" | ||
| flashModelParaFile="co2flash.txt"/> | ||
|
|
||
| <BrooksCoreyRelativePermeability | ||
| name="relperm" | ||
| phaseNames="{ gas, water }" | ||
| phaseMinVolumeFraction="{ 0.0, 0.0 }" | ||
| phaseRelPermExponent="{ 1.5, 1.5 }" | ||
| phaseRelPermMaxValue="{ 0.9, 0.9 }"/> | ||
|
|
||
| <ConstantThermalConductivity | ||
| name="thermalCond" | ||
| phaseNames="{ gas, water }" | ||
| thermalConductivityComponents="{ 0.6, 0.6, 0.6 }"/> | ||
|
|
||
| </Constitutive> | ||
|
|
||
| <FieldSpecifications> | ||
|
|
||
| <FieldSpecification | ||
| name="initialPressure" | ||
| initialCondition="1" | ||
| setNames="{ all }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="pressure" | ||
| scale="9e6"/> | ||
| <FieldSpecification | ||
| name="initialTemperature" | ||
| initialCondition="1" | ||
| setNames="{ all }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="temperature" | ||
| scale="368.15"/> | ||
| <FieldSpecification | ||
| name="initialComposition_co2" | ||
| initialCondition="1" | ||
| setNames="{ all }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="globalCompFraction" | ||
| component="0" | ||
| scale="0.005"/> | ||
| <FieldSpecification | ||
| name="initialComposition_water" | ||
| initialCondition="1" | ||
| setNames="{ all }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="globalCompFraction" | ||
| component="1" | ||
| scale="0.995"/> | ||
|
|
||
| <FieldSpecification | ||
| name="sinkPressure" | ||
| setNames="{ sink }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="pressure" | ||
| scale="7e6"/> | ||
| <FieldSpecification | ||
| name="sinkTemperature" | ||
| setNames="{ sink }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="temperature" | ||
| scale="368.15"/> | ||
| <FieldSpecification | ||
| name="sinkTermComposition_co2" | ||
| setNames="{ sink }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="globalCompFraction" | ||
| component="0" | ||
| scale="0.005"/> | ||
| <FieldSpecification | ||
| name="sinkTermComposition_water" | ||
| setNames="{ sink }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="globalCompFraction" | ||
| component="1" | ||
| scale="0.995"/> | ||
|
|
||
| <FieldSpecification | ||
| name="sourcePressure" | ||
| setNames="{ source }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="pressure" | ||
| scale="1.45e7"/> | ||
| <FieldSpecification | ||
| name="sourceTemperature" | ||
| setNames="{ source }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="temperature" | ||
| scale="300.15"/> | ||
| <FieldSpecification | ||
| name="sourceTermComposition_co2" | ||
| setNames="{ source }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="globalCompFraction" | ||
| component="0" | ||
| scale="0.995"/> | ||
| <FieldSpecification | ||
| name="sourceTermComposition_water" | ||
| setNames="{ source }" | ||
| objectPath="ElementRegions/region/cb" | ||
| fieldName="globalCompFraction" | ||
| component="1" | ||
| scale="0.005"/> | ||
| </FieldSpecifications> | ||
|
|
||
| <Outputs> | ||
| <VTK | ||
| name="vtkOutput"/> | ||
|
|
||
| <Restart | ||
| name="sidreRestart"/> | ||
| </Outputs> | ||
| </Problem> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| FlashModel CO2Solubility 1e6 7.5e7 5e5 299.15 369.15 10 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| DensityFun SpanWagnerCO2Density 1e6 7.5e7 5e5 299.15 369.15 10 | ||
| ViscosityFun FenghourCO2Viscosity 1e6 7.5e7 5e5 299.15 369.15 10 | ||
| EnthalpyFun CO2Enthalpy 1e6 7.5e7 5e5 299.15 369.15 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| DensityFun PhillipsBrineDensity 1e6 7.5e7 5e5 299.15 369.15 10 0 | ||
| ViscosityFun PhillipsBrineViscosity 0 | ||
| EnthalpyFun BrineEnthalpy 1e6 7.5e7 5e5 299.15 369.15 10 0 |
Submodule integratedTests
updated
from a1d96e to 16dd84
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I really don't understand what is going on there:
CO2BrinePhillipsThermalFluid, the code compiles and worksCO2BrineEzrokhiThermalFluid, the code compiles and worksThis is not a blocking problem for me, but I don't understand why it does not compile with the two models activated.