16#include <Terme_Puissance_Thermique_Echange_Impose_VEF_Face.h>
17#include <Fluide_Incompressible.h>
18#include <Discretisation_base.h>
19#include <Probleme_base.h>
20#include <Domaine_VEF.h>
21#include <Champ_P1NC.h>
36 param.lire_avec_accolades_depuis(s);
37 set_fichier(
"Terme_Puissance_Thermique_Echange_Impose");
44 int nb_faces = le_dom_VEF->nb_faces();
46 const IntTab& face_voisins = domaine.face_voisins();
47 const DoubleVect& volumes_entrelaces = domaine.volumes_entrelaces();
48 const DoubleTab& himp = himp_->valeurs();
49 const DoubleTab& Text =
Text_->valeurs();
51 const DoubleVect& volumes_elements = domaine.volumes();
55 for (
int num_face = 0; num_face < nb_faces; num_face++)
57 const double vol = volumes_entrelaces(num_face);
60 const int elem0 = face_voisins(num_face,0);
61 const int elem1 = face_voisins(num_face,1);
62 double h0 = 0, h1 = 0, text0 = 0, text1 = 0, vol0 = 0, vol1 = 0;
67 vol0 = volumes_elements(elem0);
73 vol1 = volumes_elements(elem1);
75 double hm = (h0 * vol0 + h1 * vol1) / (vol0 + vol1);
76 double htextm = (h0 * text0 * vol0 + h1 * text1 * vol1) / (vol0 + vol1);
78 double c = (domaine.faces_doubles()[num_face]==1) ? 0.5 : 1 ;
79 bilan()(0) -= c * (hm*T(num_face)-htextm) * vol;
82 himp_->mettre_a_jour(temps);
83 Text_->mettre_a_jour(temps);
89 Cerr <<
" Terme_Puissance_Thermique_Echange_Impose_VEF_Face::associer_domaines " << finl ;
97 int nb_faces=le_dom_VEF->nb_faces();
98 const Domaine_VF& domaine = le_dom_VEF.valeur();
100 const DoubleVect& volumes_entrelaces = domaine.volumes_entrelaces();
101 const DoubleTab& himp = himp_->valeurs();
102 const DoubleTab& Text =
Text_->valeurs();
105 const DoubleVect& volumes_elements = domaine.volumes();
107 for (
int num_face=0; num_face<nb_faces; num_face++)
109 const double vol = volumes_entrelaces(num_face);
112 const int elem0 = face_voisins(num_face,0);
113 const int elem1 = face_voisins(num_face,1);
114 double h0 = 0, h1 = 0, text0=0, text1=0,vol0 = 0, vol1 = 0;
119 vol0 = volumes_elements(elem0);
125 vol1 = volumes_elements(elem1);
127 double hm = (h0 * vol0 + h1 * vol1) / (vol0 + vol1);
128 double htextm = (h0 * text0 * vol0 + h1 * text1 * vol1) / (vol0 + vol1);
130 resu(num_face) -= (hm*T(num_face)-htextm) * vol;
147 int nb_faces=le_dom_VEF->nb_faces();
148 const Domaine_VF& domaine = le_dom_VEF.valeur();
150 const DoubleVect& volumes_entrelaces = domaine.volumes_entrelaces();
151 const DoubleTab& himp = himp_->valeurs();
154 const DoubleVect& volumes_elements = domaine.volumes();
159 for (
int num_face=0; num_face<nb_faces; num_face++)
161 const double vol = volumes_entrelaces(num_face);
164 const int elem0 = face_voisins(num_face,0);
165 const int elem1 = face_voisins(num_face,1);
166 double h0 = 0, h1 = 0,vol0 = 0, vol1 = 0;
171 vol0 = volumes_elements(elem0);
177 vol1 = volumes_elements(elem1);
179 double hm = (h0 * vol0 + h1 * vol1) / (vol0 + vol1);
182 matrice(num_face,num_face) += hm* vol;
191 Nom nom_Text =
Text_->le_nom() !=
"??" ?
Text_->le_nom() :
"Text";
193 himp_->initialiser(temps);
194 Text_->initialiser(temps);
DoubleTab & valeurs() override
Returns the array of field values at the current time.
void nommer_completer_champ_physique(const Domaine_dis_base &domaine_vdf, const Nom &nom_champ, const Nom &unite, Champ_base &champ, const Probleme_base &pbi) const
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
virtual const Champ_Inc_base & inconnue() const =0
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
class Nom: a character string for naming TRUST objects.
const Nom & le_nom() const override
Returns *this.
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.
Base class for output streams.
Source_base A Source_base object is a term appearing on the right-hand side of an.
void set_fichier(const Nom &)
virtual int initialiser(double temps)
Unlike the mettre_a_jour methods, the initializer methods of sources cannot depend on the outside.
void set_description(const Nom &nom)
_SIZE_ dimension(int d) const
class Terme_Puissance_Thermique_Echange_Impose_VEF_Face
void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &) override
DoubleTab & calculer(DoubleTab &) const override
void mettre_a_jour(double) override
DOES NOTHING - to override in derived classes.
int initialiser(double temps) override
Unlike the mettre_a_jour methods, the initializer methods of sources cannot depend on the outside.
DoubleTab & ajouter(DoubleTab &) const override
void contribuer_a_avec(const DoubleTab &, Matrice_Morse &) const override
contribution to the implicit matrix of source terms, by default no contribution