TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Paroi_ODVM_scal_VDF.cpp
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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
17#include <Paroi_ODVM_scal_VDF.h>
18#include <ParoiVDF_TBLE.h>
19#include <Paroi_std_hyd_VDF.h>
20#include <Domaine_Cl_VDF.h>
21#include <Dirichlet_paroi_fixe.h>
22#include <Echange_externe_impose.h>
23#include <Champ_Uniforme.h>
24#include <Champ_front_calc.h>
25#include <Convection_Diffusion_Temperature.h>
26#include <Convection_Diffusion_Concentration.h>
27#include <Modele_turbulence_scal_base.h>
28#include <Constituant.h>
29#include <Fluide_base.h>
30#include <EFichier.h>
31#include <Modele_turbulence_hyd_base.h>
32#include <Probleme_base.h>
33#include <Echange_contact_VDF.h>
34#include <SFichier.h>
35
36Implemente_instanciable_sans_constructeur(Paroi_ODVM_scal_VDF,"loi_ODVM_VDF",Paroi_scal_hyd_base_VDF);
37
38// printOn()
39/////
40
42{
43 return os << que_suis_je() << " " << le_nom();
44}
45
46//// readOn
47//
48
50{
51
52 Motcle mot_lu;
53
54 // Valeurs par defaut
55 N= 10;
56 facteur = 1;
57 gamma = 1.;
58 stats = 0;
59 temps_deb_stats = 0.;
61 compt = 1;
62 check = 0;
63 // FIN valeurs par defaut
64
65 Motcles les_mots(5);
66 {
67 les_mots[0]="N";
68 les_mots[1]="facteur";
69 les_mots[2]="GAMMA";
70 les_mots[3]="STATS";
71 les_mots[4]="CHECK_FILES";
72 }
73
74 is >> mot_lu;
75 assert(mot_lu=="{");
76 is >> mot_lu;
77 while(mot_lu != "}")
78 {
79 int rang=les_mots.search(mot_lu);
80 switch(rang)
81 {
82 case 0 :
83 is >> N;
84 break;
85 case 1 :
86 is >> facteur;
87 break;
88 case 2 :
89 is >> gamma;
90 break;
91 case 3 :
92 stats = 1;
93 is >> temps_deb_stats;
94 is >> dt_impr;
95 break;
96 case 4 :
97 check = 1;
98 break;
99 default :
100 {
101 Cerr << mot_lu << " is not a valid keyword for ODVM scalar wall-model" << finl;
102 Cerr << "Possible keywords are : " << les_mots << finl;
104 }
105 }
106 is >> mot_lu;
107 }
108
109 return is;
110
111}
112
113/////////////////////////////////////////////////////////////////////
114//
115// Implementation des fonctions de la classe Paroi_ODVM_scal_VDF
116//
117/////////////////////////////////////////////////////////////////////
118
119// /////////////////////////////////////////////////
120// // Initialisation des tableaux
121// ////////////////////////////////////////////////
122
124{
125
126 //tab_d_equiv_.resize(le_dom_dis_->nb_faces_bord());
127 tab_u_star.resize(le_dom_dis_->nb_faces_bord());
128
129 // Pour passer a l'echange contact pour imposer la temperature a l'interface.
130 Tf0.resize(le_dom_dis_->nb_faces_bord());
131
132 int ndeb,nfin;
133 int elem;
134 double dist; //distance du premier centre de maille a la paroi
135 const Domaine_VDF& domaine_VDF = ref_cast(Domaine_VDF, le_dom_dis_.valeur());
136
137 const IntTab& face_voisins = domaine_VDF.face_voisins();
138
139 const Equation_base& eqn_temp = mon_modele_turb_scal->equation();
140 const DoubleTab& Temp = eqn_temp.inconnue().valeurs();
141 const Domaine_Cl_VDF& domaine_Cl_VDF_th = ref_cast(Domaine_Cl_VDF,eqn_temp.domaine_Cl_dis());
142
143 const double t0 = eqn_temp.schema_temps().temps_courant();
144 double T0=0.;
145 const Equation_base& eqn_hydr = mon_modele_turb_scal->equation().probleme().equation(0);
146 const Milieu_base& le_milieu_fluide = eqn_hydr.milieu();
147 const Champ_Don_base& ch_lambda = le_milieu_fluide.conductivite();
148 const Champ_Don_base& ch_Cp = le_milieu_fluide.capacite_calorifique();
149 const Champ_base& ch_rho = le_milieu_fluide.masse_volumique();
150 const DoubleTab& lambda_f = ch_lambda.valeurs();
151 const DoubleTab& Cp_f = ch_Cp.valeurs();
152 const DoubleTab& rho_f = ch_rho.valeurs();
153
154 int lambda_unif = 0;
155 int Cp_unif = 0;
156 int rho_unif = 0;
157 double lambda_f_loc = -1.;
158 double Cp_f_loc = -1;;
159 double rho_f_loc = -1.;
160
161 if (sub_type(Champ_Uniforme,ch_lambda))
162 {
163 lambda_unif = 1;
164 lambda_f_loc = std::max(lambda_f(0,0),DMINFLOAT);
165 }
166 if (sub_type(Champ_Uniforme,ch_Cp))
167 {
168 Cp_unif = 1;
169 Cp_f_loc = std::max(Cp_f(0,0),DMINFLOAT);
170 }
171 if (sub_type(Champ_Uniforme,ch_rho))
172 {
173 rho_unif = 1;
174 rho_f_loc = std::max(rho_f(0,0),DMINFLOAT);
175 }
176
177 if(stats)
178 {
179 Tmean.resize(N);
180 Trms.resize(N);
181 Tpm.resize(N);
182 qb_mean.resize(N);
183
184 Tm_rms.resize(N);
185 Tm_mean.resize(N);
186 Tp_rms.resize(N);
187
188 Tau = 0;
189 Tmean = 0;
190 Trms = 0;
191 Tpm = 0;
192 qb_mean = 0;
193
194 Tm_rms = 0;
195 Tm_mean = 0;
196 Tp_rms = 0;
197 }
198
199
200 for (int n_bord=0; n_bord<domaine_VDF.nb_front_Cl(); n_bord++)
201 {
202
203 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
204 const Cond_lim& la_cl_th = domaine_Cl_VDF_th.les_conditions_limites(n_bord);
205
206 if (sub_type(Dirichlet_paroi_fixe,la_cl.valeur()) )
207 {
208 const Front_VF& le_bord = ref_cast(Front_VF,la_cl->frontiere_dis());
209 ndeb = le_bord.num_premiere_face();
210 nfin = ndeb + le_bord.nb_faces();
211
212 eq_odvm.dimensionner(domaine_VDF.nb_faces_bord());
213
214
215 //################
216 // ISOTHERMAL WALL
217 if(sub_type(Echange_externe_impose,la_cl_th.valeur()))
218 {
219 const Echange_externe_impose& la_cl_ech = ref_cast(Echange_externe_impose,la_cl_th.valeur());
220 for (int num_face=ndeb; num_face<nfin; num_face++)
221 {
222 if ((elem = face_voisins(num_face,0)) == -1) elem = face_voisins(num_face,1);
223 T0 = la_cl_ech.T_ext(num_face-ndeb);
224 //Distance a la paroi du 1er centre de maille
225 if (axi)
226 dist = domaine_VDF.dist_norm_bord_axi(num_face);
227 else
228 dist = domaine_VDF.dist_norm_bord(num_face);
229
230 eq_odvm[num_face].initialiser(N,gamma,dist,T0, Temp(elem), t0, 1., facteur);
231 // Construction du maillage, resize des tableaux
232 // mise a zero de certains tableaux,
233 // et profil lineaire de Tm initialement.
234 }//Fin boucle sur les faces de bords
235 }
236 // END OF ISOTHERMAL WALL
237 //#######################
238
239 //############################
240 // FLUID-STRUCTURE CALCULATION
241 else if(sub_type(Echange_contact_VDF,la_cl_th.valeur()))
242 {
243 const Echange_contact_VDF& la_cl_couplee = ref_cast(Echange_contact_VDF,la_cl_th.valeur());
244 const Champ_front_calc& ch_solide = ref_cast(Champ_front_calc, la_cl_couplee.T_autre_pb());
245 const Milieu_base& le_milieu_solide=ch_solide.milieu();
246 const DoubleTab& lambda_s = le_milieu_solide.conductivite().valeurs();
247 const DoubleTab& Cp_s = le_milieu_solide.capacite_calorifique().valeurs();
248 const DoubleTab& rho_s = le_milieu_solide.masse_volumique().valeurs();
249
250 double K;
251 for (int num_face=ndeb; num_face<nfin; num_face++)
252 {
253 if ((elem = face_voisins(num_face,0)) == -1) elem = face_voisins(num_face,1);
254 if (!lambda_unif)
255 lambda_f_loc = lambda_f(elem);
256 if (!Cp_unif)
257 Cp_f_loc = Cp_f(elem);
258 if (!rho_unif)
259 rho_f_loc = rho_f(elem);
260
261 K = sqrt(lambda_f_loc*Cp_f_loc*rho_f_loc/(lambda_s(0,0)*Cp_s(0,0)*rho_s(0,0)));
262
263 //Distance a la paroi du 1er centre de maille
264 if (axi)
265 dist = domaine_VDF.dist_norm_bord_axi(num_face);
266 else
267 dist = domaine_VDF.dist_norm_bord(num_face);
268
269 eq_odvm[num_face].initialiser(N,gamma,dist,Temp(elem), Temp(elem), t0, K, facteur);
270 // Construction du maillage, resize des tableaux
271 // mise a zero de certains tableaux,
272 // et profil constant de Tm initialement.
273 }//Fin boucle sur les faces de bords
274 }
275 // END OF FLUID-STRUCTURE CALCULATION CASE
276 //########################################
277
278
279 // IT'S AN ERROR because it is a BC that is not possible with ODVM
280 else
281 {
282 Cerr << "Problem while initializing ODVM: the boundary condition" << finl;
283 Cerr << "can not be used with ODVM wall-model at the moment." << finl;
285 }
286
287 }//Fin de paroi fixe
288
289 }//Fin boucle sur les bords parietaux
290
291
292 // We initialize the values of the equivalent distance at the first time step
293 // with the geometrical distance.
294 // if (axi)
295 // for (int num_face=0; num_face<domaine_VDF.nb_faces_bord(); num_face++)
296 // tab_d_equiv_[num_face] = domaine_VDF.dist_norm_bord_axi(num_face);
297 // else
298 // for (int num_face=0; num_face<domaine_VDF.nb_faces_bord(); num_face++)
299 // tab_d_equiv_[num_face] = domaine_VDF.dist_norm_bord(num_face);
300
301
302 return 1;
303}
304
305
306
307
308
310{
311 const Domaine_VDF& domaine_VDF = ref_cast(Domaine_VDF, le_dom_dis_.valeur());
312
313 const IntTab& face_voisins = domaine_VDF.face_voisins();
314 int nb_elems = domaine_VDF.nb_elem();
315
316 const Convection_Diffusion_std& eqn_temp = mon_modele_turb_scal->equation();
317 const Equation_base& eqn_hydr = mon_modele_turb_scal->equation().probleme().equation(0);
318 const Fluide_base& le_fluide = ref_cast(Fluide_base,eqn_hydr.milieu());
319 const Champ_Don_base& ch_visco_cin = le_fluide.viscosite_cinematique();
320 const Milieu_base& le_milieu_fluide = eqn_hydr.milieu();
321 const DoubleTab& lambda_f = le_milieu_fluide.conductivite().valeurs();
322 const double rhoCp = le_milieu_fluide.capacite_calorifique().valeurs()(0, 0) * le_milieu_fluide.masse_volumique().valeurs()(0, 0);
323
324 DoubleTab termes_sources;
325 termes_sources.resize(nb_elems,1);
326 eqn_temp.sources().calculer(termes_sources); //les termes sources
327 termes_sources /= rhoCp;
328
329 // TEMP
330 const DoubleTab& xv = domaine_VDF.xv();
331 // TEMP
332
333 const DoubleTab& tab_visco = ch_visco_cin.valeurs();
334 int l_unif;
335 double visco=-1;
336 if (sub_type(Champ_Uniforme,ch_visco_cin))
337 {
338 l_unif = 1;
339 visco = std::max(tab_visco(0,0),DMINFLOAT);
340 }
341 else
342 l_unif = 0;
343
344 if ((!l_unif) && (tab_visco.local_min_vect()<DMINFLOAT))
345 // on ne doit pas changer tab_visco ici !
346 {
347 Cerr << "In Paroi_ODVM_scal_VDF::calculer_scal : visco = " << tab_visco.local_min_vect() << " <= 0 ? " << finl;
348 throw;
349 }
350
351 int ndeb=0,nfin=0;
352 int elem;
353 double diff, visco_cin;
354
355
356 // On recupere directement u_star par la loi de paroi. Il ne faut surtout pas
357 // utiliser la methode calculer_u_star_avec_cisaillement car c'est faux en QC.
358 // En effet,on recupere alors u_star*rho^0.5 et non u_star -> influence sur les
359 // flux et l'impression du Nusselt.
360
361 const RefObjU& modele_turbulence_hydr = eqn_hydr.get_modele(TURBULENCE);
362 const Modele_turbulence_hyd_base& mod_turb_hydr = ref_cast(Modele_turbulence_hyd_base,modele_turbulence_hydr.valeur());
363 const Turbulence_paroi_base& loi = mod_turb_hydr.loi_paroi();
364 const DoubleVect& tab_ustar = loi.tab_u_star();
365
366 int schmidt = 0;
367 if (sub_type(Convection_Diffusion_Concentration,eqn_temp)) schmidt = 1;
368 const Champ_Don_base& alpha = (schmidt==1?ref_cast(Convection_Diffusion_Concentration,eqn_temp).constituant().diffusivite_constituant():le_fluide.diffusivite());
369
370 const DoubleVect& Temp = eqn_temp.inconnue().valeurs();
371 const Domaine_Cl_VDF& domaine_Cl_VDF_th = ref_cast(Domaine_Cl_VDF,eqn_temp.domaine_Cl_dis());
372
373
374 const double tps = eqn_temp.schema_temps().temps_courant();
375 const double dtG = eqn_temp.schema_temps().pas_de_temps();
376 double T0=0.;
377
378
379 for (int n_bord=0; n_bord<domaine_VDF.nb_front_Cl(); n_bord++)
380 {
381 const Cond_lim& la_cl = le_dom_Cl_dis_->les_conditions_limites(n_bord);
382
383 if (sub_type(Dirichlet_paroi_fixe,la_cl.valeur()) )
384 {
385 const Cond_lim& la_cl_th = domaine_Cl_VDF_th.les_conditions_limites(n_bord);
386 const Front_VF& le_bord = ref_cast(Front_VF,la_cl->frontiere_dis());
387 ndeb = le_bord.num_premiere_face();
388 nfin = ndeb + le_bord.nb_faces();
389
390 //find the associated boundary
391 int boundary_index=-1;
392 if (domaine_VDF.front_VF(n_bord).le_nom() == le_bord.le_nom())
393 boundary_index=n_bord;
394 assert(boundary_index >= 0);
395
396 //################
397 // ISOTHERMAL WALL
398 if(sub_type(Echange_externe_impose,la_cl_th.valeur()))
399 {
400 const Echange_externe_impose& la_cl_ech = ref_cast(Echange_externe_impose,la_cl_th.valeur());
401 for (int num_face=ndeb; num_face<nfin; num_face++)
402 {
403 if ((elem = face_voisins(num_face,0)) == -1) elem = face_voisins(num_face,1);
404 if (l_unif) visco_cin = visco;
405 else visco_cin = tab_visco[elem];
406 if (sub_type(Champ_Uniforme,alpha)) diff = alpha.valeurs()(0,0);
407 else
408 {
409 if (alpha.nb_comp()==1) diff = alpha.valeurs()(elem);
410 else diff = alpha.valeurs()(elem,0);
411 }
412 T0 = la_cl_ech.T_ext(num_face-ndeb);
413 if(compt) eq_odvm[num_face].set_U_tau(tab_ustar(num_face),1);
414 else eq_odvm[num_face].set_U_tau(tab_ustar(num_face),-1);
415
416 double ts = termes_sources(elem);
417 eq_odvm[num_face].set_F(ts);
418 eq_odvm[num_face].aller_au_temps(tps,T0,Temp(elem),diff,visco_cin,1);
419
420 ///////////////////////////////////////////////////////////////////////////
421 //Sondes calcule Re_tau
422 double periode = 1e-2, tn=0.;
423 if((tps-tn) > periode)
424 {
425 tn = tps;
426 }
427 //////////////////////////////////////////////////////////////////////////////
428 double Temp_w = la_cl_ech.T_ext(num_face-ndeb);
429 double dy_w = eq_odvm[num_face].get_dy_w();
430 double Temp_mean = eq_odvm[num_face].get_Tm(1);
431 double Temp_prim = eq_odvm[num_face].get_Tp(1);
432
433 // L'expression de d_equiv ne tient pas compte de alpha_t
434 // Cela dit, c'est normale car c'est lors du calcul du flux que la
435 // turbulence est prise en compte.
436 int global_face=num_face;
437 int local_face=domaine_VDF.front_VF(boundary_index).num_local_face(global_face);
438 equivalent_distance_[boundary_index](local_face) = (Temp(elem)-Temp_w)*dy_w/(Temp_mean+Temp_prim - Temp_w);
439 }//fin boucle sur les faces de bords
440 compt++;
441 }
442 // END OF ISOTHERMAL WALL
443 //#######################
444
445 //############################
446 // FLUID-STRUCTURE CALCULATION
447 else if(sub_type(Echange_contact_VDF,la_cl_th.valeur()))
448 {
449 const Echange_contact_VDF& la_cl_couplee = ref_cast(Echange_contact_VDF,la_cl_th.valeur());
450 // const DoubleTab& Temp_wall = la_cl_couplee.T_wall();
451 const DoubleTab& h_autre_pb = la_cl_couplee.h_autre_pb();
452
453 // On fait une supposition sur le schema en temps
454 // (CLs prises au temps futur)
455 const DoubleTab& t_autre=la_cl_couplee.T_autre_pb().valeurs_au_temps(tps+dtG);
456 for (int num_face=ndeb; num_face<nfin; num_face++)
457 {
458 if ((elem = face_voisins(num_face,0)) == -1) elem = face_voisins(num_face,1);
459 if (l_unif) visco_cin = visco;
460 else visco_cin = tab_visco[elem];
461 if (sub_type(Champ_Uniforme,alpha)) diff = alpha.valeurs()(0,0);
462 else
463 {
464 if (alpha.nb_comp()==1) diff = alpha.valeurs()(elem);
465 else diff = alpha.valeurs()(elem,0);
466 }
467
468 const double Temp_solid = t_autre(num_face-ndeb,0);
469
470 T0 = (Tf0(num_face-ndeb)-Temp_solid)*h_autre_pb(num_face-ndeb,0);
471 T0 = T0*diff/lambda_f(0,0);
472
473 if(compt==1)
474 {
475 eq_odvm[num_face].set_U_tau(tab_ustar(num_face),1);
476 eq_odvm[num_face].init_profile_CHT(Temp_solid,Temp(elem));
477 }
478 else
479 {
480 eq_odvm[num_face].set_U_tau(tab_ustar(num_face),-1);
481 eq_odvm[num_face].aller_au_temps(tps,T0,Temp(elem),diff,visco_cin,2);
482 }
483
484 double Ttot0 = eq_odvm[num_face].get_Tm(0) + eq_odvm[num_face].get_Tp(0);
485 if(compt!=1) Tf0(num_face-ndeb) = 0.5*Ttot0+0.5*Tf0(num_face-ndeb);
486 else Tf0(num_face-ndeb)=Temp_solid;
487
488 if(check)
489 {
490 double Ttot1 = eq_odvm[num_face].get_Tm(1) + eq_odvm[num_face].get_Tp(1);
491 if((num_face==ndeb)&&(xv(ndeb,1)<1.))
492 {
493 SFichier fic("Suivi_ndeb.dat",ios::app);
494 fic << tps << " " << Temp_solid
495 << " " << eq_odvm[num_face].get_Tm(0)
496 << " " << Ttot0;
497 fic << " " << Ttot1
498 << " " << Temp(elem)
499 << " " << eq_odvm[num_face].get_Tm(N-1) << finl;
500 }
501 }
502
503
504 if(check)
505 {
506 if((num_face==ndeb)&&(xv(ndeb,1)<1.))
507 {
508 SFichier fic("q.dat");
509 for(int i=0; i<N; i++)
510 fic << eq_odvm[num_face].get_Y(i) << " " << sqrt(eq_odvm[num_face].get_qf(i)) << " " << sqrt(eq_odvm[num_face].get_qb(i)) <<finl;
511 SFichier fic_Q("Q.dat",ios::app);
512 fic_Q << tps << " " << eq_odvm[num_face].get_Q(0) << finl;
513 }
514 }
515
516 }//fin boucle sur les faces de bords
517 compt++;
518
519 }
520 // END OF FLUID-STRUCTURE CALCULATION CASE
521 //########################################
522
523 }//Fin de paroi fixe
524
525 }//fin boucle sur les bords
526
527
528 if((stats)&&(tps>temps_deb_stats))
529 {
530 Tau+=dtG;
531 for (int num_face=ndeb; num_face<nfin; num_face++)
532 {
533 // Calculating RMS and Time Mean values of temperature.
534 for(int i=0; i<N; i++)
535 {
536 Tmean[i] = Tmean[i] + (eq_odvm[num_face].get_Tm(i)+eq_odvm[num_face].get_Tp(i))*dtG/(nfin-ndeb);
537 Trms[i] = Trms[i] + (eq_odvm[num_face].get_Tm(i)+eq_odvm[num_face].get_Tp(i))*(eq_odvm[num_face].get_Tm(i)+eq_odvm[num_face].get_Tp(i))*dtG/(nfin-ndeb);
538 Tpm[i] = Tpm[i] + eq_odvm[num_face].get_Tp(i)*dtG/(nfin-ndeb);
539 qb_mean[i] = qb_mean[i] + sqrt(eq_odvm[num_face].get_qb(i))*dtG/(nfin-ndeb);
540
541 Tm_mean[i] = Tm_mean[i]+eq_odvm[num_face].get_Tm(i)*dtG/(nfin-ndeb);
542 Tm_rms[i] = Tm_rms[i]+eq_odvm[num_face].get_Tm(i)*eq_odvm[num_face].get_Tm(i)*dtG/(nfin-ndeb);
543 Tp_rms[i] = Tp_rms[i]+eq_odvm[num_face].get_Tp(i)*eq_odvm[num_face].get_Tp(i)*dtG/(nfin-ndeb);
544
545 }
546 }
547 if (std::fabs(tps-temps_dern_post_inst)>=dt_impr)
548 {
549 Nom nom_fic = "ODVM_fields_";
550 Nom temps = Nom(tps);
551 nom_fic+= temps;
552 nom_fic+=".dat";
553 SFichier fic (nom_fic);
554 fic << "# Time and Space Averaged ODVM Statistics " << finl;
555 fic << "# Y <T> Trms <Tp> sqrt(q) Tm_rms Tp_rms" << finl;
556 for(int i=0; i<N; i++)
557 fic << eq_odvm[ndeb].get_Y(i) << " " << Tmean[i]/Tau << " " << sqrt((Trms[i]-(Tmean[i]*Tmean[i])/Tau)/Tau) << " " << Tpm[i]/Tau << " " << qb_mean[i]/Tau << " " << sqrt((Tm_rms[i]-(Tm_mean[i]*Tm_mean[i])/Tau)/Tau) << " " << sqrt((Tp_rms[i]-(Tpm[i]*Tpm[i])/Tau)/Tau) << finl;
559 }
560 }
561
562
563
564
565 return 1;
566}
567
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_base Base class of fields that are functions of a calculated quantity
DoubleTab & valeurs() override
Returns the array of field values at the current time.
virtual DoubleTab & valeurs()=0
Champ_Uniforme Represents a field that is constant in space and time.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
virtual DoubleTab & valeurs_au_temps(double temps)=0
class Champ_front_calc Derived class of Champ_front_var representing
const Milieu_base & milieu() const
Returns the medium associated with the equation carrying the unknown field whose trace is taken.
class Cond_lim Generic class used to represent any class
Definition Cond_lim.h:31
Convection_Diffusion_Concentration Special case of Convection_Diffusion_std.
Convection_Diffusion_std This class is the base for equations modelling the transport.
const Champ_Inc_base & inconnue() const override=0
Dirichlet_paroi_fixe Represents a fixed wall in a Navier-Stokes type equation.
class Domaine_Cl_VDF
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
class Domaine_VDF
Definition Domaine_VDF.h:61
double dist_norm_bord_axi(int num_face) const
Returns the normal distance for a boundary face (cylindrical coordinates).
double dist_norm_bord(int num_face) const override
Returns the normal distance for a boundary face (Cartesian coordinates).
double xv(int num_face, int k) const
Definition Domaine_VF.h:76
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
Definition Domaine_VF.h:418
int nb_faces_bord() const
Returns the number of faces on which boundary conditions are applied:
Definition Domaine_VF.h:512
const Front_VF & front_VF(int i) const
Definition Domaine_VF.h:112
int nb_front_Cl() const
const DoubleTab & h_autre_pb() const
virtual Champ_front_base & T_autre_pb()
Classe Echange_externe_impose: This class represents the special case of the class.
virtual double T_ext(int num) const
Returns the value of the imposed temperature on the i-th component of the boundary field.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Equation_base The role of an equation is the calculation of one or more fields....
virtual const Milieu_base & milieu() const =0
virtual const RefObjU & get_modele(Type_modele type) const
Sources & sources()
Returns the source terms associated with the equation.
virtual const Champ_Inc_base & inconnue() const =0
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual int nb_comp() const
Definition Field_base.h:56
Base class for an incompressible fluid and its properties:
Definition Fluide_base.h:36
const Champ_Don_base & viscosite_cinematique() const
Definition Fluide_base.h:56
class Front_VF
Definition Front_VF.h:36
int num_local_face(const int) const
Definition Front_VF.h:87
int nb_faces() const
Definition Front_VF.h:53
int num_premiere_face() const
Definition Front_VF.h:63
const Nom & le_nom() const override
Returns the name of the geometric boundary.
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
virtual const Champ_Don_base & capacite_calorifique() const
Returns the heat capacity of the medium (const version).
virtual const Champ_Don_base & conductivite() const
Returns the conductivity of the medium (const version).
virtual const Champ_Don_base & diffusivite() const
Returns the diffusivity of the medium (const version).
virtual const Champ_base & masse_volumique() const
Returns the mass density of the medium (const version).
Base class for the turbulence model hierarchy for Navier-Stokes equations.
const Turbulence_paroi_base & loi_paroi() const
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition Objet_U.cpp:317
static int axi
Definition Objet_U.h:96
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
CLASS: Paroi_ODVM_scal_VDF.
int calculer_scal(Champ_Fonc_base &) override
virtual const Equation_base & equation(int) const =0
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
double temps_courant() const
Returns the current time.
double pas_de_temps() const
Returns the current time step (delta_t).
Base class for output streams.
Definition Sortie.h:52
DoubleTab & calculer(DoubleTab &) const
Calculates the contribution of all sources in the list and stores the result in the array passed as p...
Definition Sources.cpp:98
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
_TYPE_ local_min_vect(Mp_vect_options opt=VECT_REAL_ITEMS) const
Definition TRUSTVect.h:155
const Objet_U & valeur() const
Definition TRUST_Ref.h:134
Base class for the hierarchy of wall-law models computing turbulent quantities near walls....
const DoubleVect & tab_u_star() const