Include dependency graph for cs_vof.h:Go to the source code of this file.
Classes | |
| struct | cs_vof_parameters_t |
| VOF model parameters. Void fraction variable tracks fluid 2. More... | |
| struct | cs_cavitation_parameters_t |
| Cavitation model parameters. More... | |
Macros | |
| #define | CS_VOF_ENABLED (1 << 0) |
| #define | CS_VOF_FREE_SURFACE (1 << 1) |
| #define | CS_VOF_MERKLE_MASS_TRANSFER (1 << 2) |
Enumerations | |
| enum | cs_vof_contact_angle_t { CS_VOF_CONTACT_ANGLE_OFF , CS_VOF_CONTACT_ANGLE_STATIC , CS_VOF_CONTACT_ANGLE_DYN , CS_VOF_N_CONTACT_ANGLE_TYPES } |
Functions | |
| cs_vof_parameters_t * | cs_get_glob_vof_parameters (void) |
| void | cs_vof_field_create (void) |
| Create VoF fields. More... | |
| void | cs_vof_log_setup (void) |
| Log setup of VoF model. More... | |
| void | cs_vof_compute_linear_rho_mu (const cs_mesh_t *m) |
| Compute the mixture density, mixture dynamic viscosity given fluid volume fractions and the reference density and dynamic viscosity | |
| void | cs_vof_update_phys_prop (const cs_mesh_t *m) |
| Compute the mixture density, mixture dynamic viscosity and mixture mass flux given the volumetric flux, the volume fraction and the reference density and dynamic viscosity | |
| void | cs_vof_surface_tension (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, cs_real_3_t stf[]) |
| Compute the surface tension momentum source term following the CSF model of Brackbill et al. (1992). More... | |
| void | cs_vof_log_mass_budget (const cs_mesh_t *m, const cs_mesh_quantities_t *mq) |
| Write in main log the global mixture mass budget: More... | |
| void | cs_vof_deshpande_drift_flux (const cs_mesh_t *m, const cs_mesh_quantities_t *mq) |
| Compute a relative velocity | |
| void | cs_vof_drift_term (int imrgra, int nswrgp, int imligp, int iwarnp, cs_real_t epsrgp, cs_real_t climgp, cs_real_t *pvar, const cs_real_t *pvara, cs_real_t *rhs) |
| void | cs_vof_solve_void_fraction (int iterns) |
| Solve the void fraction | |
| void | cs_vof_smoothe (const cs_mesh_t *m, const cs_mesh_quantities_t *mq, cs_field_bc_coeffs_t *bc_coeffs, cs_real_t *pvar) |
| cs_cavitation_parameters_t * | cs_get_glob_cavitation_parameters (void) |
| void | cs_cavitation_compute_source_term (const cs_real_t pressure[], const cs_real_t voidf[]) |
| Compute the vaporization source term | |
| void | cs_vof_contact_angle_set (const cs_vof_contact_angle_t choice) |
| Set the contact angle mode. More... | |
Variables | |
| const cs_vof_parameters_t * | cs_glob_vof_parameters |
| const cs_cavitation_parameters_t * | cs_glob_cavitation_parameters |
Compute the vaporization source term
using the Merkle model:
with
empirical constants,
a reference time scale and
the reference saturation pressure.
,
and
may be provided by the user (user function).
Note that the r.h.s. of the void fraction transport equation is
.
| [in] | pressure | Pressure array |
| [in] | voidf | Void fraction array |
| cs_cavitation_parameters_t * cs_get_glob_cavitation_parameters | ( | void | ) |
| cs_vof_parameters_t * cs_get_glob_vof_parameters | ( | void | ) |
| void cs_vof_compute_linear_rho_mu | ( | const cs_mesh_t * | m | ) |
Compute the mixture density, mixture dynamic viscosity given fluid volume fractions and the reference density and dynamic viscosity
(liquid),
(gas).
Computation is done as follows on cells:
A similar linear formula is followed on boundary using fluid volume fraction value on the boundary.
| [in] | m | pointer to mesh structure |
| void cs_vof_contact_angle_set | ( | const cs_vof_contact_angle_t | choice | ) |
Set the contact angle mode.
| [in] | choice | Contact angle model to set. |
| void cs_vof_deshpande_drift_flux | ( | const cs_mesh_t * | m, |
| const cs_mesh_quantities_t * | mq | ||
| ) |
Compute a relative velocity
directly at internal faces (drift flux), following the approach described by Suraj S. Deshpande et al 2012 Comput. Sci. Disc. 5 014016. It is activated with the option idrift = 1.
Using the notation:
The drift flux is computed as:
Where
is the drift flux factor defined with the variable cdrift,
the normal vector to the interface. The gradient is computed using a centered scheme:
| [in] | m | pointer to mesh structure |
| [in] | mq | pointer to mesh quantities structure |
| void cs_vof_drift_term | ( | int | imrgra, |
| int | nswrgp, | ||
| int | imligp, | ||
| int | iwarnp, | ||
| cs_real_t | epsrgp, | ||
| cs_real_t | climgp, | ||
| cs_real_t * | pvar, | ||
| const cs_real_t * | pvara, | ||
| cs_real_t * | rhs | ||
| ) |
| void cs_vof_field_create | ( | void | ) |
Create VoF fields.
| void cs_vof_log_mass_budget | ( | const cs_mesh_t * | m, |
| const cs_mesh_quantities_t * | mq | ||
| ) |
Write in main log the global mixture mass budget:
| [in] | m | pointer to mesh structure |
| [in] | mq | pointer to mesh quantities structure |
| void cs_vof_log_setup | ( | void | ) |
Log setup of VoF model.
| void cs_vof_smoothe | ( | const cs_mesh_t * | m, |
| const cs_mesh_quantities_t * | mq, | ||
| cs_field_bc_coeffs_t * | bc_coeffs, | ||
| cs_real_t * | pvar | ||
| ) |
| void cs_vof_solve_void_fraction | ( | int | iterns | ) |
Solve the void fraction
for the Volume of Fluid method (and hence for cavitating flows).
This function solves:
with
the eventual vaporization source term (Merkle model) in case the cavitation model is enabled,
the reference gas density and
the drift velocity for the compressed interface.
| [in] | iterns | Navier-Stokes iteration number |
| void cs_vof_surface_tension | ( | const cs_mesh_t * | m, |
| const cs_mesh_quantities_t * | mq, | ||
| cs_real_3_t | stf[] | ||
| ) |
Compute the surface tension momentum source term following the CSF model of Brackbill et al. (1992).
| [in] | m | pointer to mesh structure |
| [in] | mq | pointer to mesh quantities structure |
| [out] | stf | surface tension momentum source term |
| void cs_vof_update_phys_prop | ( | const cs_mesh_t * | m | ) |
Compute the mixture density, mixture dynamic viscosity and mixture mass flux given the volumetric flux, the volume fraction and the reference density and dynamic viscosity
(liquid),
(gas).
For the computation of mixture density, mixture dynamic viscosity, see cs_vof_compute_linear_rho_mu.
Computation of mass flux is as follows:
| [in] | m | pointer to mesh structure |
|
extern |
|
extern |