GaPFlow.models.pressure#

Equation of state (pressure).

Pressure-density relations for the implemented models.

Functions

bayada_chupin(dens, rho_l, rho_v, c_l, c_v)

Computes pressure using the Bayada-Chupin cavitation model.

bwr(dens, T[, gamma])

Computes pressure using the Benedict–Webb–Rubin (BWR) equation of state.

cubic(dens[, a, b, c, d])

Computes pressure using a general cubic polynomial fit.

dowson_higginson(dens[, rho0, P0, C1, C2])

Computes pressure using the Dowson-Higginson isothermal equation of state.

eos_pressure(density, prop)

Wrapper around all implemented equation of state models.

murnaghan_tait(dens[, rho0, P0, K, n])

Computes pressure using the Murnaghan-Tait equation of state.

power_law(dens[, rho0, P0, alpha])

Computes pressure using a power-law equation of state.

van_der_waals(dens[, M, T, a, b])

Computes pressure using the Van der Waals equation of state.

GaPFlow.models.pressure.bayada_chupin(dens, rho_l, rho_v, c_l, c_v)#

Computes pressure using the Bayada-Chupin cavitation model.

Models lubricated film pressure in the presence of phase change. Reference: Bayada, G., & Chupin, L. (2013). Journal of Tribology, 135(4), 041703.

Parameters:
  • dens (float or np.ndarray) – Current density.

  • rho_l (float) – Liquid density.

  • rho_v (float) – Vapor density.

  • c_l (float) – Speed of sound in liquid.

  • c_v (float) – Speed of sound in vapor.

Returns:

Computed pressure.

Return type:

float or np.ndarray

GaPFlow.models.pressure.bwr(dens, T, gamma=3.0)#

Computes pressure using the Benedict–Webb–Rubin (BWR) equation of state.

This complex EoS models real fluid behavior accurately over wide conditions. Reference: Benedict, M.; Webb, G. B.; Rubin, L. C. (1940), Journal of Chemical Physics, 8, 334–345

Parameters:
  • dens (float or np.ndarray) – Density.

  • T (float) – Temperature.

  • gamma (float, optional) – Exponential decay parameter (default is 3.0).

Returns:

Computed pressure.

Return type:

float or np.ndarray

GaPFlow.models.pressure.cubic(dens, a=15.2, b=-9.6, c=3.35, d=-0.07)#

Computes pressure using a general cubic polynomial fit.

\[P(\rho) = a \rho^3 + b \rho^2 + c \rho + d\]

Useful for empirical models where data fits a polynomial relationship.

Parameters:
  • dens (float or np.ndarray) – Density.

  • a (float) – Polynomial coefficients.

  • b (float) – Polynomial coefficients.

  • c (float) – Polynomial coefficients.

  • d (float) – Polynomial coefficients.

Returns:

Computed pressure.

Return type:

float or np.ndarray

GaPFlow.models.pressure.dowson_higginson(dens, rho0=877.7007, P0=101325.0, C1=350000000.0, C2=1.23)#

Computes pressure using the Dowson-Higginson isothermal equation of state.

\[P(\rho) = P_0 + \frac{C_1 (\rho/\rho_0 - 1)}{C_2 - \rho/\rho_0}\]

This equation is used to describe lubricant behavior under high-pressure conditions. Reference: Dowson, D., & Higginson, G. R. (1977). Elastohydrodynamic Lubrication.

Parameters:
  • dens (float or np.ndarray) – Current fluid density.

  • rho0 (float) – Reference density.

  • P0 (float) – Pressure at reference density.

  • C1 (float) – Empirical constant.

  • C2 (float) – Empirical constant limiting maximum density ratio.

Returns:

Computed pressure.

Return type:

float or np.ndarray

GaPFlow.models.pressure.eos_pressure(density, prop)#

Wrapper around all implemented equation of state models.

Parameters:
  • density (np.ndarray) – The mass density field

  • prop (dict) – Material properties

Returns:

Pressure field for the corresponding density field

Return type:

np.ndarray

GaPFlow.models.pressure.murnaghan_tait(dens, rho0=700, P0=101000.0, K=557000000.0, n=7.33)#

Computes pressure using the Murnaghan-Tait equation of state.

\[P(\rho) = \frac{K}{n} \left(\left(\frac{\rho}{\rho_0}\right)^n - 1\right) + P_0\]

Commonly used in compressible fluid and shock wave studies. Reference: Macdonald, J. R. (1966). Reviews of Modern Physics, 38, 669

Parameters:
  • dens (float or np.ndarray) – Current density.

  • rho0 (float) – Reference density.

  • P0 (float) – Reference pressure.

  • K (float) – Bulk modulus.

  • n (float) – Murnaghan exponent.

Returns:

Computed pressure.

Return type:

float or np.ndarray

GaPFlow.models.pressure.power_law(dens, rho0=1.1853, P0=101325.0, alpha=0.0)#

Computes pressure using a power-law equation of state.

\[P(\rho) = P_0 \left(\frac{\rho}{\rho_0}\right)^{1 / (1 - \frac{\alpha}{2})}\]

A generalization that includes ideal gas as a special case when alpha=0.

Parameters:
  • dens (float or np.ndarray) – Current density.

  • rho0 (float) – Reference density.

  • P0 (float) – Reference pressure.

  • alpha (float) – Power-law exponent parameter.

Returns:

Computed pressure.

Return type:

float or np.ndarray

GaPFlow.models.pressure.van_der_waals(dens, M=39.948, T=100.0, a=1.355, b=0.03201)#

Computes pressure using the Van der Waals equation of state.

\[P = \frac{RT \rho}{M - b \rho} - a \frac{\rho^2}{M^2}\]

Includes molecular interaction (a) and finite size (b) corrections to ideal gas law.

Parameters:
  • dens (float or np.ndarray) – Mass density (kg/m³).

  • M (float) – Molar mass (g/mol).

  • T (float) – Temperature (K).

  • a (float) – Attraction parameter (L^2 bar/mol^2).

  • b (float) – Repulsion parameter (L/mol).

Returns:

Computed pressure.

Return type:

float or np.ndarray