TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Energie_Multiphase.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 Energie_Multiphase_included
17#define Energie_Multiphase_included
18
19#include <Convection_Diffusion_Temperature_base.h>
20#include <Operateur_Evanescence.h>
21
22/*! @brief classe Energie_Multiphase Cas particulier de Convection_Diffusion_std pour un fluide quasi conpressible
23 *
24 * quand le scalaire subissant le transport est la temperature en gaz parfaits,
25 * ou l'enthalpie en gaz reels.
26 * (generalisation de Convection_Diffusion_Temperature pour les gaz reels)
27 *
28 * @sa Conv_Diffusion_std Convection_Diffusion_Temperature
29 */
31{
32 Declare_instanciable(Energie_Multiphase);
33public :
34 void set_param(Param& param) const override;
35 int lire_motcle_non_standard(const Motcle&, Entree&) override;
36
37 inline const Champ_Inc_base& inconnue() const override;
38 inline Champ_Inc_base& inconnue() override;
39 void discretiser() override;
40 int impr(Sortie& os) const override;
41 void dimensionner_matrice_sans_mem(Matrice_Morse& matrice) override;
42
43 /*
44 interface {dimensionner,assembler}_blocs
45 specificites : prend en compte l'evanescence (en dernier)
46 */
47 int has_interface_blocs() const override;
48 void dimensionner_blocs(matrices_t matrices, const tabs_t& semi_impl = {}) const override;
49 void assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl = {}) override;
50 const Motcle& domaine_application() const override;
51 void verifie_ch_init_nb_comp_cl(const Champ_Inc_base& ch_ref, const int nb_comp, const Cond_lim_base& cl) const override;
52
53 /* champ convecte : alpha * rho * e */
54 static void calculer_alpha_rho_e(const Objet_U& obj, DoubleTab& val, DoubleTab& bval, tabs_t& deriv);
55 std::pair<std::string, fonc_calc_t> get_fonc_champ_conserve() const override
56 {
57 return { "alpha_rho_e", calculer_alpha_rho_e };
58 }
59
60 static void calculer_alpha_rho_h(const Objet_U& obj, DoubleTab& val, DoubleTab& bval, tabs_t& deriv);
61 static void calculer_alpha_rho_e_conv(const Objet_U& obj, DoubleTab& val, DoubleTab& bval, tabs_t& deriv);
62 virtual std::pair<std::string, fonc_calc_t> get_fonc_champ_convecte() const
63 {
64 return { "alpha_rho_e_conv", calculer_alpha_rho_e_conv };
65 }
66
67 Champ_Inc_base& champ_convecte() const override //par defaut le champ conserve
68 {
69 return champ_convecte_.valeur();
70 }
71 int has_champ_convecte() const override
72 {
73 return bool(champ_convecte_);
74 }
75 void init_champ_convecte() const override; //a appeller dans le completer() des operateurs/sources qui auront besoin de champ_convecte_
76
77protected :
78
81};
82
83/*! @brief Renvoie le champ inconnue representant l'inconnue (T ou H) (version const)
84 *
85 * @return (Champ_Inc_base&) le champ inconnue representant la temperature (GP) ou l'enthalpie (GR)
86 */
88{
89 return l_inco_ch_;
90}
91
92/*! @brief Renvoie le champ inconnue representant l'inconnue (T ou H)
93 *
94 * @return (Champ_Inc_base&) le champ inconnue representant la temperature (GP) ou l'enthalpie (GR)
95 */
97{
98 return l_inco_ch_;
99}
100
101#endif /* Energie_Multiphase_included */
Classe Champ_Inc_base.
classe Cond_lim_base Classe de base pour la hierarchie des classes qui representent les differentes c...
classe Energie_Multiphase Cas particulier de Convection_Diffusion_std pour un fluide quasi conpressib...
void verifie_ch_init_nb_comp_cl(const Champ_Inc_base &ch_ref, const int nb_comp, const Cond_lim_base &cl) const override
Verification du nombre de composantes lues pour la specification d un champ.
int has_interface_blocs() const override
int impr(Sortie &os) const override
Impression des flux sur les bords sur un flot de sortie.
Operateur_Evanescence evanescence_
const Motcle & domaine_application() const override
Renvoie le nom du domaine d'application de l'equation.
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 assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) override
static void calculer_alpha_rho_e_conv(const Objet_U &obj, DoubleTab &val, DoubleTab &bval, tabs_t &deriv)
std::pair< std::string, fonc_calc_t > get_fonc_champ_conserve() const override
void dimensionner_blocs(matrices_t matrices, const tabs_t &semi_impl={}) const override
int has_champ_convecte() const override
void init_champ_convecte() const override
OWN_PTR(Champ_Inc_base) l_inco_ch_
Champ_Inc_base & champ_convecte() const override
static void calculer_alpha_rho_e(const Objet_U &obj, DoubleTab &val, DoubleTab &bval, tabs_t &deriv)
const Champ_Inc_base & inconnue() const override
Renvoie le champ inconnue representant l'inconnue (T ou H) (version const).
void discretiser() override
Discretise l'equation.
static void calculer_alpha_rho_h(const Objet_U &obj, DoubleTab &val, DoubleTab &bval, tabs_t &deriv)
virtual std::pair< std::string, fonc_calc_t > get_fonc_champ_convecte() const
void set_param(Param &param) const override
void dimensionner_matrice_sans_mem(Matrice_Morse &matrice) override
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.
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
classe Objet_U Cette classe est la classe de base des Objets de TRUST
Definition Objet_U.h:73
classe Operateur_Evanescence Classe generique de la hierarchie des operateurs representant un terme
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Classe de base des flux de sortie.
Definition Sortie.h:52