TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Convection_Diffusion_Concentration.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_Concentration_included
17#define Convection_Diffusion_Concentration_included
18
19#include <Convection_Diffusion_std.h>
20#include <TRUST_Ref.h>
21
22class Constituant;
23
24/*! @brief classe Convection_Diffusion_Concentration Cas particulier de Convection_Diffusion_std
25 *
26 * pour un ou plusieurs constituants.
27 * Dans le cas de plusieurs constituants les champs
28 * concentration et diffusivite sont vectoriels.
29 *
30 * @sa Convection_Diffusion_std
31 */
33{
34 Declare_instanciable_sans_constructeur(Convection_Diffusion_Concentration);
35
36public :
37
38 void set_param(Param& titi) const override;
39 int lire_motcle_non_standard(const Motcle&, Entree&) override;
41 const Milieu_base& milieu() const override;
42 Milieu_base& milieu() override;
43 const Constituant& constituant() const;
45 void associer_milieu_base(const Milieu_base& ) override;
46 inline void associer_constituant(const Constituant& );
47 void discretiser() override;
48 inline const Champ_Inc_base& inconnue() const override;
49 inline Champ_Inc_base& inconnue() override;
50 inline int nb_constituants() const;
51 int impr(Sortie& os) const override;
52 int preparer_calcul() override;
53 void mettre_a_jour(double) override;
54 const Champ_Don_base& diffusivite_pour_transport() const override;
55 const Motcle& domaine_application() const override;
56 const double& masse_molaire() const;
57 Champs_compris& get_champ_compris() { return champs_compris_; }
58
59protected :
60
62 OWN_PTR(Champ_Inc_base) la_concentration;
63 OBS_PTR(Constituant) le_constituant;
65};
66
67
68/*! @brief Associe un constituant a l'equation.
69 *
70 * @param (Constituant& un_constituant) un constituant a associer a l'equation
71 */
73{
74 le_constituant = un_constituant;
75}
76
77
78/*! @brief Renvoie le champ inconnue de l'equation: la concentration.
79 *
80 * (version const)
81 *
82 * @return (Champ_Inc_base&) le champ inconnue de l'equation, la concentration.
83 */
85{
86 return la_concentration;
87}
88
89
90/*! @brief Renvoie le champ inconnue de l'equation: la concentration.
91 *
92 * @return (Champ_Inc_base&) le champ inconnue de l'equation, la concentration.
93 */
95{
96 return la_concentration;
97}
98
99
100/*! @brief Renvoie le nombre de constituants du "Constituant" de l'equation.
101 *
102 * @return (int) le nombre de constituants de l'equation
103 */
108
109
110#endif
classe Champ_Don_base classe de base des Champs donnes (non calcules)
Classe Champ_Inc_base.
classe Constituant Cette classe represente le(s) constituant(s) d'un fluide.
Definition Constituant.h:30
const Constituant & constituant() const
Renvoie le constituant (si il a ete associe).
void associer_constituant(const Constituant &)
Associe un constituant a l'equation.
const Milieu_base & milieu() const override
Renvoie le milieu physique de l'equation.
OWN_PTR(Champ_Inc_base) la_concentration
void discretiser() override
Discretise l'equation.
int preparer_calcul() override
Tout ce qui ne depend pas des autres problemes eventuels.
int nb_constituants() const
Renvoie le nombre de constituants du "Constituant" 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.
const Champ_Inc_base & inconnue() const override
Renvoie le champ inconnue de l'equation: la concentration.
void associer_milieu_base(const Milieu_base &) override
Associe un milieu physique a l'equation, le milieu est en fait caste en Constituant et associe a l'eq...
const Motcle & domaine_application() const override
Renvoie le nom du domaine d'application de l'equation.
int impr(Sortie &os) const override
Impression des flux sur les bords sur un flot de sortie.
OBS_PTR(Constituant) le_constituant
const Champ_Don_base & diffusivite_pour_transport() const override
void mettre_a_jour(double) override
La valeur de l'inconnue sur le pas de temps a ete calculee.
classe Convection_Diffusion_std Cette classe est la base des equations modelisant le transport
Champs_compris champs_compris_
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
friend class Entree
Definition Objet_U.h:76
friend class Sortie
Definition Objet_U.h:75
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112