16#include <Loi_Etat_Binaire_GP_base.h>
17#include <Fluide_Dilatable_base.h>
18#include <Champ_Fonc_Tabule.h>
19#include <Champ_Uniforme.h>
43 param.lire_avec_accolades_depuis(is);
59 const DoubleTab& tab_Y1 = le_fluide->inco_chaleur().valeurs();
60 DoubleTab& tab_mu = le_fluide->viscosite_dynamique().valeurs();
62 int i, n=tab_mu.
size();
66 double m2om1 = 1./m1om2;
68 double mu2omu1 = 1./mu1omu2;
71 double a1 = 1. + sqrt(mu1omu2) * pow(mu2omu1,0.25);
72 double a2 = 1. + sqrt(mu2omu1) * pow(mu1omu2,0.25);
75 double b1 = sqrt(8.*(1.+m1om2));
76 double b2 = sqrt(8.*(1.+m2om1));
77 double phi_12 = m1om2*a1*a1/b1;
78 double phi_21 = m2om1*a2*a2/b2;
80 double y1 = tab_Y1(i,0);
83 tab_mu(i,0) = (
mu1_*y1)/(y1+y2*phi_12) + (
mu2_*y2)/(y2+y1*phi_21);
99 Cerr <<
"We should not have a dynamic viscosity of type Champ_Fonc_Tabule !" << finl;
107 Cerr <<
"We should not have a dynamic viscosity of type Champ_Uniforme !" << finl;
131 const Champ_base& rho = le_fluide->masse_volumique();
132 DoubleTab& tab_mu_sur_Sc = mu_sur_Sc.
valeurs();
133 const DoubleTab& tab_rho = rho.
valeurs();
134 const int n=tab_mu_sur_Sc.
size();
140 Cerr <<
"We should not have a density field of type Champ_Uniforme !" << finl;
144 for (
int i=0 ; i<n ; i++) tab_mu_sur_Sc(i,0) = tab_rho(i,0)*
diff_coeff_;
148 Cerr <<
"We should not have a mu_sur_Sc of type Champ_Uniforme !" << finl;
152 double temps_champ = rho.
temps();
170 DoubleTab& tab_nu_sur_Sc = nu_sur_Sc.
valeurs();
171 const int n=tab_nu_sur_Sc.
size();
173 for (
int i=0 ; i<n ; i++) tab_nu_sur_Sc(i,0) =
diff_coeff_;
175 double temps_champ = le_fluide->masse_volumique().temps();
194 return "Melange_Binaire";
210 Cerr <<
"We should not enter in the method Loi_Etat_Binaire_GP_base::inverser_Pth !" << finl;
211 Cerr <<
"This means that you are trying to solve an ODE for pth which is forbidden for this EOS!" << finl;
230 const double rh = PM2/(RT*mix);
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
Class Champ_Fonc_Tabule Derived class of Champ_Fonc_base representing.
virtual DoubleTab & valeurs()=0
class Champ_base This class is the base of the fields hierarchy.
virtual double changer_temps(const double t)
Sets the time at which the field is defined.
double temps() const
Returns the time of the field.
static void verifier(const char *const msg, double)
Class defining operators and methods for all reading operation in an input flow (file,...
Base state law class for binary ideal-gas mixtures, defining a dilatable binary fluid with the equati...
void calculer_masse_volumique() override=0
Recomputes the density (masse volumique).
void calculer_lambda() override
Computes the thermal conductivity.
void calculer_mu_sur_Sc() override
Computes the dynamic viscosity divided by the Schmidt number (rho*D).
void calculer_nu_sur_Sc() override
Computes the kinematic viscosity divided by the Schmidt number (D).
Loi_Etat_Binaire_GP_base()
void calculer_Cp() override
Computes Cp. Does nothing: Cp is constant.
const Nom type_fluide() const override
Returns the type of fluid associated.
void calculer_mu() override
Computes the dynamic viscosity.
void calculer_alpha() override
Computes the thermal diffusivity.
void calculer_mu_wilke()
Computes the mixture dynamic viscosity (depends on mass fractions). See Wilke https://aip.
double inverser_Pth(double, double) override
Computes the thermodynamic pressure from temperature and density.
State law class for a mixture of ideal gases.
static constexpr double R_GAS
class Nom: a character string for naming TRUST objects.
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void abort()
Abort routine for TRUST on a fatal error.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")