-
Notifications
You must be signed in to change notification settings - Fork 106
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
Changes from 52 commits
abfd5fe
e747d60
74010fa
35b57b2
4818635
fe9f916
e68e82a
b26299e
e664d8f
f673df4
104e987
2d4d860
7529364
86d6599
c845d52
97c6daa
fcc4890
8ab80ab
9781d2a
e259158
afafbe6
628cdd0
74c66cd
c833866
e518cb6
9289225
6af1845
f5e969a
581a125
1514ba7
59b5959
d33a78f
68cddc0
faeb418
0749d24
ee8e38e
01b2478
2e694fd
d609aff
d263562
f0d3e9a
c697f85
b719ba8
3481c7f
320f685
ab98b35
f2d59f9
444cbfa
d5ce276
2edbe72
e15a028
ba77f5b
90d4dcc
7abf516
6a49e3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| FlashModel CO2Solubility 1e6 7.5e7 5e4 299.15 370.15 1 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| DensityFun SpanWagnerCO2Density 1e6 7.5e7 5e4 299.15 370.15 1 | ||
| ViscosityFun FenghourCO2Viscosity 1e6 7.5e7 5e4 299.15 370.15 1 | ||
| EnthalpyFun CO2Enthalpy 1e6 7.5e7 5e4 299.15 370.15 1 | ||
| InternalEnergyFun CO2InternalEnergy 1e6 7.5e7 5e4 299.15 370.15 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| DensityFun PhillipsBrineDensity 1e6 7.5e7 5e4 299.15 370.15 1 0 | ||
| ViscosityFun PhillipsBrineViscosity 0 | ||
| EnthalpyFun BrineEnthalpy 1e6 7.5e7 5e4 299.15 370.15 1 0 | ||
| InternalEnergyFun BrineInternalEnergy |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,10 @@ void constitutiveUpdatePassThru( MultiFluidBase const & fluid, | |
| CompositionalMultiphaseFluid, | ||
| #endif | ||
| CO2BrinePhillipsFluid, | ||
| CO2BrineEzrokhiFluid >::execute( fluid, std::forward< LAMBDA >( lambda ) ); | ||
| CO2BrineEzrokhiFluid, | ||
| CO2BrinePhillipsThermalFluid /*, // if I uncomment the two models at the same time, the compiler segfaults on | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I really don't understand what is going on there:
This is not a blocking problem for me, but I don't understand why it does not compile with the two models activated. |
||
| Lassen! | ||
| CO2BrineEzrokhiThermalFluid*/>::execute( fluid, std::forward< LAMBDA >( lambda ) ); | ||
| } | ||
|
|
||
| template< typename LAMBDA > | ||
|
|
@@ -57,7 +60,10 @@ void constitutiveUpdatePassThru( MultiFluidBase & fluid, | |
| CompositionalMultiphaseFluid, | ||
| #endif | ||
| CO2BrinePhillipsFluid, | ||
| CO2BrineEzrokhiFluid >::execute( fluid, std::forward< LAMBDA >( lambda ) ); | ||
| CO2BrineEzrokhiFluid, | ||
| CO2BrinePhillipsThermalFluid /*, // if I uncomment the two models at the same time, the compiler segfaults on | ||
| Lassen! | ||
| CO2BrineEzrokhiThermalFluid*/>::execute( fluid, std::forward< LAMBDA >( lambda ) ); | ||
| } | ||
|
|
||
| } // namespace constitutive | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.