Repository navigation
Conversation
dkachuma
left a comment
There was a problem hiding this comment.
Looks good.
I think initially the salinity and solubility were supposed to be per kg of brine (not kg of water). But I think somewhere down the line we started mixing the 2 up. It is worthwhile to check that we don't have dangling references to moles per kg of brine in the code and doc.
| ================================================================================ | ||
|
|
||
| At initialization, GEOS performs a preprocessing step to construct a two-dimensional table storing the values of CO2 solubility in brine and water solubility in the gas phase as functions of pressure, temperature, and a constant salinity. Solubility is calculated and provided as moles of the component dissolved or vaporized per mass of the phase. For CO2 this will be moles of CO2 dissolved per kg of water and for water this will be moles of H2O vaporized in the CO2 phase per kg of CO2. | ||
| At initialization, GEOS performs a preprocessing step to construct a two-dimensional table storing the values of CO2 solubility in brine and water solubility in the gas phase as functions of pressure, temperature, and a constant salinity. Solubility is stored as moles of the component dissolved or vaporized per kg of the other component. The ``water`` component of these fluids is the brine, salt included: its density is the brine density, so one kg of it holds :math:`1/(1 + m M_{NaCl})` kg of H2O, where :math:`m` is the NaCl molality (mol per kg of H2O) and :math:`M_{NaCl}` the molar weight of NaCl. The solubility models return the equilibrium loading :math:`b_{CO2}` in moles of CO2 per kg of H2O; GEOS divides it by :math:`1 + m M_{NaCl}` so that the stored CO2 solubility is in moles of CO2 per kg of the water (brine) component. For a saturated liquid in two-phase equilibrium, the liquid pseudo-mole fraction :math:`y_{CO2,\ell}` produced by the flash therefore satisfies |
There was a problem hiding this comment.
Solubility is stored as moles of the component dissolved or vaporized per kg of the other component.
Solubility in the brine phase is stored as moles of CO2 dissolved per kg of H2O whereas vaporization in the gas phase is stored as moles of H2O vaporized per kg of CO2.
| temperatureInterval="5" | ||
| salinity="1.901285269" | ||
| ezrokhiDensityCoefficients="{0.1033, -2.2991e-5, -2.3658e-6}" | ||
| ezrokhiDensityCoefficients="{0.1003, -2.2991e-5, -2.3658e-6}" |
There was a problem hiding this comment.
Is this a correction based on the salinity?
| real64 const CO2MW = m_componentMolarWeight[m_CO2Index]; | ||
|
|
||
| value = (1.0 - C ) * CO2Enthalpy * CO2MWInv + C * brineEnthalpy * waterMWInv; | ||
| value = (1.0 - C ) * CO2Enthalpy * CO2MW + C * brineEnthalpy * waterMW; |
There was a problem hiding this comment.
In the molar formulation, C will be a mole fraction. I'm guessing the assumption here is that CO2Enthalpy and brineEnthalpy are in mass variables (i.e. J/kg). In that case I think we should average them by using a mass fraction i.e.
C_new = C*waterMW/(CO2MW + waterMW)
I could be missing something though.
In any case, what we had before still doesn't feel correct.
| phaseFraction.value[m_vapourIndex], | ||
| phaseCompFraction.value[m_liquidIndex], | ||
| phaseCompFraction.value[m_vapourIndex] ); | ||
| } |
There was a problem hiding this comment.
Should we do this always not only when the flash fails?
Co-authored-by: Dickson Kachuma <81433670+dkachuma@users.noreply.github.com>
|
@jafranc @OmarDuran Can you please review this PR? |

Rebaseline needed
*_CO2_enthalpy_tablevalues change)co2_thermal_2d,co2_thermal_2d_iterative,co2_thermal_injwell_2d,co2_thermal_prdwell_2d,co2_thermal_well_2d,staircase_co2_wells_thermal_3d_iterative,ThermoPoroElastic_staircase_co2_smoke,ThermoPoroElastic_staircase_co2_iterative_smoke,testPVT_CO2Brine*_co2Dissolution_tablevalues change)class09_pb3_smoke_3d,PoroElastic_hybridHexPrism_co2_{fim,sequential}_3d,PoroElastic_staircase_co2_3d_{fim,fim_iterative,sequential},thermalLeakyWell_smoke_3d,ThermoPoroElastic_staircase_co2*,testPVT,testPVT_CO2Brine,testPVT_CO2BrineTablesdome_kvalue_smoke,dome_soreide_whitson_smoke,initialization_2phase_4comptestPVT_Compositional