My Project
programmer's documentation
Functions | Variables
cs_hgn_phase_thermo.c File Reference

Phase thermodynamic for compressible homogeneous two-phase model. More...

#include "cs_defs.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <bft_error.h>
#include <bft_mem.h>
#include <bft_printf.h>
#include "cs_cf_thermo.h"
#include "cs_hgn_phase_thermo.h"
Include dependency graph for cs_hgn_phase_thermo.c:

Functions

void cs_hgn_thermo_define_stiffened_gas (int iph, cs_real_t cv, cs_real_t gamma, cs_real_t pinf, cs_real_t qprim, cs_real_t q)
 Define stiffened gas parameters for phase iph. More...
 
cs_real_t cs_hgn_phase_thermo_entropy_ve (cs_real_t vol, cs_real_t energ, int iph)
 Computation of the entropy (in J/kg/K) of phase iph (0 or 1). More...
 
cs_real_t cs_hgn_phase_thermo_temperature_ve (cs_real_t vol, cs_real_t energ, int iph)
 Computation of the temperature (in K) of phase iph. More...
 
cs_real_t cs_hgn_phase_thermo_pressure_ve (cs_real_t vol, cs_real_t energ, int iph)
 Computation of the pressure (in Pa) of phase iph. More...
 
cs_real_t cs_hgn_phase_thermo_internal_energy_tp (cs_real_t T, cs_real_t P, int iph)
 Computation of internal energy (in J/kg) of phase iph in plane (T,P). More...
 
cs_real_t cs_hgn_phase_thermo_specific_volume_tp (cs_real_t T, cs_real_t P, int iph)
 Computation of specific volume (in m^3/kg) of phase iph in plane (T,P). More...
 
cs_real_t cs_hgn_phase_thermo_entropy_tp (cs_real_t T, cs_real_t P, int iph)
 Computation of specific entropy (in J/kg/K) of phase iph in plane (T,P). More...
 
cs_real_t cs_hgn_phase_thermo_internal_energy_sv (cs_real_t s, cs_real_t v, int iph)
 Computation of internal energy (in J/kg) of phase iph in plane (s,v). More...
 

Variables

static cs_stiffened_gas_t _stiffened_gas [2]
 

Detailed Description

Phase thermodynamic for compressible homogeneous two-phase model.

Wrappers of thermodynamic relation function are implemented here.

Function Documentation

◆ cs_hgn_phase_thermo_entropy_tp()

cs_real_t cs_hgn_phase_thermo_entropy_tp ( cs_real_t  T,
cs_real_t  P,
int  iph 
)

Computation of specific entropy (in J/kg/K) of phase iph in plane (T,P).

Computation of entropy of phase iph in plane (T,P).

   This function returns the specific entropy of phase iph with respect
   to the temperature of phase iph and to the pressure energy of phase iph.
Parameters
[in]Ttemperature (in K)
[in]Ppressure (in Pa)
[in]iphindex of phase

◆ cs_hgn_phase_thermo_entropy_ve()

cs_real_t cs_hgn_phase_thermo_entropy_ve ( cs_real_t  vol,
cs_real_t  energ,
int  iph 
)

Computation of the entropy (in J/kg/K) of phase iph (0 or 1).

Computation of the entropy of phase iph (0 or 1).

   This function returns the entropy of phase iph with respect to the
   specific volume of phase iph and to the specific energy of phase iph.
Parameters
[in]volspecific volume of phase iph (in m^3/kg)
[in]energspecific energy of phase iph (in J/kg)
[in]iphindex of phase

◆ cs_hgn_phase_thermo_internal_energy_sv()

cs_real_t cs_hgn_phase_thermo_internal_energy_sv ( cs_real_t  s,
cs_real_t  v,
int  iph 
)

Computation of internal energy (in J/kg) of phase iph in plane (s,v).

Computation of internal energy of phase iph in plane (s,v).

   This function returns the internal energy of phase iph with respect
   to the specific entropy of phase iph and to the specific volume of
   phase iph.
Parameters
[in]sspecific entropy (in J/kg/K)
[in]vspecific volume (in m^3/kg)
[in]iphindex of phase

◆ cs_hgn_phase_thermo_internal_energy_tp()

cs_real_t cs_hgn_phase_thermo_internal_energy_tp ( cs_real_t  T,
cs_real_t  P,
int  iph 
)

Computation of internal energy (in J/kg) of phase iph in plane (T,P).

Computation of internal energy of phase iph in plane (T,P).

   This function returns the internal energy of phase iph with respect
   to the temperature of phase iph and to the pressure energy of phase iph.
Parameters
[in]Ttemperature (in K)
[in]Ppressure (in Pa)
[in]iphindex of phase

◆ cs_hgn_phase_thermo_pressure_ve()

cs_real_t cs_hgn_phase_thermo_pressure_ve ( cs_real_t  vol,
cs_real_t  energ,
int  iph 
)

Computation of the pressure (in Pa) of phase iph.

Computation of the pressure of phase iph.

   This function returns the pressure of phase iph with respect to the
   specific volume of phase iph and to the specific energy of phase iph.
Parameters
[in]volthe specific volume of phase iph (in m^3/kg)
[in]energthe specific energy of phase iph (in J/kg)
[in]iphindex of phase

◆ cs_hgn_phase_thermo_specific_volume_tp()

cs_real_t cs_hgn_phase_thermo_specific_volume_tp ( cs_real_t  T,
cs_real_t  P,
int  iph 
)

Computation of specific volume (in m^3/kg) of phase iph in plane (T,P).

Computation of specific volume of phase iph in plane (T,P).

   This function returns the specific volume of phase iph with respect
   to the temperature of phase iph and to the pressure energy of phase iph.
Parameters
[in]Ttemperature (in K)
[in]Ppressure (in Pa)
[in]iphindex of phase

◆ cs_hgn_phase_thermo_temperature_ve()

cs_real_t cs_hgn_phase_thermo_temperature_ve ( cs_real_t  vol,
cs_real_t  energ,
int  iph 
)

Computation of the temperature (in K) of phase iph.

Computation of the temperature of phase iph.

   This function returns the temperature of phase iph with respect to the
   specific volume of phase iph and to the specific energy of phase iph.
Parameters
[in]volthe specific volume of phase iph (in m^3/kg)
[in]energthe specific energy of phase iph (in J/kg)
[in]iphindex of phase

◆ cs_hgn_thermo_define_stiffened_gas()

void cs_hgn_thermo_define_stiffened_gas ( int  iph,
cs_real_t  cv,
cs_real_t  gamma,
cs_real_t  pinf,
cs_real_t  qprim,
cs_real_t  q 
)

Define stiffened gas parameters for phase iph.

(DOXYGEN_SHOULD_SKIP_THIS)

Parameters
[in]iphindex of phase (0 or 1)
[in]cvheat capacity (in J/kg/K)
[in]gammapolytropic coefficient (-)
[in]pinfminimum pressure (in Pa)
[in]qprimentropy parameter (in J/kg/K)
[in]qreference for specific enthalpy (in J/kg)

Variable Documentation

◆ _stiffened_gas

cs_stiffened_gas_t _stiffened_gas[2]
static
Initial value:
= {
{
.cv = -1.,
.gamma = -1.,
.pinf = -1.,
.qprim = 0.,
.q = 0.
},
{
.cv = -1.,
.gamma = -1.,
.pinf = -1.,
.qprim = 0.,
.q = 0.
}
}

(DOXYGEN_SHOULD_SKIP_THIS)