TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_global_impose.h
1/****************************************************************************
2* Copyright (c) 2025, 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_global_impose_included
17#define Echange_global_impose_included
18
19#include <Echange_impose_base.h>
20
21/*! @brief Classe Echange_global_impose Cette classe represente le cas particulier de la classe
22 *
23 * Echange_impose_base ou l'echange de chaleur total est calcule grace au
24 * coefficient d'echange de chaleur global fourni par l'utilisateur.
25 *
26 * ATTENTION, dans le cas des discretisations ou T est localisee au centre de l'element (VDF)
27 * cela correspond a la modelisation d'une paroi d'echange dont l'epaisseur s'etend jusqu'a la moitie
28 * de la premiere maille.
29 *
30 * h_t : coefficient d'echange total
31 * h_imp_: coefficient d'echange global (donnee utilisateur)
32 * On a: h_t = h_imp
33 * Les champs h_imp et T_ext sont uniformes
34 *
35 *
36 * @sa Echange_impose_base Echange_externe_impose
37 */
39{
40 Declare_instanciable(Echange_global_impose);
41public:
42 int compatible_avec_discr(const Discretisation_base& discr) const override { return 1; }
43 void completer() override;
44 void set_temps_defaut(double temps) override;
45 void changer_temps_futur(double temps, int i) override;
46 int avancer(double temps) override;
47 int reculer(double temps) override;
48 void mettre_a_jour(double temps) override;
49 int initialiser(double temps) override;
50
51 inline Champ_front_base& derivee_phi_ext() { return derivee_phi_ext_; }
52 inline const Champ_front_base& derivee_phi_ext() const { return derivee_phi_ext_; }
53 inline Champ_front_base& phi_ext() { return phi_ext_; }
54 inline const Champ_front_base& phi_ext() const { return phi_ext_; }
55
56 virtual double champ_exterieur(int i, int j, const Champ_front_base& champ_ext) const;
57 virtual double champ_exterieur(int i, const Champ_front_base& champ_ext) const;
58
59 virtual double flux_exterieur_impose(int i) const;
60 virtual double flux_exterieur_impose(int i, int j) const;
61
62 virtual double derivee_flux_exterieur_imposee(int i) const;
63 virtual double derivee_flux_exterieur_imposee(int i, int j) const;
64
65 const bool& has_phi_ext() const { return phi_ext_lu_; }
66
67protected:
68 bool phi_ext_lu_ = false;
69 OWN_PTR(Champ_front_base) derivee_phi_ext_, phi_ext_;
70};
71
72#endif
classe Champ_front_base Classe de base pour la hierarchie des champs aux frontieres.
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
Classe Echange_global_impose Cette classe represente le cas particulier de la classe.
virtual double flux_exterieur_impose(int i) const
void set_temps_defaut(double temps) override
Change le i-eme temps futur de la cl.
OWN_PTR(Champ_front_base) derivee_phi_ext_
void mettre_a_jour(double temps) override
Effectue une mise a jour en temps de la condition aux limites.
int reculer(double temps) override
Tourne la roue de la CL.
const Champ_front_base & phi_ext() const
Champ_front_base & derivee_phi_ext()
Champ_front_base & phi_ext()
void completer() override
NE FAIT RIEN A surcharger dans les classes derivees.
int avancer(double temps) override
Tourne la roue de la CL.
const bool & has_phi_ext() const
int initialiser(double temps) override
Initialisation en debut de calcul.
int compatible_avec_discr(const Discretisation_base &discr) const override
Renvoie 1 si la condition aux limites est compatible avec la discretisation passee en parametre.
virtual double derivee_flux_exterieur_imposee(int i) const
virtual double champ_exterieur(int i, int j, const Champ_front_base &champ_ext) const
void changer_temps_futur(double temps, int i) override
Change le i-eme temps futur de la CL.
const Champ_front_base & derivee_phi_ext() const
classe Echange_impose_base: Cette condition limite sert uniquement pour l'equation d'energie.