16#include <Echange_contact_VDF_FT_Disc.h>
18#include <Champ_front_calc.h>
19#include <Probleme_base.h>
20#include <Champ_Uniforme.h>
21#include <Schema_Temps_base.h>
22#include <Milieu_base.h>
23#include <Modele_turbulence_scal_base.h>
24#include <Domaine_VDF.h>
25#include <Equation_base.h>
26#include <Conduction.h>
28#include <Probleme_FT_Disc_gen.h>
29#include <Triple_Line_Model_FT_Disc.h>
30#include <Domaine_VF.h>
52 Cerr<<
"Lecture des parametres du contact (Echange_contact_VDF_FT_Disc::readOn)"<<finl;
53 Param param(
"Echange_contact_VDF_FT_Disc::readOn");
62 param.ajouter(
"Ri_liq",&
Ri_);
67 param.lire_avec_accolades(s);
73 T_autre_pb_.typer(
"Champ_front_calc");
76 le_champ_front.typer(
"Ch_front_var_instationnaire_dep");
88 indicatrice_->mettre_a_jour(temps);
90 const DoubleTab& I = indicatrice_->valeurs_au_temps(temps);
102 DoubleTab& mon_h= h_imp_->valeurs();
110 DoubleTab& mon_Tex=
T_ext(). valeurs();
117 DoubleTab& mon_Ti= Ti_wall_-> valeurs();
118 DoubleTab Twalltmp(mon_Ti);
124 for (
int ii=0; ii<taille; ii++)
125 for (
int jj=0; jj<nb_comp; jj++)
129 mon_h(ii,jj)=1./(1./
autre_h(ii,jj)+1./mon_h(ii,jj));
130 mon_Ti(ii, jj) = Twalltmp(ii, jj);
139 mon_Ti(ii, jj) = Twalltmp(ii, jj);
144 Nom nom_pb=mon_dom_cl_dis->equation().probleme().
le_nom();
152 if (pbft-> tcl().is_activated())
156 DoubleTab& mon_phi =
phi_ext_-> valeurs();
164 const ArrOfDouble& Q_from_CL = tcl->
Q();
165 const ArrOfInt& faces_with_CL_contrib = tcl-> boundary_faces();
169 const int nb_contact_line_contribution = faces_with_CL_contrib.
size_array();
172 for (
int jj = 0; jj < nb_comp; jj++)
179 for (
int idx = 0; idx < nb_contact_line_contribution; idx++)
181 const int facei = faces_with_CL_contrib[idx];
182 bool Not_find_ =
true;
185 for (ii=0; ii<taille; ii++)
195 const double sign = (face_voisins (facei, 0) == -1) ? -1. : 1.;
196 const double TCL_wall_flux = Q_from_CL[idx] / surface (facei);
197 const double val = -sign * TCL_wall_flux;
200 mon_phi(ii, jj) += val;
202 Process::exit(
Nom(
"Echange_contact_VDF_FT_Disc : missing element corresponding") +
Nom(facei) +
" ! Check all faces number in TCL are at BC?" );
206 for (
int ii=0; ii<taille; ii++)
208 if (!est_egal(mon_phi(ii, jj), 0.))
222 Ti_wall_->mettre_a_jour(temps);
231 ready_inject =
false;
235 for (
int ii = 0; ii < taille; ii++)
246 double sum_surface = 0;
248 for (
int ii = 0; ii < taille; ii++)
254 sum_surface += surface (face);
255 sum_T += surface (face) * mon_Ti (ii, 0);
262 sum_T = (sum_surface > DMINFLOAT) ? sum_T / sum_surface : 0;
264 ready_inject = (sum_T >= pbft->
tcl ().tempC_tcl ()) ? true :
false;
276 indicatrice_.typer(
"Champ_front_calc");
280 Nom nom_pb = mon_dom_cl_dis->equation ().probleme ().
le_nom ();
313 derivee_phi_ext_.typer (
"Champ_front_fonc");
314 derivee_phi_ext_->fixer_nb_comp (1);
316 derivee_phi_ext_->valeurs ().resize (nb_faces_raccord1, 1);
318 phi_ext_.typer (
"Champ_front_fonc");
321 phi_ext_->valeurs ().resize (nb_faces_raccord1, 1);
326 Ti_wall_.typer (
"Champ_front_fonc");
327 Ti_wall_->fixer_nb_comp (1);
329 Ti_wall_->valeurs().resize (nb_faces_raccord1, 1);
342 indicatrice_->changer_temps_futur(temps,i);
352 ok = ok && indicatrice_->avancer(temps);
353 ok = ok && Ti_wall_ ->
avancer(temps);
363 ok = ok && indicatrice_->reculer(temps);
364 ok = ok && Ti_wall_ ->
reculer(temps);
375 DoubleTab& mon_Ti = Ti_wall_->valeurs ();
377 int is_pb_fluide = 0;
378 DoubleTab mon_h (mon_Ti);
379 DoubleTab mautre_h (mon_Ti);
387 DoubleTab Twalltmp (mon_Ti);
397 for (
int ii = 0; ii < taille; ii++)
399 double tempValue = Twalltmp(ii);
406 mon_Ti(ii, 0) = tempValue;
417 Ti_wall_->set_temps_defaut(temps);
419 indicatrice_->set_temps_defaut(temps);
425 if (Ti_wall_->valeurs().size() == 1)
426 return Ti_wall_->valeurs()(0, 0);
427 else if (Ti_wall_->valeurs().dimension(1) == 1)
428 return Ti_wall_->valeurs()(i, 0);
430 Cerr <<
"Echange_contact_VDF_FT_Disc::Ti_wall_ erreur" << finl;
virtual void associer_fr_dis_base(const Frontiere_dis_base &)
Associates a discretized boundary with the field.
virtual DoubleTab & valeurs() override
Returns the array of field values.
virtual void mettre_a_jour(double temps)
DOES NOTHING, to override.
class Champ_front_calc Derived class of Champ_front_var representing
void creer(const Nom &, const Nom &, const Motcle &)
Create the Champ_front_calc object representing the trace of an unknown field on a boundary from name...
int initialiser(double, const Champ_Inc_base &) override
Initialization at the beginning of calculation.
const Milieu_base & milieu() const
Returns the medium associated with the equation carrying the unknown field whose trace is taken.
void fixer_nb_valeurs_temporelles(int nb_cases) override
Overrides Champ_front_base::fixer_nb_valeurs_temporelles.
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
std::vector< Motcle > app_domains
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
Class Conduction: represents the temperature evolution equation.
virtual const DoubleVect & face_surfaces() const
double xv(int num_face, int k) const
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
void set_temps_defaut(double temps) override
Changes the i-th future time of the BC.
void mettre_a_jour(double temps) override
Performs a time update of the boundary condition.
void fixer_nb_valeurs_temporelles(int nb_cases) override
Called by Conds_lim::completer. Calls cha_front_base::fixer_nb_valeurs_temporelles.
virtual Champ_front_base & T_ext()
Returns the T_ext field of temperature imposed at the boundary.
Class defining operators and methods for all reading operation in an input flow (file,...
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual void fixer_nb_comp(int i)
Sets the number of components of the field.
virtual int nb_comp() const
int_t num_premiere_face() const
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
int_t nb_faces() const
Returns the number of faces of the boundary.
const Frontiere & frontiere() const
Returns the associated geometric boundary.
static Objet_U & objet(const Nom &)
See Interprete_bloc::objet_global(). BM: the Interprete class is not the best place for this.
Milieu_base This class is the base of the (physical) medium hierarchy.
virtual const Champ_Don_base & conductivite() const
Returns the conductivity of the medium (const version).
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.
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.
const Triple_Line_Model_FT_Disc & tcl() const
class Probleme_base It is a Probleme_U that is not a coupling.
static double mp_max(double)
static double mp_sum(double)
Computes the sum of x over all processors in the current group.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
virtual int nb_valeurs_temporelles() const =0
Base class for output streams.
_SIZE_ size_array() const
_SIZE_ dimension(int d) const
virtual void detach_vect()
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
bool reinjection_tcl() const
bool ready_inject_tcl() const
bool is_activated() const
const double & Rc_inject() const