TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_couplage_thermique.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_couplage_thermique_included
17#define Echange_couplage_thermique_included
18
19#include <Echange_global_impose.h>
20#include <Lecture_Champ.h>
21
22/*! @brief : class Echange_couplage_thermique
23 *
24 */
26{
27 Declare_instanciable( Echange_couplage_thermique ) ;
28public :
29 void completer() override;
30 void set_temps_defaut(double temps) override;
31 void changer_temps_futur(double temps, int i) override;
32 int avancer(double temps) override;
33 int reculer(double temps) override;
34 void mettre_a_jour(double temps) override;
35 int initialiser(double temps) override;
36
37 double champ_exterieur(int i,int j, const Champ_front_base& champ_ext) const override;
38 inline double champ_exterieur(int i, const Champ_front_base& champ_ext) const override { return champ_exterieur(i, 0, champ_ext); };
39
40 inline double flux_exterieur_impose(int i) const override { return couplage_*champ_exterieur(i,phi_ext()); }
41 inline double flux_exterieur_impose(int i,int j) const override { return couplage_*champ_exterieur(i,j,phi_ext()); };
42
43 inline Champ_front_base& T_p() { return T_ext(); }
44 inline const Champ_front_base& T_p() const { return T_ext(); }
45
46 bool reprise() const { return reprise_; }
47 inline Champ_front_base& a_p() { return coeff_ap; }
48 inline const Champ_front_base& a_p() const { return coeff_ap; }
49
50 inline Champ_front_base& s_p() { return coeff_sp; }
51 inline const Champ_front_base& s_p() const { return coeff_sp; }
52
53 // Effective exchange coefficient
54 inline Champ_front_base& h_eff() { return coeff_heff; }
55 inline const Champ_front_base& h_eff() const { return coeff_heff; }
56
57 // Effective exchange type
58 inline Champ_front_base& tep_eff() { return type_echange_eff; }
59 inline const Champ_front_base& tep_eff() const { return type_echange_eff; }
60
61 // Effective temperature
62 inline Champ_front_base& T_eff() { return temperature_Teff; }
63 inline const Champ_front_base& T_eff() const { return temperature_Teff; }
64
65 // Critical heat flux ratio at the wall
66 inline Champ_front_base& rec_paroi() { return rftc_paroi; }
67 inline const Champ_front_base& rec_paroi() const { return rftc_paroi; }
68
69 // Critical flux at the wall
70 inline Champ_front_base& phic_paroi() { return flux_critique_paroi; }
71 inline const Champ_front_base& phic_paroi() const { return flux_critique_paroi; }
72
73protected :
74 double couplage_ = -1.;
78 OWN_PTR(Champ_front_base) type_echange_eff;
79 OWN_PTR(Champ_front_base) temperature_Teff;
81 OWN_PTR(Champ_front_base) flux_critique_paroi;
83 bool reprise_ = false, divise_par_rho_cp_ = true;
84};
85
86#endif /* Echange_couplage_thermique_included */
class Champ_front_base Base class for the hierarchy of boundary fields.
: class Echange_couplage_thermique
double champ_exterieur(int i, int j, const Champ_front_base &champ_ext) const override
void set_temps_defaut(double temps) override
Changes the i-th future time of the BC.
const Champ_front_base & T_p() const
void completer() override
DOES NOTHING must be overridden in derived classes.
const Champ_front_base & T_eff() const
OWN_PTR(Champ_front_base) type_echange_eff
OWN_PTR(Champ_front_base) rftc_paroi
double champ_exterieur(int i, const Champ_front_base &champ_ext) const override
OWN_PTR(Champ_front_base) coeff_ap
const Champ_front_base & a_p() const
const Champ_front_base & h_eff() const
const Champ_front_base & s_p() const
double flux_exterieur_impose(int i) const override
OWN_PTR(Champ_front_base) flux_critique_paroi
int avancer(double temps) override
Rotates the wheel of the BC.
const Champ_front_base & rec_paroi() const
OWN_PTR(Champ_front_base) coeff_heff
double flux_exterieur_impose(int i, int j) const override
int reculer(double temps) override
Rotates the wheel of the BC.
void mettre_a_jour(double temps) override
Performs a time update of the boundary condition.
void changer_temps_futur(double temps, int i) override
Changes the i-th future time of the BC.
const Champ_front_base & tep_eff() const
int initialiser(double temps) override
Initialization at the beginning of the calculation.
OWN_PTR(Champ_front_base) temperature_Teff
OWN_PTR(Champ_front_base) coeff_sp
const Champ_front_base & phic_paroi() const
Classe Echange_global_impose This class represents the special case of the class.
Champ_front_base & phi_ext()
virtual Champ_front_base & T_ext()
Returns the T_ext field of temperature imposed at the boundary.
: class Lecture_Champ