programmer's documentation
Functions/Subroutines | Variables
cavitation Module Reference

Functions/Subroutines

subroutine init_cavitation
 Default initialization of the module variables. More...
 
subroutine cavitation_compute_source_term (pressure, voidf)
 Compute the vaporization source term $ \Gamma_V \left(\alpha, p\right) = m^+ + m^- $ using the Merkle model:

\[ m^+ = -\dfrac{C_{prod} \rho_l \min \left( p-p_V,0 \right)\alpha(1-\alpha)} {0.5\rho_lu_\infty^2t_\infty}, \]

\[ m^- = -\dfrac{C_{dest} \rho_v \max \left( p-p_V,0 \right)\alpha(1-\alpha)} {0.5\rho_lu_\infty^2t_\infty}, \]

with $ C_{prod}, C_{dest} $ empirical constants, $ t_\infty=l_\infty/u_\infty $ a reference time scale and $p_V$ the reference saturation pressure. $ l_\infty $, $ u_\infty $ and $p_V$ may be provided by the user (user function). Note that the r.h.s. of the void fraction transport equation is $ \Gamma_V/\rho_v $. More...

 
subroutine cavitation_update_phys_prop (voidf, coavoi, cobvoi, ivoifl, bvoifl, crom, brom, viscl, imasfl, bmasfl)
 Compute the mixture density, mixture dynamic viscosity and mixture mass flux given the volumetric flux, the void fraction and the reference density and dynamic viscosity $ \rho_l, \mu_l $ (liquid), $ \rho_v, \mu_v $ (gas). One have:

\[ \rho_\celli = \alpha_\celli \rho_v + (1-\alpha_\celli) \rho_l, \]

\[ \mu_\celli = \alpha_\celli \mu_v + (1-\alpha_\celli) \mu_l, \]

\[ \left( \rho\vect{u}\cdot\vect{S} \right)_\ij = \\ \left\lbrace \begin{array}{ll} \rho_\celli (\vect{u}\cdot\vect{S})_\ij &\text{ if } (\vect{u}\cdot\vect{S})_\ij>0, \\ \rho_\cellj (\vect{u}\cdot\vect{S})_\ij &\text{ otherwise }, \end{array} \right. \]

\[ \left( \rho\vect{u}\cdot\vect{S} \right)_\ib = \\ \left\lbrace \begin{array}{ll} \rho_\celli (\vect{u}\cdot\vect{S})_\ib &\text{ if } (\vect{u}\cdot\vect{S})_\ib>0, \\ \rho_b (\vect{u}\cdot\vect{S})_\ib &\text{ otherwise }. \end{array} \right. \]

. More...

 
subroutine cavitation_correct_visc_turb (crom, voidf, visct)
 Modify eddy viscosity using the Reboud correction:

\[ \mu_t'= \dfrac{\rho_v + (1-\alpha)^{mcav}(\rho_l-\rho_v)}{\rho}\mu_t. \]

. More...

 
subroutine cavitation_print_mass_budget (crom, croma, dt, imasfl, bmasfl)
 Print the global mixture mass budget:

\[ \sum_i\left( |\Omega_i|\dfrac{\alpha_i^n - \alpha_i^{n-1}}{\Delta t} + \sum_{j\in\Face{\celli}}\left(\rho\vect{u}\vect{S}\right)_{ij}^n \right). \]

. More...

 

Variables

double precision, save rol
 reference density of the liquid phase in kg/m3 More...
 
double precision, save rov
 reference density of the gas phase in kg/m3 More...
 
double precision, save mul
 reference molecular viscosity of the liquid phase kg/(m s) More...
 
double precision, save muv
 reference molecular viscosity of the gas phase kg/(m s) More...
 
double precision, save presat
 reference saturation pressure in kg/(m s2) More...
 
double precision, save linf
 reference length scale of the flow in meters More...
 
double precision, save uinf
 reference velocity of the flow in m/s More...
 
double precision, save cprod
 constant Cprod of the vaporization source term (Merkle model) More...
 
double precision, save cdest
 constant Cdest of the condensation source term (Merkle model) More...
 
integer, save icvevm
 activation of the eddy-viscosity correction (Reboud correction) More...
 
double precision, save mcav
 constant mcav of the eddy-viscosity correction (Reboud correction) More...
 
integer, save itscvi
 implicitation in pressure of the vaporization/condensation model More...
 
double precision, save clvfmn
 clipping min. for the void fraction More...
 
double precision, save clvfmx
 clipping max. for the void fraction More...
 

Function/Subroutine Documentation

subroutine cavitation::cavitation_compute_source_term ( double precision, dimension(ncelet)  pressure,
double precision, dimension(ncelet)  voidf 
)

Compute the vaporization source term $ \Gamma_V \left(\alpha, p\right) = m^+ + m^- $ using the Merkle model:

\[ m^+ = -\dfrac{C_{prod} \rho_l \min \left( p-p_V,0 \right)\alpha(1-\alpha)} {0.5\rho_lu_\infty^2t_\infty}, \]

\[ m^- = -\dfrac{C_{dest} \rho_v \max \left( p-p_V,0 \right)\alpha(1-\alpha)} {0.5\rho_lu_\infty^2t_\infty}, \]

with $ C_{prod}, C_{dest} $ empirical constants, $ t_\infty=l_\infty/u_\infty $ a reference time scale and $p_V$ the reference saturation pressure. $ l_\infty $, $ u_\infty $ and $p_V$ may be provided by the user (user function). Note that the r.h.s. of the void fraction transport equation is $ \Gamma_V/\rho_v $.

Parameters
[in]pressurePressure array
[in]voidfVoid fraction array
subroutine cavitation::cavitation_correct_visc_turb ( double precision, dimension(ncelet)  crom,
double precision, dimension(ncelet)  voidf,
double precision, dimension(ncelet)  visct 
)

Modify eddy viscosity using the Reboud correction:

\[ \mu_t'= \dfrac{\rho_v + (1-\alpha)^{mcav}(\rho_l-\rho_v)}{\rho}\mu_t. \]

.

Parameters
[in]cromDensity array
[in]voidfVoid fraction array
[in,out]visctTurbulent viscosity array
subroutine cavitation::cavitation_print_mass_budget ( double precision, dimension(ncelet)  crom,
double precision, dimension(ncelet)  croma,
double precision, dimension(ncelet)  dt,
double precision, dimension(nfac)  imasfl,
double precision, dimension(nfabor)  bmasfl 
)

Print the global mixture mass budget:

\[ \sum_i\left( |\Omega_i|\dfrac{\alpha_i^n - \alpha_i^{n-1}}{\Delta t} + \sum_{j\in\Face{\celli}}\left(\rho\vect{u}\vect{S}\right)_{ij}^n \right). \]

.

Parameters
[in]cromDensity at cell center array at current time step
[in]cromaDensity at cell center array at previous time step
[in]dtTime step
[in]imasflMass flux at internal faces array
[in]bmasflMass flux at internal boundary faces array
subroutine cavitation::cavitation_update_phys_prop ( double precision, dimension(ncelet)  voidf,
double precision, dimension(nfabor)  coavoi,
double precision, dimension(nfabor)  cobvoi,
double precision, dimension(nfac)  ivoifl,
double precision, dimension(nfabor)  bvoifl,
double precision, dimension(ncelet)  crom,
double precision, dimension(nfabor)  brom,
double precision, dimension(ncelet)  viscl,
double precision, dimension(nfac)  imasfl,
double precision, dimension(nfabor)  bmasfl 
)

Compute the mixture density, mixture dynamic viscosity and mixture mass flux given the volumetric flux, the void fraction and the reference density and dynamic viscosity $ \rho_l, \mu_l $ (liquid), $ \rho_v, \mu_v $ (gas). One have:

\[ \rho_\celli = \alpha_\celli \rho_v + (1-\alpha_\celli) \rho_l, \]

\[ \mu_\celli = \alpha_\celli \mu_v + (1-\alpha_\celli) \mu_l, \]

\[ \left( \rho\vect{u}\cdot\vect{S} \right)_\ij = \\ \left\lbrace \begin{array}{ll} \rho_\celli (\vect{u}\cdot\vect{S})_\ij &\text{ if } (\vect{u}\cdot\vect{S})_\ij>0, \\ \rho_\cellj (\vect{u}\cdot\vect{S})_\ij &\text{ otherwise }, \end{array} \right. \]

\[ \left( \rho\vect{u}\cdot\vect{S} \right)_\ib = \\ \left\lbrace \begin{array}{ll} \rho_\celli (\vect{u}\cdot\vect{S})_\ib &\text{ if } (\vect{u}\cdot\vect{S})_\ib>0, \\ \rho_b (\vect{u}\cdot\vect{S})_\ib &\text{ otherwise }. \end{array} \right. \]

.

Parameters
[in]voidfVoid fraction array
[in]coavoiVoid fraction boundary coefficient array
[in]cobvoiVoid fraction boundary coefficient array
[in]ivoiflVolumetric flux at internal faces array
[in]bvoiflVolumetric flux at boundary faces array
[out]cromDensity at cell center array
[out]bromDensity at boudary faces array
[out]visclDynamic viscosity array
[out]imasflMass flux at internal faces array
[out]bmasflMass flux at internal boundary faces array
subroutine cavitation::init_cavitation ( )

Default initialization of the module variables.