TrioCFD 1.9.9_beta
TrioCFD documentation
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 Convection_Diffusion_Concentration Special case of Convection_Diffusion_std
25 *
26 * for one or more constituents.
27 * In the case of multiple constituents, the concentration
28 * and diffusivity fields are vectorial.
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 Associates a constituent to the equation.
69 *
70 * @param (Constituant& un_constituant) the constituent to associate with the equation
71 */
73{
74 le_constituant = un_constituant;
75}
76
77
78/*! @brief Returns the unknown field of the equation: the concentration.
79 *
80 * (const version)
81 *
82 * @return (Champ_Inc_base&) the unknown field of the equation, the concentration.
83 */
85{
86 return la_concentration;
87}
88
89
90/*! @brief Returns the unknown field of the equation: the concentration.
91 *
92 * @return (Champ_Inc_base&) the unknown field of the equation, the concentration.
93 */
95{
96 return la_concentration;
97}
98
99
100/*! @brief Returns the number of constituents of the "Constituant" of the equation.
101 *
102 * @return (int) the number of constituents of the equation
103 */
108
109
110#endif
class Champ_Don_base base class of Given Fields (not calculated)
Class Champ_Inc_base.
Represents the constituent(s) of a fluid.
Definition Constituant.h:30
const Constituant & constituant() const
Returns the constituent (if one has been associated).
void associer_constituant(const Constituant &)
Associates a constituent to the equation.
const Milieu_base & milieu() const override
Returns the physical medium of the equation.
OWN_PTR(Champ_Inc_base) la_concentration
void discretiser() override
Discretizes the equation.
int preparer_calcul() override
Everything that does not depend on other possible problems.
int nb_constituants() const
Returns the number of constituents of the "Constituant" of the equation.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
const Champ_Inc_base & inconnue() const override
Returns the unknown field of the equation: the concentration.
void associer_milieu_base(const Milieu_base &) override
Associates a physical medium to the equation; the medium is cast to Constituant and associated with t...
const Motcle & domaine_application() const override
Returns the name of the application domain of the equation.
int impr(Sortie &os) const override
Prints the boundary fluxes to an output stream.
OBS_PTR(Constituant) le_constituant
const Champ_Don_base & diffusivite_pour_transport() const override
void mettre_a_jour(double) override
The value of the unknown at the time step has been calculated.
Convection_Diffusion_std This class is the base for equations modelling the transport.
Champs_compris champs_compris_
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
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112