TrioCFD 1.9.9_beta
TrioCFD documentation
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 Convection_Diffusion_Temperature Special case of Convection_Diffusion_std
22 *
23 * when the transported scalar is the 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 // Methods of the post-processable fields interface
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 // IBC penalization parameters
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 */
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Class Champ_Inc_base.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Convection_Diffusion_Temperature Special case of 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
Returns the name of the application domain of the equation.
const Champ_base & get_champ(const Motcle &nom) const override
void associer_milieu_base(const Milieu_base &) override
Associates a physical medium to the equation; the medium is cast to 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
Discretizes the equation.
OWN_PTR(Champ_Inc_base) la_temperature
DoubleTab & filtrage_si_appart_ibc(DoubleTab &, DoubleTab &)
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
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
Everything that does not depend on other possible problems.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
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
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Base class for TRUST objects (Objet_U).
Definition Objet_U.h:68
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112