TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Convection_Diffusion_Temperature.h
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#ifndef Convection_Diffusion_Temperature_included
17#define Convection_Diffusion_Temperature_included
18
19#include <Convection_Diffusion_Temperature_base.h>
20
21/*! @brief classe Convection_Diffusion_Temperature Cas particulier de Convection_Diffusion_std
22 *
23 * quand le scalaire subissant le transport est la temperature.
24 *
25 * @sa Conv_Diffusion_std
26 */
28{
29 Declare_instanciable(Convection_Diffusion_Temperature);
30public:
31
32 void set_param(Param& titi) const override;
33 int lire_motcle_non_standard(const Motcle&, Entree&) override;
34 inline const Champ_Inc_base& inconnue() const override { return la_temperature; }
35 inline Champ_Inc_base& inconnue() override { return la_temperature; }
36 void discretiser() override;
37 int preparer_calcul() override;
38 void associer_milieu_base(const Milieu_base& ) override;
39 //Methodes de l interface des champs postraitables
40 /////////////////////////////////////////////////////
41 void creer_champ(const Motcle& motlu) override;
42 const Champ_base& get_champ(const Motcle& nom) const override;
43 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const override;
44 bool has_champ(const Motcle& nom) const override;
45 void get_noms_champs_postraitables(Noms& nom,Option opt=NONE) const override;
46 /////////////////////////////////////////////////////
47
48 double get_time_factor() const override;
49 const Motcle& domaine_application() const override;
50
51 DoubleTab& derivee_en_temps_inco(DoubleTab& ) override;
52 void assembler( Matrice_Morse& mat_morse, const DoubleTab& present, DoubleTab& secmem) override ;
53 void assembler_blocs(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = {}) const override;
54 /* champ convecte : rho * cp * T */
55 static void calculer_rho_cp_T(const Objet_U& obj, DoubleTab& val, DoubleTab& bval, tabs_t& deriv);
56
57protected :
58 OWN_PTR(Champ_Inc_base) la_temperature;
59 OWN_PTR(Champ_Fonc_base) gradient_temperature, h_echange;
60
61 // Parametres penalisation IBC
62 int is_penalized = 0;
63 double eta = 1.0;
66 VECT(RefObjU) ref_penalisation_L2_FTD;
68
69 DoubleTab& filtrage_si_appart_ibc(DoubleTab& , DoubleTab&);
70 DoubleTab& penalisation_L2(DoubleTab&);
74 void mise_en_place_domaine_fantome(DoubleTab&);
75 void calcul_indic_pena_global(IntTab&, IntTab&);
76 void transport_ibc(DoubleTrav&, DoubleTab&);
77 void ecrire_fichier_pena_th(DoubleTab&, DoubleTab&, DoubleTab&, DoubleTab&);
78};
79
80#endif /* Convection_Diffusion_Temperature_included */
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Convection_Diffusion_Temperature Cas particulier de Convection_Diffusion_std
void ecrire_fichier_pena_th(DoubleTab &, DoubleTab &, DoubleTab &, DoubleTab &)
static void calculer_rho_cp_T(const Objet_U &obj, DoubleTab &val, DoubleTab &bval, tabs_t &deriv)
const Champ_Inc_base & inconnue() const override
const Motcle & domaine_application() const override
Renvoie le nom du domaine d'application de l'equation.
const Champ_base & get_champ(const Motcle &nom) const override
void associer_milieu_base(const Milieu_base &) override
Associe un milieu physique a l'equation, le milieu est en fait caste en Fluide_base.
DoubleTab & derivee_en_temps_inco(DoubleTab &) override
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
VECT(RefObjU) ref_penalisation_L2_FTD
void discretiser() override
Discretise l'equation.
OWN_PTR(Champ_Inc_base) la_temperature
DoubleTab & filtrage_si_appart_ibc(DoubleTab &, DoubleTab &)
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void creer_champ(const Motcle &motlu) override
void assembler_blocs(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const override
void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem) override
int preparer_calcul() override
Tout ce qui ne depend pas des autres problemes eventuels.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112