TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_contact_VDF.h
1/****************************************************************************
2* Copyright (c) 2024, 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#ifndef Echange_contact_VDF_included
17#define Echange_contact_VDF_included
18
19#include <Echange_global_impose.h>
20#include <TRUSTTabs_forward.h>
21#include <TRUST_Ref.h>
22#include <Motcle.h>
23#include <map>
24
25class Milieu_base;
26class Front_VF;
27class Domaine_VDF;
28#include <Domaine_forward.h>
29
30/*! @brief class: Echange_contact_VDF In addition to the boundary field representing the wall temperature,
31 *
32 * this class holds another boundary field with the same number of
33 * time values, representing the temperature in the other problem.
34 *
35 */
36void 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);
37
39{
40 Declare_instanciable(Echange_contact_VDF);
41public:
42 void completer() override;
43 int initialiser(double temps) override;
44 int verifier_correspondance() const;
45 void mettre_a_jour(double) override;
46 void calculer_h_autre_pb(DoubleTab& tab, double invhparoi, int opt);
47 void calculer_h_mon_pb(DoubleTab&, double, int);
48 inline virtual Champ_front_base& T_autre_pb() { return T_autre_pb_; }
49 inline virtual const Champ_front_base& T_autre_pb() const { return T_autre_pb_; }
50 virtual void calculer_Teta_paroi(DoubleTab& tab_p, const DoubleTab& mon_h, const DoubleTab& autre_h, int is_pb_fluide, double temps);
51 virtual void calculer_Teta_equiv(DoubleTab& Teta_equiv, const DoubleTab& mon_h, const DoubleTab& autre_h, int is_pb_fluide, double temps);
52 inline const DoubleTab& T_wall() const { return T_wall_; }
53 inline const DoubleTab& h_autre_pb() const { return autre_h; }
54
55 // returns e_pb1 -> e_pb2 for e neighboring a contact wall face
56 // with nl, nc the number of rows and columns of the coupling matrix between pb1 and pb2
57 inline const IntTab& get_remote_elems() const { return remote_elems_; }
58 inline const Nom& nom_autre_pb() const { return nom_autre_pb_; }
59
60 void changer_temps_futur(double temps, int i) override;
61 int avancer(double temps) override;
62 int reculer(double temps) override;
63
64 //item(i): index of the i-th item needed for face i of the boundary
65 mutable IntTab item;
66 int monolithic = 0; //1 if the thermal problem is solved monolithically
67
68protected:
69 double h_paroi = -100.;
70 DoubleTab autre_h;
72 DoubleTab T_wall_;
76};
77
78#endif /* Echange_contact_VDF_included */
class Champ_front_base Base class for the hierarchy of boundary fields.
class Domaine_VDF
Definition Domaine_VDF.h:61
int reculer(double temps) override
Rewinds the boundary condition time wheel.
const Nom & nom_autre_pb() const
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.
const DoubleTab & h_autre_pb() const
void mettre_a_jour(double) override
Performs a time update of the boundary condition.
OWN_PTR(Champ_front_base) T_autre_pb_
int avancer(double temps) override
Advances the boundary condition time wheel.
const DoubleTab & T_wall() const
const IntTab & get_remote_elems() const
virtual const Champ_front_base & T_autre_pb() const
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.
class Equation_base The role of an equation is the calculation of one or more fields....
class Front_VF
Definition Front_VF.h:36
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31