Skip to content

docs: Compositional fluid model documentation - #3713

Open
dkachuma wants to merge 20 commits into
developfrom
dkachuma/compositional-fluid-doc
Open

docs: Compositional fluid model documentation#3713
dkachuma wants to merge 20 commits into
developfrom
dkachuma/compositional-fluid-doc

Conversation

@dkachuma

@dkachuma dkachuma commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Adds complete documentation for the compositional fluid models that have been added.

@dkachuma dkachuma self-assigned this Jun 24, 2025
@dkachuma dkachuma changed the title doc: Compositional fluid model documentation docs: Compositional fluid model documentation Jun 24, 2025
Comment thread src/coreComponents/constitutive/docs/compositional/Density.rst Outdated
Comment thread src/coreComponents/constitutive/docs/compositional/Enthalpy.rst Outdated
Comment thread src/coreComponents/constitutive/docs/compositional/ImmiscibleWaterFlash.rst Outdated
Comment thread src/coreComponents/constitutive/docs/compositional/NegativeFlash.rst Outdated
@jhuang2601 jhuang2601 added ci: run CUDA builds ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline labels Aug 27, 2026
@jhuang2601 jhuang2601 added ci: run code coverage enables running of the code coverage CI jobs ci: run device builds Allows to run the device (CUDA/HIP) builds labels Aug 27, 2026
dkachuma and others added 2 commits August 27, 2026 18:05
Co-authored-by: Jian Huang <53012159+jhuang2601@users.noreply.github.com>
@jhuang2601

Copy link
Copy Markdown
Contributor

@jafranc @joshua-white @OmarDuran
Can you take a look at this PR, which is ready to merge?

@jafranc jafranc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kudos 👏 on such a delicat task of being succint but offering enough organized information to understand all implementation choice.

Few cosmetic suggestions to have homogene notations

Immiscible water density
------------------------

A simplified exponential density model is available for pure, immiscible water phases. It evaluates the mass density, :math:`\rho`, based on isothermal compressibility and thermal expansion from a reference state:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A simplified exponential density model is available for pure, immiscible water phases. It evaluates the mass density, :math:`\rho`, based on isothermal compressibility and thermal expansion from a reference state:
A simplified exponential density model is available for pure, immiscible water phases. It evaluates the mass density, :math:`\rho`, based on isothermal compressibility :math:`c_w` and thermal expansion :math:`\alpha_w` from a reference state:

.. math::
\frac{H_{dep}}{RT} = Z - 1 + \frac{A + T\frac{\partial A}{\partial T}}{B(\delta_1 - \delta_2)} \ln \left( \frac{Z + \delta_1 B}{Z + \delta_2 B} \right)

where :math:`Z` is the compressibility factor of the mixture.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where the coefficients are defined by the dimensionless mixture parameters :math:A and :math:B: see EOS


For aqueous phases containing dissolved salts, cubic equations of state often struggle to capture complex ionic interactions. To address this, the Phillips brine density model utilizes the empirical correlation developed by Phillips et al. (1981) to pre-compute a 2D lookup table of volume shifts specifically for the water component as a function of pressure and temperature.

First, the apparent molar weight of the brine, :math:`MW_{brine}`, is calculated from the salinity, :math:`S` (molality), the salt molar weight, :math:`MW_{salt}`, and the water molar weight, :math:`MW_{H2O}`:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we call salt molality it m for consistent notation througout the doc or S below ?

.. math::
a_{i,k} = \hat{a}_{i,k} M_i

Implementing the Michaelides Model

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be clearer to rename this section Liquid brine enthalpy IIUC

The Peng-Robinson (PR) (Peng and Robinson, 1976; Robinson and Peng, 1978) and Soave-Redlich-Kwong (SRK) (Soave, 1972) equations of state are widely used for hydrocarbon systems encompassing natural gas, gas condensates, and volatile oils. The fundamental pressure-volume-temperature (PVT) relationships for these equations are defined as:

* Peng-Robinson (PR):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering if a 2-col table here would not be of great visual aid

Note on Component Limits
--------------------------

When compositional fluid models are evaluated in standalone mode (for example, using the ``PVTDriver`` task (:ref:`PVTDriver`)), the maximum number of allowed components is 9. However, when these fluid models are actively coupled with a flow solver during a full simulation, the maximum number of components is restricted to 5.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When compositional fluid models are evaluated in standalone mode (for example, using the ``PVTDriver`` task (:ref:`PVTDriver`)), the maximum number of allowed components is 9. However, when these fluid models are actively coupled with a flow solver during a full simulation, the maximum number of components is restricted to 5.
.. warning::
When compositional fluid models are evaluated in standalone mode (for example, using the ``PVTDriver`` task (:ref:`PVTDriver`)), the maximum number of allowed components is 9. However, when these fluid models are actively coupled with a flow solver during a full simulation, the maximum number of components is restricted to 5.

(might miss an indent)

@@ -0,0 +1,24 @@
Miscellaneous

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbf I would merge misc at the end of Overview as these infos are not to be overlooked


\xi_i = \frac{T_{c,i}^{1/6}}{M_i^{1/2} P_{c,i}^{2/3}}

where :math:`T_{c,i}` is the critical temperature [K], :math:`P_{c,i}` is the critical pressure [atm], and :math:`M_i` is the molar weight [g/mol].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M is noted MW above IIRC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run code coverage enables running of the code coverage CI jobs ci: run device builds Allows to run the device (CUDA/HIP) builds ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline flag: ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants