TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Terme_Source_Canal_perio.cpp
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#include <Terme_Source_Canal_perio.h>
17#include <Motcle.h>
18#include <Double.h>
19#include <Probleme_base.h>
20#include <communications.h>
21#include <Domaine_VF.h>
22#include <Domaine_Cl_dis_base.h>
23#include <Periodique.h>
24#include <Neumann_paroi.h>
25#include <Convection_Diffusion_std.h>
26#include <Fluide_Incompressible.h>
27#include <Operateur_Diff_base.h>
28#include <Navier_Stokes_std.h>
29#include <EFichier.h>
30#include <Param.h>
31
32Implemente_base_sans_constructeur_ni_destructeur(Terme_Source_Canal_perio,"Terme_Source_Canal_perio",Source_base);
33// XD canal_perio source_base canal_perio BRACE Momentum source term to maintain flow rate. The expression of the source
34// XD_CONT term is: NL2 S(t) = (2*(Q(0) - Q(t))-(Q(0)-Q(t-dt))/(coeff*dt*area) NL2 NL2 Where: NL2 coeff=damping
35// XD_CONT coefficient NL2 area=area of the periodic boundary NL2 Q(t)=flow rate at time t NL2 dt=time step NL2 NL2
36// XD_CONT Three files will be created during calculation on a datafile named DataFile.data. The first file contains the
37// XD_CONT flow rate evolution. The second file is useful for resuming a calculation with the flow rate of the previous
38// XD_CONT stopped calculation, and the last one contains the pressure gradient evolution: NL2
39// XD_CONT -DataFile_Channel_Flow_Rate_ProblemName_BoundaryName NL2
40// XD_CONT -DataFile_Channel_Flow_Rate_repr_ProblemName_BoundaryName NL2
41// XD_CONT -DataFile_Pressure_Gradient_ProblemName_BoundaryName
42
43Terme_Source_Canal_perio::Terme_Source_Canal_perio():
44 direction_ecoulement_(-1),
45 velocity_weighting_(0),
46 bord_periodique_(""),
47 surface_bord_(0.0),
48 h(0.0), coeff(0.0), u_etoile(0.0),
49 deb_(0.0),
50 source_(0.0),
51 debnm1_(0.0),
52 debit_ref_(0.0),
53 dernier_temps_calc_(-1.0), // why??
54 is_debit_impose_(0),
55 debit_impose_(0.0)
56{
57}
58
59Terme_Source_Canal_perio::~Terme_Source_Canal_perio()
60{}
61
63{
64 return s << que_suis_je() ;
65}
66
67//
68// //// readOn
69// //
70
72{
73 Param param(que_suis_je());
74 // Valeurs par defaut
75 u_etoile = 0.;
76 h = 1.;
77 coeff = 10.;
79 // FIN valeurs par defaut
80 dir_source_.resize(dimension);
82 set_param(param);
83 param.lire_avec_accolades_depuis(is);
84 return is;
85}
86
88{
89 param.ajouter_non_std("direction_ecoulement",(this));
90 param.ajouter("u_etoile",&u_etoile); // XD attr u_etoile floattant u_etoile OPT not_set
91 param.ajouter("coeff",&coeff); // XD attr coeff floattant coeff OPT Damping coefficient
92 // XD_CONT (optional, default value is 10).
93 param.ajouter("h",&h); // XD attr h floattant h OPT Half heigth of the channel.
94 param.ajouter("bord",&bord_periodique_); // XD attr bord chaine bord REQ The name of the (periodic)
95 // XD_CONT boundary normal to the flow direction.
96 param.ajouter_non_std("debit_impose",(this)); // XD attr debit_impose floattant debit_impose OPT Optional
97 // XD_CONT option to specify the aimed flow rate Q(0). If not used, Q(0) is computed by the code after the projection
98 // XD_CONT phase, where velocity initial conditions are slighlty changed to verify incompressibility.
99 param.ajouter_non_std("velocity_weighting",(this));
100}
101
104
106{
107 int retval = 1;
108
109 if (mot=="direction_ecoulement")
110 {
111 Cerr <<"The direction_ecoulement option is obsolete, you must now use the bord option to specify the boundary where periodicity is applied."<<finl;
113 }
114 else if (mot=="debit_impose")
115 {
116 is >> debit_impose_;
118 }
119 else if (mot=="velocity_weighting")
120 {
123 {
124 Cerr << "velocity_weighting value should be 0 or 1." << finl;
126 }
127 if (!sub_type(Convection_Diffusion_std,equation()))
128 {
129 Cerr << "velocity_weighting option is available only for a Canal_perio source term in the energy equation." << finl;
131 }
132 }
133 else retval = -1;
134
135 return retval;
136}
137
139{
141 if (sub_type(Convection_Diffusion_std,equation()))
142 {
143 set_fichier("Canal_perio");
144 set_description("Energy source term = Integral(P*dv) [W]");
145 }
146 int nb_bords = equation().domaine_dis().nb_front_Cl();
147 for (int n_bord=0; n_bord<nb_bords; n_bord++)
148 {
149 const Cond_lim& la_cl = equation().domaine_Cl_dis().les_conditions_limites(n_bord);
150 if (sub_type(Periodique,la_cl.valeur()))
151 {
152 const Periodique& perio = ref_cast(Periodique,la_cl.valeur());
153 const Front_VF& le_bord = ref_cast(Front_VF,la_cl->frontiere_dis());
154 if ( bord_periodique_ == le_bord.le_nom() ) // Le bord periodique est specifie
155 {
156 if (perio.est_periodique_selon_un_axe())
157 {
158 // Cas ou le bord est periodique selon un axe, alors on fixe la direction de l'ecoulement (VDF)
160 }
161 else
162 {
163 // Cas general ou le bord periodique n'est pas oriente selon un axe:
165 dir_source_ *= -1;
166 // On adimensionnalise:
167 double norme = norme_array(dir_source_);
168 dir_source_ /= norme;
169 }
170 // On recupere la surface
171 surface_bord_ = 0.5 * le_bord.frontiere().get_aire();
172 return;
173 }
174 }
175 }
176 Cerr << "********************************************************" << finl;
177 Cerr << "Error for the definition of the Canal_perio source term." << finl;
178 if (bord_periodique_=="")
179 {
180 Cerr << "It seems the channel is not parallel to an axis. Direction_ecoulement keyword is useless in this case." << finl;
181 Cerr << "So try to use the following syntax to specify the name of the periodic boundary:" << finl;
182 Cerr << "Canal_perio { bord name }" << finl;
183 }
184 else
185 {
186 Cerr << bord_periodique_ << " is not a boundary with a periodic boundary condition." << finl;
187 }
188 exit();
189}
190
191void Terme_Source_Canal_perio::write_flow_rate(const Nom& ext_nom_source_, double debit_e) const
192{
193 double tps = equation().schema_temps().temps_courant();
194 double tps_init = equation().schema_temps().temps_init();
195 double dt = equation().schema_temps().pas_de_temps();
196 int premiere_ecriture = (!equation().probleme().reprise_effectuee() && deb_==0 ? 1 : 0);
197
198 // Write the flow rate file if equation is Navier Stokes:
199 Nom filename(nom_du_cas());
200 filename+="_Channel_Flow_Rate_";
201 filename+=ext_nom_source_ ;
202 if (!flow_rate_file_.is_open())
203 {
204 flow_rate_file_.ouvrir(filename, (premiere_ecriture?ios::out:ios::app));
205 flow_rate_file_.setf(ios::scientific);
206 }
207 // on met des commentaires dans l'entete du fichier
208 if ((tps <= (tps_init+dt)) && premiere_ecriture)
209 {
210 if (equation().probleme().is_dilatable()==1)
211 flow_rate_file_ << "# Time t Flow rate Q(t) in [kg.s-1] if SI units used" << finl;
212 else
213 flow_rate_file_ << "# Time t Flow rate Q(t) in [m3.s-1] if SI units used" << finl;
214 }
215 flow_rate_file_ << tps+dt << " " << debit_e << finl;
216
217 if (deb_==0)
218 {
219 deb_ = 1;
220 debit_ref_ = debit_e;
224 source_ = 0.;
225
226 // Deplacer dans completer ?
227 // Read the restart file:
228 if (equation().probleme().reprise_effectuee())
229 {
230 Nom filename2(nom_du_cas());
231 filename2+="_Channel_Flow_Rate_repr_";
232 filename2+=ext_nom_source_ ;
233 EFichier fichier_reprise;
234 if (!fichier_reprise.ouvrir(filename2))
235 {
236 Cerr << "File " << filename2 << " not found !" << finl;
237 Cerr << "Since the 1.6.8 version, you absolutly need this file to restart the calculation." << finl;
238 Cerr << "Look for a file named *Channel_Flow_Rate_repr* and renamed it for example." << finl;
239 exit();
240 }
241 else
242 {
243 // Check header
244 Nom str;
245 fichier_reprise >> str;
246 if (str=="#")
247 {
248 // Read the whole line:
249 std::string line;
250 std::getline(fichier_reprise.get_ifstream(), line);
251 }
252 else
253 {
254 // Reopen:
255 fichier_reprise.ouvrir(filename);
256 }
257 // Read up to the time:
258 int time_found = 0;
259 while (!fichier_reprise.eof() && !time_found)
260 {
261 double temps_ecrit;
262 fichier_reprise >> temps_ecrit;
263 fichier_reprise >> debnm1_;
264 fichier_reprise >> debit_ref_;
265 fichier_reprise >> source_;
266 //std::getline(fichier_reprise.get_ifstream(), line);
267 if (est_egal(temps_ecrit,tps_init,1e-5))
268 {
269 Cerr << "Source canal_perio read values in the file " << filename << " for the time t= " << temps_ecrit << finl;
270 time_found = 1;
271 }
272 }
273 if (time_found==0)
274 {
275 Cerr << "Sorry, we didn't find the time " << tps_init << " in the file " << filename << finl;
276 Cerr << "We can't restart the calculation." << finl;
277 exit();
278 }
279 }
280 }
281 }
282}
283
285{
286 // On recupere flux_bords operateur de diffusion
287 const Operateur_base& op_base = equation().operateur(0).l_op_base(); // Diffusion operator
288 assert(sub_type(Operateur_Diff_base,op_base)); // Check
289 const DoubleTab& flux_bords = op_base.flux_bords();
290 // If flux_bords is not build (diffusion_implicit algorithm for example, we calculate it):
291 if (flux_bords.size()==0)
292 {
293 DoubleTab dummy(equation().inconnue().valeurs());
294 equation().operateur(0).ajouter(equation().inconnue(), dummy);
295 }
296 // Loop on boundaries to evaluate total heat flux:
297 double heat_flux=0;
298 int nb_bords = equation().domaine_dis().nb_front_Cl();
299 for (int n_bord=0; n_bord<nb_bords; n_bord++)
300 {
301 const Cond_lim& la_cl = equation().domaine_Cl_dis().les_conditions_limites(n_bord);
302 if (sub_type(Neumann_paroi,la_cl.valeur()))
303 {
304 // Loop on boundary faces with imposed flux condition (Neumann)
305 const Front_VF& frontiere_dis = ref_cast(Front_VF,la_cl->frontiere_dis());
306 int ndeb = frontiere_dis.num_premiere_face();
307 int nfin = ndeb + frontiere_dis.nb_faces();
308 for (int num_face=ndeb; num_face<nfin; num_face++)
309 heat_flux += flux_bords(num_face,0);
310 }
311 }
312 heat_flux=mp_sum(heat_flux);
313 return heat_flux;
314}
315
317{
318 // Compute heat_flux:
319 double heat_flux = compute_heat_flux();
320
321 const Domaine_VF& domaine_vf = ref_cast(Domaine_VF,equation().domaine_dis());
322 const double volume = domaine_vf.domaine().volume_total();
323 int size = domaine_vf.nb_faces();
324 ArrOfDouble s(size);
325 if (velocity_weighting_) // It seems this algorithm do not imply dT/dt -> 0
326 {
327 // Compute source term for Energy
328 // Expression from TU Delft Master Thesis
329 // Source = -u*Sum(imposed_heat_flux)/(Volume*Ubulk)
330 // Ubulk=FlowRate/Area(PeriodicBoundary)
331 // Loop on the faces
332 const DoubleTab& vitesse = ref_cast(Convection_Diffusion_std,equation()).vitesse_transportante().valeurs();
333 for (int num_face=0; num_face<size; num_face++)
334 {
335 double velocity = 0;
336 if (direction_ecoulement_>=0) // Ecoulement selon un axe
337 velocity = vitesse(num_face,direction_ecoulement_);
338 else // Cas general
339 for (int i=0; i<dimension; i++)
340 velocity += vitesse(num_face,i) * dir_source_[i];
341 s[num_face]=-velocity*heat_flux/(volume*debit_e/surface_bord_);
342 }
343 }
344 else
345 {
346 // Compute source term with
347 // Source = -Sum(imposed_heat_flux)/Volume
348 // Loop on the faces
349 for (int num_face=0; num_face<size; num_face++)
350 s[num_face]=-heat_flux/volume;
351 }
352 return s;
353}
354
355/*! @brief Term source calculation (called by VDF and VEF implementations) TODO: returning an ArrOfDouble is baaad.
356 *
357 */
359{
360 double tps = equation().schema_temps().temps_courant();
361 double tps_init = equation().schema_temps().temps_init();
362 double dt = equation().schema_temps().pas_de_temps();
363 int premiere_ecriture = (!equation().probleme().reprise_effectuee() && deb_==0 ? 1 : 0);
364 Nom ext_nom_source_ = equation().probleme().le_nom();
365 ext_nom_source_ += "_" ;
366 ext_nom_source_ += bord_periodique_ ;
367
368 // Pourquoi ?
369 if (est_different(dernier_temps_calc_,tps))
370 {
371 // Compte flow rate:
372 double debit_e= 0.;
373 calculer_debit(debit_e);
374
375 if (je_suis_maitre())
376 {
377 if (sub_type(Convection_Diffusion_std,equation()))
378 {
379 // Write nothing if equation is Energy
380 }
381 else
382 write_flow_rate(ext_nom_source_, debit_e);
383 }
384 if (sub_type(Convection_Diffusion_std,equation()))
385 {
386 if (equation().probleme().is_dilatable())
387 {
388 Cerr << "Source term not validated yet for Quasi Compressible formulation." << finl;
389 Cerr << "Contact TRUST support." << finl;
390 exit();
391 }
392 if(equation().schema_temps().pas_de_temps_locaux().size()>0)
393 {
394 Cerr << "Source term not validated yet for steady option for the Convection_Diffusion_std equation." << finl;
395 Cerr << "Contact TRUST support." << finl;
396 exit();
397 }
398 return source_convection_diffusion(debit_e);
399 }
400 else if (sub_type(Navier_Stokes_std,equation()))
401 {
402 // Compute source term for Navier Stokes
403
404 // Master process sends values to all processes:
405 envoyer_broadcast(debit_ref_, 0);
406 envoyer_broadcast(debnm1_, 0);
407 envoyer_broadcast(source_, 0);
408
409 // On conserve le test (avec dt_min) car appel a t=0 (dt=0) au cours de preparer calculer pour loi de paroi TBLE
410 double dt_min = equation().schema_temps().pas_temps_min();
411 const DoubleVect& dt_locaux = equation().schema_temps().pas_de_temps_locaux();
412 double si = 0;
413 if (sup_ou_egal(dt,dt_min))
414 {
415 // si = [ 2*(Q(0)-Q(t(n))) - (Q(0)-Q(t(n-1))) ] / [ coeff * dt * aire(bord) ]
416 if( dt_locaux.size()>0)
417 {
418 // Steady mode: dt varies per face. Use the mean of dt_locaux as representative
419 // time scale for the flow rate correction formula.
420 // At convergence (Q_n = Q_{n-1} = Q_ref), si = 0 regardless of dt_eff.
421 double local_sum = 0.;
422 for (int i = 0; i < dt_locaux.size(); i++) local_sum += dt_locaux[i];
423 double dt_eff = mp_sum(local_sum) / mp_sum((double)dt_locaux.size());
424 si = (2.*(debit_ref_-debit_e)-(debit_ref_-debnm1_))/(coeff*dt_eff*surface_bord_);
425 debnm1_ = debit_e;
426 }
427 else
428 {
429 si = (2.*(debit_ref_-debit_e)-(debit_ref_-debnm1_))/(coeff*dt*surface_bord_);
430 debnm1_ = debit_e;
431 }
432 }
433
434 source_ += si;
436
437 if (je_suis_maitre())
438 {
439 // Write the pressure gradient file if equation is Navier Stokes
440 Nom filename(nom_du_cas());
441 filename+="_Pressure_Gradient_";
442 filename+= ext_nom_source_ ;
443 if (!pressure_gradient_file_.is_open())
444 {
445 pressure_gradient_file_.ouvrir(filename, (premiere_ecriture?ios::out:ios::app));
446 pressure_gradient_file_.setf(ios::scientific);
447 }
448 if ((tps <= (tps_init+dt)) && premiere_ecriture)
449 {
450 if (equation().probleme().is_dilatable()==1)
451 pressure_gradient_file_ << "# Time t gradP(t) gradP(t)-gradP(t-dt) in [kg.s-2.m-2] if SI units used" << finl;
452 else
453 pressure_gradient_file_ << "# Time t gradP(t) gradP(t)-gradP(t-dt) in [m.s-2] if SI units used" << finl;
454 }
455 pressure_gradient_file_ << tps+dt << " " << source_ << " " << si << finl;
456
457 // Write the restart file:
458 filename=nom_du_cas();
459 filename+="_Channel_Flow_Rate_repr_";
460 filename+=ext_nom_source_;
461 if (!restart_file_.is_open())
462 {
463 restart_file_.ouvrir(filename, (premiere_ecriture?ios::out:ios::app));
464 restart_file_.setf(ios::scientific);
465 }
466 if ((tps <= (tps_init+dt)) && premiere_ecriture)
467 {
468 if (equation().probleme().is_dilatable()==1)
469 restart_file_ << "# Time t Flow rate Q(t) Flow rate Q(0) in [kg.s-1] gradP(t) in [kg.s-2.m-2] if SI units used" << finl;
470 else
471 restart_file_ << "# Time t Flow rate Q(t) Flow rate Q(0) in [m3.s-1] gradP(t) in [m.s-2] if SI units used" << finl;
472 }
473 restart_file_ << tps+dt << " " << debit_e << " " << debit_ref_ << " " << source_ << finl;
474 }
475 }
476 else
477 {
478 Cerr << "You can't use canal_perio on the equation " << equation().que_suis_je() << finl;
479 exit();
480 }
481 }
482 if (sub_type(Convection_Diffusion_std,equation()))
483 {
484 Cerr << "Error! Contact TRUST support." << finl;
485 exit();
486 }
487
488 // Essayer de virer direction_ecoulement_ (attention assert en VDF et ecarts possibles)
489 ArrOfDouble s;
490 s.resize(dimension);
491 s = 0.;
492 if (direction_ecoulement_>=0) // Ecoulement selon un axe
494 else // Cas general
495 for (int i=0; i<dimension; i++)
496 s[i] = source_ * dir_source_[i];
497 return s;
498}
499
500
501DoubleTab& Terme_Source_Canal_perio::calculer(DoubleTab& resu) const
502{
503 resu = 0;
504 return ajouter(resu);
505}
classe Cond_lim Classe generique servant a representer n'importe quelle classe
Definition Cond_lim.h:31
classe Convection_Diffusion_std Cette classe est la base des equations modelisant le transport
double volume_total() const
Definition Domaine.cpp:877
const Cond_lim & les_conditions_limites(int) const
Renvoie la i-ieme condition aux limites.
class Domaine_VF
Definition Domaine_VF.h:44
int nb_faces() const
renvoie le nombre global de faces.
Definition Domaine_VF.h:471
int nb_front_Cl() const
const Domaine & domaine() const
Fichier en lecture Cette classe est a la classe C++ ifstream ce que la classe Entree est a la.
Definition EFichier.h:29
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in)
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limite discretisee associee a l'equation.
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
Schema_Temps_base & schema_temps()
Renvoie le schema en temps associe a l'equation.
virtual const Operateur & operateur(int) const =0
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
class Front_VF
Definition Front_VF.h:36
int nb_faces() const
Definition Front_VF.h:53
int num_premiere_face() const
Definition Front_VF.h:63
const double & get_aire() const
Definition Frontiere.h:72
const Frontiere & frontiere() const
Renvoie la frontiere geometrique associee.
const Nom & le_nom() const override
Renvoie le nom de la frontiere geometrique.
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
classe Navier_Stokes_std Cette classe porte les termes de l'equation de la dynamique
Classe Neumann_paroi Cette condition limite correspond a un flux impose pour l'equation de.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:76
static int dimension
Definition Objet_U.h:99
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
static const Nom & nom_du_cas()
Renvoie une reference constante vers le nom du cas.
Definition Objet_U.cpp:146
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Operateur_Diff_base Cette classe est la base de la hierarchie des operateurs representant
classe Operateur_base Classe est la base de la hierarchie des objets representant un
DoubleTab & flux_bords()
virtual Operateur_base & l_op_base()=0
virtual DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const =0
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Definition Param.cpp:364
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
Definition Param.cpp:489
classe Periodique Cette classe represente une condition aux limites periodique.
Definition Periodique.h:31
int est_periodique_selon_un_axe() const
Definition Periodique.h:40
int direction_periodicite() const
const ArrOfDouble & direction_perio() const
Definition Periodique.h:38
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Definition Probleme_U.h:109
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
bool & reprise_effectuee()
static double mp_sum(double)
Calcule la somme de x sur tous les processeurs du groupe courant.
Definition Process.cpp:146
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
Definition Process.cpp:86
double temps_courant() const
Renvoie le temps courant.
double pas_temps_min() const
Renvoie le pas de temps minimum.
double pas_de_temps() const
Renvoie le pas de temps (delta_t) courant.
const DoubleTab & pas_de_temps_locaux() const
double temps_init() const
Renvoie le temps initial.
Classe de base des flux de sortie.
Definition Sortie.h:52
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42
void set_fichier(const Nom &)
void set_description(const Nom &nom)
Definition Source_base.h:83
virtual void completer()
Met a jour les references internes a l'objet Source_base.
virtual DoubleTab & ajouter(DoubleTab &) const
void resize(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTArray.h:156
_SIZE_ size() const
Definition TRUSTVect.tpp:45
Source term to keep a constant flow rate in a channel with periodic boundary conditions.
virtual void calculer_debit(double &) const =0
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void associer_pb(const Probleme_base &) override
void completer() override
Met a jour les references internes a l'objet Source_base.
DoubleTab & calculer(DoubleTab &resu) const override
virtual ArrOfDouble source_convection_diffusion(double debit_e) const
ArrOfDouble source() const
Term source calculation (called by VDF and VEF implementations) TODO: returning an ArrOfDouble is baa...
void set_param(Param &param) const override
void write_flow_rate(const Nom &ext_nom_source, double debit) const