16#include <Variation_rho_PolyMAC_MPFA.h>
17#include <Domaine_PolyMAC_MPFA.h>
18#include <Pb_Multiphase.h>
19#include <Champ_Elem_PolyMAC_MPFA.h>
20#include <Matrix_tools.h>
21#include <Array_tools.h>
47 for (
auto &&n_m : matrices)
48 if (n_m.first ==
"interfacial_area" || n_m.first ==
"temperature" || n_m.first ==
"pression")
55 if (n_m.first ==
"interfacial_area" || n_m.first ==
"temperature")
56 for (
int e = 0; e < ne; e++)
57 for (
int n = 0; n < N; n++)
60 if (n_m.first ==
"pression" )
61 for (
int e = 0; e < ne; e++)
62 for (
int n = 0, m = 0; n < N; n++, m+=(M>1))
82 const DoubleTab& rho = (*pch_rho).valeurs();
83 const DoubleTab& rho_p = (*pch_rho).passe();
84 const DoubleTab& dP_rho = pch_rho->
derivees().at(
"pression");
85 const DoubleTab& dT_rho = pch_rho->
derivees().at(
"temperature");
90 Matrice_Morse *Mp = matrices.count(
"pression") ? matrices.at(
"pression") :
nullptr,
91 *Mt = matrices.count(
"temperature") ? matrices.at(
"temperature") :
nullptr,
92 *Mai = matrices.count(
"interfacial_area") ? matrices.at(
"interfacial_area") :
nullptr;
96 for (
int e = 0; e < domaine.nb_elem(); e++)
97 for (
int k = 0; k < N; k++)
100 const double fac = 2./3.*1/pas_tps * pe(e) * ve(e) ;
101 secmem(e , k) += fac * inco(e, k) * (1 - rho_p(e, k)/rho(e, k));
102 if (Mp) (*Mp)(N * e + k , e) -= fac * inco(e, k) * rho_p(e, k) * -dP_rho(e, k)/(rho(e, k)*rho(e, k));
103 if (Mt) (*Mt)(N * e + k , N * e + k) -= fac * inco(e, k) * rho_p(e, k) * -dT_rho(e, k)/(rho(e, k)*rho(e, k));
104 if (Mai)(*Mai)(N * e + k, N * e + k) -= fac * ( 1 - rho_p(e, k)/rho(e, k));
DoubleTab & valeurs() override
Returns the array of field values at the current time.
const tabs_t & derivees() const
virtual DoubleTab & valeurs()=0
class Champ_base This class is the base of the fields hierarchy.
Class defining operators and methods for all reading operation in an input flow (file,...
virtual const Milieu_base & milieu() const =0
virtual const Champ_Inc_base & inconnue() const =0
Probleme_base & probleme()
Returns the problem associated with the equation.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
int nb_colonnes() const override
Return local number of columns (=size on the current proc).
DoubleVect & porosite_elem()
virtual const Champ_base & masse_volumique() const
Returns the mass density of the medium (const version).
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
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.
Multiphase thermohydraulics problem of type "3*N equations":
const Champ_base & get_champ(const Motcle &nom) const override
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
double pas_de_temps() const
Returns the current time step (delta_t).
Base class for output streams.
Source_base A Source_base object is a term appearing on the right-hand side of an.
_SIZE_ dimension_tot(int) const override
void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const override
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={}) const override