TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_contact_VDF.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 <Modele_turbulence_scal_base.h>
17#include <Turbulence_paroi_scal_base.h>
18#include <Schema_Euler_Implicite.h>
19#include <Echange_contact_VDF.h>
20#include <Domaine_Cl_dis_base.h>
21#include <Champ_front_calc.h>
22#include <Champ_Uniforme.h>
23#include <Probleme_base.h>
24#include <Equation_base.h>
25#include <Schema_Comm.h>
26#include <Milieu_base.h>
27#include <Domaine_VDF.h>
28#include <TRUST_Ref.h>
29#include <TRUSTTrav.h>
30#include <ArrOfBit.h>
31
32Implemente_instanciable(Echange_contact_VDF,"Paroi_Echange_contact_VDF",Echange_global_impose);
33// XD paroi_echange_contact_vdf condlim_base paroi_echange_contact_vdf INHERITS_BRACE Boundary condition type to model
34// XD_CONT the heat flux between two problems. Important: the name of the boundaries in the two problems should be the
35// XD_CONT same.
36// XD attr autrepb ref_Pb_base autrepb REQ Name of other problem.
37// XD attr nameb chaine nameb REQ Name of bord.
38// XD attr temp chaine temp REQ Name of field.
39// XD attr h floattant h REQ Value assigned to a coefficient (expressed in W.K-1m-2) that characterises the contact
40// XD_CONT between the two mediums. In order to model perfect contact, h must be taken to be infinite. This value must
41// XD_CONT obviously be the same in both the two problems blocks. NL2 The surface thermal flux exchanged between the two
42// XD_CONT mediums is represented by : NL2 fi = h (T1-T2) where 1/h = d1/lambda1 + 1/val_h_contact + d2/lambda2 NL2
43// XD_CONT where di : distance between the node where Ti and the wall is found.
44
45
46int meme_point2(const DoubleVect& a,const DoubleVect& b);
47
48Sortie& Echange_contact_VDF::printOn(Sortie& s ) const { return s << que_suis_je() << finl; }
49
51{
52 if (app_domains.size() == 0) app_domains = { Motcle("Thermique"), Motcle("Neutronique"), Motcle("fraction_massique"), Motcle("indetermine") };
53
55 T_autre_pb_.typer("Champ_front_calc");
56 le_champ_front.typer("Ch_front_var_instationnaire_dep");
58 return s;
59}
60
69
70/*! @brief Changes the i-th future time of the boundary condition.
71 *
72 */
78
79/*! @brief Advances the boundary condition time wheel.
80 *
81 */
83{
84 int ok=Cond_lim_base::avancer(temps);
85 ok = ok && T_autre_pb().avancer(temps);
86 return ok;
87}
88
89/*! @brief Rewinds the boundary condition time wheel.
90 *
91 */
93{
94 int ok=Cond_lim_base::reculer(temps);
95 ok = ok && T_autre_pb().reculer(temps);
96 return ok;
97}
98
99
100void calculer_h_local(DoubleTab& tab,const Equation_base& une_eqn,const Domaine_VDF& zvdf_2,const Front_VF& front_vf,const Milieu_base& le_milieu,double invhparoi,int opt)
101{
102 DoubleVect e;
103 const IntTab& face_voisins = zvdf_2.face_voisins();
104 int i;
105 int nb_faces=front_vf.nb_faces();
106 int nb_comp = le_milieu.conductivite().nb_comp();
107 int ndeb = front_vf.num_premiere_face();
108 int nfin = ndeb + nb_faces;
109 bool dequiv=false;
110
111 e.resize(front_vf.nb_faces());
112
113 const RefObjU& modele_turbulence = une_eqn.get_modele(TURBULENCE);
114
115 if (modele_turbulence && sub_type(Modele_turbulence_scal_base,modele_turbulence.valeur()) && opt!=1 )
116 {
117 const Modele_turbulence_scal_base& mod_turb_scal = ref_cast(Modele_turbulence_scal_base,modele_turbulence.valeur());
118 const Turbulence_paroi_scal_base& loi_par = mod_turb_scal.loi_paroi();
119 if( loi_par.use_equivalent_distance() )
120 {
121 int boundary_index=-1;
122 dequiv=true;
123 // Looking for the good boundary
124 int nb_boundaries=zvdf_2.domaine().nb_front_Cl();
125 for (int n_bord=0; n_bord<nb_boundaries; n_bord++)
126 {
127 if (zvdf_2.front_VF(n_bord).le_nom() == front_vf.le_nom())
128 boundary_index=n_bord;
129 }
130 for (int ind_face=0; ind_face<nb_faces; ind_face++)
131 {
132 e(ind_face)=loi_par.equivalent_distance(boundary_index,ind_face);
133 }
134 }
135 }
136 if( ! dequiv )
137 {
138 for (int face=ndeb; face<nfin; face++)
139 {
140 e(face-ndeb) = zvdf_2.dist_norm_bord(face);
141 }
142 }
143
144 // Compute tab = 1/(e/lambda + 1/h_paroi) =1/(e/lambda+invhparoi)
145 if(!sub_type(Champ_Uniforme,le_milieu.conductivite()))
146 {
147 const DoubleTab& lambda = le_milieu.conductivite().valeurs();
148 for (int face=ndeb; face<nfin; face++)
149 {
150 int elem = face_voisins(face,0);
151 if (elem == -1)
152 elem = face_voisins(face,1);
153 for(i=0; i<nb_comp; i++)
154 {
155 assert(le_milieu.conductivite().valeurs()(elem,i)!=0.);
156 tab(face-ndeb,i) = 1./(e(face-ndeb)/lambda(elem,i)+invhparoi);
157 }
158 }
159 }
160 else // the conductivity is a uniform OWN_PTR(Champ_base)
161 {
162 for (int face=ndeb; face<nfin; face++)
163 {
164 for(i=0; i<nb_comp; i++)
165 {
166 assert(le_milieu.conductivite().valeurs()(0,i)!=0.);
167 tab(face-ndeb,i) = 1./(e(face-ndeb)/le_milieu.conductivite().valeurs()(0,i)+invhparoi);
168 }
169 }
170 }
171
172} // end of the Raccord_local_homogene case
173
174
175void calculer_h_distant(DoubleTab& tab,const Equation_base& une_eqn,const Domaine_VDF& zvdf_2,const Front_VF& front_vf,const Milieu_base& le_milieu,double invhparoi,int opt,const Nom& nom_racc2)
176{
177 DoubleVect e;
178 int i;
179 int nb_comp = le_milieu.conductivite().nb_comp();
180 int nb_faces_raccord1 =tab.dimension(0); //= domaine_dis1.domaine().raccord(nom_racc1)->nb_faces();
181 bool dequiv=false;
182
183 const RefObjU& modele_turbulence = une_eqn.get_modele(TURBULENCE);
184 if (modele_turbulence && sub_type(Modele_turbulence_scal_base,modele_turbulence.valeur()) && opt!=1 )
185 {
186
187 const Modele_turbulence_scal_base& mod_turb_scal = ref_cast(Modele_turbulence_scal_base,modele_turbulence.valeur());
188 const Turbulence_paroi_scal_base& loi_par = mod_turb_scal.loi_paroi();
189 if( loi_par.use_equivalent_distance() )
190 {
191 dequiv=true;
192 DoubleVect d_equiv_tmp;
193 front_vf.frontiere().trace_face_distant( loi_par.equivalent_distance_name(d_equiv_tmp,nom_racc2),e);
194 // const Paroi_scal_hyd_base_VDF& loip = ref_cast(Paroi_scal_hyd_base_VDF,loi_par.valeur());
195 // front_vf.frontiere().trace_face(loip.d_equiv_nom(d_equiv_tmp,nom_racc2),e);
196 }
197 }
198 if( ! dequiv )
199 {
200 DoubleVect dist;
201 front_vf.frontiere().trace_face_distant(zvdf_2.dist_norm_bord(dist,nom_racc2),e);
202 }
203
204 // Compute tab = 1/(e/lambda + 1/h_paroi)=1/(e/lambda + invhparoi)
205
206 if(!sub_type(Champ_Uniforme,le_milieu.conductivite()))
207 {
208 DoubleTab lambda;
209 front_vf.frontiere().trace_elem_distant(le_milieu.conductivite().valeurs(),lambda);
210 for (int face=0; face<nb_faces_raccord1; face++)
211 for(i=0; i<nb_comp; i++)
212 {
213 assert(lambda(face,i)!=0.);
214 tab(face,i) = 1./(e(face)/lambda(face,i)+invhparoi);
215 }
216 }
217 else // the conductivity is a uniform OWN_PTR(Champ_base)
218 {
219 const DoubleTab& lambda = le_milieu.conductivite().valeurs();
220 for (int face=0; face<nb_faces_raccord1; face++)
221 for(i=0; i<nb_comp; i++)
222 {
223 assert(lambda(0,i)!=0.);
224 tab(face,i) = 1./(e(face)/lambda(0,i)+invhparoi);
225 }
226 }
227} // end of the Raccord_distant_homogene case
228
229
230void Echange_contact_VDF::calculer_h_mon_pb(DoubleTab& tab,double invhparoi,int opt)
231{
232 // forcement local
233 const Equation_base& mon_eqn = domaine_Cl_dis().equation();
234 const Milieu_base& mon_milieu = mon_eqn.milieu();
235 const Domaine_VDF& ma_zvdf = ref_cast(Domaine_VDF,domaine_Cl_dis().domaine_dis());
236 const Front_VF& ma_front_vf = ref_cast(Front_VF,frontiere_dis());
237 calculer_h_local(tab,mon_eqn,ma_zvdf,ma_front_vf,mon_milieu,invhparoi,opt);
238}
239
240void Echange_contact_VDF::calculer_h_autre_pb(DoubleTab& tab,double invhparoi,int opt)
241{
243 const Milieu_base& le_milieu=ch.milieu();
244 const Domaine_VDF& zvdf_2=ref_cast(Domaine_VDF, ch.domaine_dis());
245 const Front_VF& front_vf=ref_cast(Front_VF, ch.front_dis());
246 const Equation_base& une_eqn=ch.equation();
247 int nb_comp = le_milieu.conductivite().nb_comp();
248 assert(nb_comp==1);
249
250 Domaine_dis_base& domaine_dis1 = domaine_Cl_dis().domaine_dis();
251 Nom nom_racc1=frontiere_dis().frontiere().le_nom();
252 Nom nom_racc2=ch.nom_bord_oppose();
253
254 int nb_faces_raccord1 = domaine_dis1.domaine().raccord(nom_racc1)->nb_faces();
255 if (tab.dimension(0)!=nb_faces_raccord1
256 ||tab.dimension(1)!=nb_comp)
257 {
258 Cerr << "In Echange_contact_VDF::calculer_h_autre_pb, tab is no longer dimensioned." << finl;
259 Cerr << "Dimensioning is done in Echange_contact_VDF::initialiser." << finl;
260 exit();
261 }
262 if (domaine_dis1.domaine().raccord(nom_racc1)->que_suis_je() =="Raccord_distant_homogene")
263 {
264 calculer_h_distant(tab,une_eqn,zvdf_2,front_vf,le_milieu,invhparoi,opt,nom_racc2);
265 }
266 else // Raccord_local_homogene
267 {
268 calculer_h_local(tab,une_eqn,zvdf_2,front_vf,le_milieu,invhparoi,opt);
269 }
270}
271
273{
275 return 0;
276
277 // XXX : Values are filled here and not in readOn because the medium of pb2 is not yet read !!!
280
281 const Equation_base& o_eqn = ch.equation();
282 const Front_VF& fvf = ref_cast(Front_VF, frontiere_dis()), o_fvf = ref_cast(Front_VF, ch.front_dis());
283 const Domaine_VDF& o_domaine = ref_cast(Domaine_VDF, ch.domaine_dis());
284 const IntTab& o_f_e = o_domaine.face_voisins();
285 const Milieu_base& le_milieu = ch.milieu();
286 int nb_comp = le_milieu.conductivite().nb_comp();
287 Nom nom_racc1 = frontiere_dis().frontiere().le_nom();
288 Domaine_dis_base& domaine_dis1 = domaine_Cl_dis().domaine_dis();
289 int nb_faces_raccord1 = domaine_dis1.domaine().raccord(nom_racc1)->nb_faces();
290
291 h_imp_.typer("Champ_front_fonc");
292 h_imp_->fixer_nb_comp(nb_comp);
293 h_imp_->valeurs().resize(nb_faces_raccord1,nb_comp);
294
295 if (domaine_dis1.domaine().raccord(nom_racc1)->que_suis_je() !="Raccord_distant_homogene")
297
298 autre_h.resize(nb_faces_raccord1,nb_comp);
299
300 ch.initialiser(temps,domaine_Cl_dis().equation().inconnue());
301
302 monolithic = sub_type(Schema_Euler_Implicite, o_eqn.schema_temps()) ?
303 ref_cast(Schema_Euler_Implicite, o_eqn.schema_temps()).resolution_monolithique(o_eqn.domaine_application()) : 0;
304 if (!monolithic) return 1; //no need for the rest
305 o_domaine.init_virt_e_map();
306
307 /* src(i) = (proc, j) : source de l'item i de mdv_elem */
308 IntTab src(0, 2);
310 for (int i = 0; i < src.dimension_tot(0); i++) src(i, 0) = Process::me(), src(i, 1) = i;
312
313 /* o_proc, o_item -> processeur/item de l'element pour chaque face de la frontiere */
314 DoubleTrav o_proc, o_item, proc, l_item;
315 o_domaine.creer_tableau_faces(o_proc), o_domaine.creer_tableau_faces(o_item);
317 for (int i = 0; i < o_fvf.nb_faces(); i++)
318 {
319 int f = o_fvf.num_face(i), e = o_f_e(f, 0) == -1 ? o_f_e(f, 1) : o_f_e(f, 0);
320 o_proc(f) = src(e, 0), o_item(f) = src(e, 1); //element
321 }
322
323 //projection onto the local boundary
324 if (o_fvf.frontiere().que_suis_je() == "Raccord_distant_homogene")
325 o_fvf.frontiere().trace_face_distant(o_proc, proc), o_fvf.frontiere().trace_face_distant(o_item, l_item);
326 else o_fvf.frontiere().trace_face_local(o_proc, proc), o_fvf.frontiere().trace_face_local(o_item, l_item);
327
328 //filling
329 item.resize(fvf.nb_faces()), item = -1;
330 for (int i = 0; i < fvf.nb_faces(); i++)
331 if (l_item(i) >= 0)
332 {
333 if (proc(i) == Process::me())
334 item(i) = (int)std::lrint(l_item(i)); //item local (reel)
335 else
336 {
337 if (o_domaine.virt_e_map.count({{ (int) proc(i), (int) l_item(i) }})) //item local (virtuel)
338 item(i) = o_domaine.virt_e_map.at({{ (int) proc(i), (int) l_item(i) }});
339 else Process::exit(Nom("Echange_contact_VDF : missing element opposite face ") + Nom(fvf.num_face(i)) + " in " + fvf.le_nom() + " ! Have you used Decouper_multi?");
340 }
341 }
342 return 1;
343}
344
346{
348 const Milieu_base& le_milieu=ch.milieu();
349 int nb_comp = le_milieu.conductivite().nb_comp();
350 assert(nb_comp==1);
351
352 T_autre_pb().mettre_a_jour(temps);
353
354 int is_pb_fluide=0;
355
356 DoubleTab& mon_h= h_imp_->valeurs();
357
358 int opt=0;
359 assert(h_paroi!=0.);
360 double invhparoi=1./h_paroi;
361 calculer_h_autre_pb( autre_h, invhparoi, opt);
362 calculer_h_mon_pb(mon_h,0.,opt);
363
364 calculer_Teta_paroi(T_wall_,mon_h,autre_h,is_pb_fluide,temps);
365 calculer_Teta_equiv(T_ext().valeurs_au_temps(temps),mon_h,autre_h,is_pb_fluide,temps);
366 // Teta_paroi has been computed; now compute htot in himp (= mon_h)
367 int taille=mon_h.dimension(0);
368 for (int ii=0; ii<taille; ii++)
369 for (int jj=0; jj<nb_comp; jj++)
370 {
371 mon_h(ii,jj)=1./(1./autre_h(ii,jj)+1./mon_h(ii,jj));
372 }
374}
375
376
377/*! @brief Fills Teta_eq using T_autre_pb at the time passed as parameter.
378 *
379 */
380void Echange_contact_VDF::calculer_Teta_equiv(DoubleTab& Teta_eq,const DoubleTab& mon_h,const DoubleTab& lautre_h,int i,double temps)
381{
382 const Front_VF& ma_front_vf = ref_cast(Front_VF,frontiere_dis());
383 int nb_faces_bord = ma_front_vf.nb_faces();
384 assert(Teta_eq.dimension(0)==nb_faces_bord);
385 assert(Teta_eq.dimension(1)==1);
386 DoubleTab& t_autre=T_autre_pb().valeurs_au_temps(temps);
387 for (int numfa=0; numfa<nb_faces_bord; numfa++)
388 {
389 Teta_eq(numfa,0) = t_autre(numfa,0);
390 }
391 Teta_eq.echange_espace_virtuel();
392}
393
394/*! @brief Fills Teta_p using T_autre_pb at the time passed as parameter.
395 *
396 */
397void Echange_contact_VDF::calculer_Teta_paroi(DoubleTab& Teta_p,const DoubleTab& mon_h,const DoubleTab& lautre_h,int i, double temps)
398{
399 const Equation_base& mon_eqn = domaine_Cl_dis().equation();
400 const DoubleTab& mon_inco=mon_eqn.inconnue().valeurs();
401 const Domaine_VDF& ma_zvdf = ref_cast(Domaine_VDF,domaine_Cl_dis().domaine_dis());
402 const Front_VF& ma_front_vf = ref_cast(Front_VF,frontiere_dis());
403 int ndeb = ma_front_vf.num_premiere_face();
404 int nb_faces_bord = ma_front_vf.nb_faces();
405 int ind_fac,elem;
406 Teta_p.resize(nb_faces_bord,1);
407 DoubleTab& t_autre=T_autre_pb().valeurs_au_temps(temps);
408 for (int numfa=0; numfa<nb_faces_bord; numfa++)
409 {
410 ind_fac = numfa+ndeb;
411 if (ma_zvdf.face_voisins(ind_fac,0)!= -1)
412 elem = ma_zvdf.face_voisins(ind_fac,0);
413 else
414 elem = ma_zvdf.face_voisins(ind_fac,1);
415
416 Teta_p(numfa,0) = (mon_h(numfa,0)*mon_inco(elem) + lautre_h(numfa,0)*t_autre(numfa,0))/(mon_h(numfa,0)+lautre_h(numfa,0));
417 }
418}
419
420// In VDF, the faces of two raccords must be numbered in the same way
422{
423 const Champ_front_calc& ch=ref_cast(Champ_front_calc, T_autre_pb());
424 const Domaine_VDF& ma_zvdf = ref_cast(Domaine_VDF,domaine_Cl_dis().domaine_dis());
425 const Front_VF& ma_front_vf = ref_cast(Front_VF,frontiere_dis());
426 const Domaine_VDF& zvdf_2=ref_cast(Domaine_VDF, ch.domaine_dis());
427 const Front_VF& front_vf=ref_cast(Front_VF, ch.front_dis());
428 int ndeb = ma_front_vf.num_premiere_face();
429 int ndeb2 = front_vf.num_premiere_face();
430 int nb_faces_bord = ma_front_vf.nb_faces();
431 int ind_fac,ind_fac_2;
432 const DoubleTab& xv=ma_zvdf.xv();
433 const DoubleTab& xv2=zvdf_2.xv();
434
435 DoubleVect x1(dimension);
436 DoubleVect x2(dimension);
437 for (int numfa=0; numfa<nb_faces_bord; numfa++)
438 {
439 ind_fac = numfa+ndeb;
440 ind_fac_2=numfa+ndeb2;
441 for (int k=0; k<dimension; k++)
442 {
443 x1[k] = xv(ind_fac,k);
444 x2[k] = xv2(ind_fac_2,k);
445 }
446 if (!meme_point2(x1,x2))
447 {
448 Cerr<<finl;
449 Cerr<<"Correspondence problem: the two 'Raccords' named "<<ma_front_vf.le_nom() <<" are not facing."<<finl;
450 Cerr<<"Problem on the following faces:" << finl;
451 if ( dimension==2 )
452 {
453 Cerr << "Coordinates of the face 1: (" << x1[0] << " " << x1[1] << ") on the domain " << ma_zvdf.domaine().le_nom() << finl;
454 Cerr << "Coordinates of the face 2: (" << x2[0] << " " << x2[1] << ") on the domain " << zvdf_2.domaine().le_nom() << finl;
455 }
456 else
457 {
458 Cerr << "Coordinates of the face 1: (" << x1[0] << " " << x1[1] << x1[2] << ") on the domain " << ma_zvdf.domaine().le_nom() << finl;
459 Cerr << "Coordinates of the face 2: (" << x2[0] << " " << x2[1] << x2[2] << ") on the domain " << zvdf_2.domaine().le_nom() << finl;
460 }
461 Cerr << "\nIn VDF, numbering of faces on each 'Raccord' must be identical (to a constant)." << finl;
462 Cerr << "The faces of each sub frontier of the boundary " << ma_front_vf.le_nom() << " must be created in the same order on each domain, this process is sensitive to the reading sense of the faces." << finl;
463 exit();
464 return 0;
465 }
466 }
467 return 1;
468}
469
470int meme_point2(const DoubleVect& x,const DoubleVect& y)
471{
472 int dim = x.size();
473 assert(dim==y.size());
474 int ind =1;
475 for (int k=0; k<dim; k++)
476 if (std::fabs(x(k)-y(k))>=Objet_U::precision_geom)
477 {
478 ind = 0;
479 return ind;
480 }
481 return ind;
482}
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
DoubleTab & valeurs() override
Returns the array of field values at the current time.
Champ_Uniforme Represents a field that is constant in space and time.
virtual void associer_fr_dis_base(const Frontiere_dis_base &)
Associates a discretized boundary with the field.
virtual void changer_temps_futur(double temps, int i)
Changes the time value for the i-th temporal value after the present.
virtual DoubleTab & valeurs_au_temps(double temps)=0
virtual void fixer_nb_valeurs_temporelles(int nb_cases)
Called by Conds_lim::completer. By default does nothing.
virtual int reculer(double temps)
To implement in derived classes.
virtual int avancer(double temps)
To implement in derived classes.
virtual void mettre_a_jour(double temps)
DOES NOTHING, to override.
virtual void completer()
class Champ_front_calc Derived class of Champ_front_var representing
const Frontiere_dis_base & front_dis() const
Returns the discretized boundary corresponding to the domain on which the trace is taken.
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...
const Nom & nom_bord_oppose() const
Returns the name of the boundary on which the trace is computed.
int initialiser(double, const Champ_Inc_base &) override
Initialization at the beginning of calculation.
const Equation_base & equation() const
Returns the equation associated with the unknown whose trace is taken.
const Domaine_dis_base & domaine_dis() const override
Returns the discretized domain associated with the equation carrying the unknown field whose trace is...
const Milieu_base & milieu() const
Returns the medium associated with the equation carrying the unknown field whose trace is taken.
virtual void changer_temps_futur(double temps, int i)
Changes the i-th future time of the BC.
virtual int avancer(double temps)
Rotates the wheel of the BC.
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
virtual int reculer(double temps)
Rotates the wheel of the BC.
std::vector< Motcle > app_domains
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
int nb_front_Cl() const
Definition Domaine.h:236
Raccord_t & raccord(int i)
Definition Domaine.h:248
virtual const MD_Vector & md_vector_elements() const
Returns the parallel descriptor of element arrays of the domain.
Definition Domaine.cpp:859
Domaine_dis_base & domaine_dis()
Returns a reference to the discretized domain associated with the boundary conditions.
class Domaine_VDF
Definition Domaine_VDF.h:61
std::map< std::array< int, 2 >, int > virt_e_map
void init_virt_e_map() const
double dist_norm_bord(int num_face) const override
Returns the normal distance for a boundary face (Cartesian coordinates).
void creer_tableau_faces(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
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
const Front_VF & front_VF(int i) const
Definition Domaine_VF.h:112
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
const Domaine & domaine() const
int reculer(double temps) override
Rewinds the boundary condition time wheel.
int initialiser(double temps) override
Initialization at the beginning of the calculation.
void completer() override
DOES NOTHING must be overridden in derived classes.
void changer_temps_futur(double temps, int i) override
Changes the i-th future time of the boundary condition.
void calculer_h_autre_pb(DoubleTab &tab, double invhparoi, int opt)
virtual void calculer_Teta_equiv(DoubleTab &Teta_equiv, const DoubleTab &mon_h, const DoubleTab &autre_h, int is_pb_fluide, double temps)
Fills Teta_eq using T_autre_pb at the time passed as parameter.
void mettre_a_jour(double) override
Performs a time update of the boundary condition.
int avancer(double temps) override
Advances the boundary condition time wheel.
virtual void calculer_Teta_paroi(DoubleTab &tab_p, const DoubleTab &mon_h, const DoubleTab &autre_h, int is_pb_fluide, double temps)
Fills Teta_p using T_autre_pb at the time passed as parameter.
virtual Champ_front_base & T_autre_pb()
void calculer_h_mon_pb(DoubleTab &, double, int)
Classe Echange_global_impose This class represents the special case of the class.
void mettre_a_jour(double temps) override
Performs a time update of the boundary condition.
void completer() override
DOES NOTHING must be overridden in derived classes.
int initialiser(double temps) override
Initialization at the beginning of the calculation.
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,...
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
virtual const Champ_Inc_base & inconnue() const =0
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual const Motcle & domaine_application() const
Returns "indeterminate" Navier_Stokes_standard for example overrides this method.
virtual void fixer_nb_comp(int i)
Sets the number of components of the field.
virtual int nb_comp() const
Definition Field_base.h:56
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
int num_face(const int) const
Definition Front_VF.h:68
virtual void trace_elem_distant(const DoubleTab &, DoubleTab &) const
virtual void trace_face_distant(const DoubleTab &, DoubleTab &) const
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition Frontiere.h:49
virtual void creer_tableau_faces(Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT) const
Creates an array with one "row" per face of this boundary.
const Frontiere & frontiere() const
Returns the associated geometric boundary.
const Nom & le_nom() const override
Returns the name of the geometric boundary.
static void creer_tableau_distribue(const MD_Vector &, Array_base &, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Transforms v into a parallel array having the structure md.
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
virtual const Champ_Don_base & conductivite() const
Returns the conductivity of the medium (const version).
Base class for scalar turbulence models coupled to a Navier-Stokes convection-diffusion equation.
const Turbulence_paroi_scal_base & loi_paroi() const
Returns the scalar wall-law turbulence model (const version).
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
Definition MorEqn.h:62
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
static int dimension
Definition Objet_U.h:94
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
static double precision_geom
Definition Objet_U.h:81
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
static int me()
Returns the rank of the local processor in the current communication group. See Comm_Group::rank() an...
Definition Process.cpp:122
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
virtual int nb_valeurs_temporelles() const =0
Base class for output streams.
Definition Sortie.h:52
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
_SIZE_ dimension_tot(int) const override
Definition TRUSTTab.tpp:160
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
_SIZE_ size() const
Definition TRUSTVect.tpp:45
void resize(_SIZE_, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTVect.tpp:91
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")
const Objet_U & valeur() const
Definition TRUST_Ref.h:134
Base class for the hierarchy of scalar wall-law models computing turbulent quantities near walls....
virtual bool use_equivalent_distance() const
Give a boolean indicating if we need to use equivant distance by default we consider that we use the ...
virtual DoubleVect & equivalent_distance_name(DoubleVect &d_eq, const Nom &nom_bord) const =0
const DoubleVects & equivalent_distance() const