TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_Diffusion_std.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_std_included
17#define Convection_Diffusion_std_included
18
19#include <Schema_Temps_base.h>
20#include <Operateur_Conv.h>
21#include <Operateur_Diff.h>
22#include <Equation_base.h>
23#include <TRUST_Ref.h>
24
25
26class Champ_Inc_base;
27
28/*! @brief classe Convection_Diffusion_std Cette classe est la base des equations modelisant le transport
29 *
30 * d'un scalaire.
31 * Cette classe porte les termes communs a l'equation
32 * de transport d'un scalaire en regime laminaire.
33 * On se place sous l'hypothese de fluide incompressible.
34 * DT/dt = div(terme visqueux) + termes sources/rho_0
35 * avec DT/dt : derivee particulaire du scalaire
36 * Rq: l'implementation de la classe permet bien sur de negliger
37 * certains termes de l'equation (le terme diffusif,
38 * le terme convectif,tel ou tel terme source).
39 *
40 * @sa Equation_base, Classe abstraite, Methodes abstraites:, Entree& lire(const Motcle&, Entree&), const Champ_Inc_base& inconnue() const, Champ_Inc_base& inconnue()
41 */
43{
44 Declare_base(Convection_Diffusion_std);
45
46public :
47
48 void set_param(Param& titi) const override;
49 int lire_motcle_non_standard(const Motcle&, Entree&) override;
50 int nombre_d_operateurs() const override;
51 const Operateur& operateur(int) const override;
52 Operateur& operateur(int) override;
53 inline void associer_vitesse(const Champ_base& );
54 inline const Champ_Inc_base& vitesse_transportante() const;
55 const Champ_Inc_base& inconnue() const override =0;
56 Champ_Inc_base& inconnue() override =0;
57 virtual const Champ_Don_base& diffusivite_pour_transport() const;
58 virtual const Champ_base& diffusivite_pour_pas_de_temps() const;
59 virtual const Champ_base& vitesse_pour_transport() const;
60 // E. Saikali : Methodes utiles pour un heritage V
61 int sauvegarder_base(Sortie&) const;
63 std::vector<YAML_data> data_a_sauvegarder_base() const;
64
65protected :
66
67 OBS_PTR(Champ_Inc_base) la_vitesse_transportante;
71};
72
73
74/*! @brief Renvoie une reference sur le champ representant la vitesse transportante.
75 *
76 * @return (Champ_Inc_base&) le champ representant la vitesse transportante
77 */
79{
80 return la_vitesse_transportante.valeur();
81}
82
83
84/*! @brief Associe la vitesse transportante a l'equation.
85 *
86 * @param (Champ_Inc_base& vit) le champ a affecter a la vitesse transportante
87 */
89{
90 la_vitesse_transportante = ref_cast(Champ_Inc_base,vit);
91}
92#endif
classe Champ_Don_base classe de base des Champs donnes (non calcules)
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_std Cette classe est la base des equations modelisant le transport
std::vector< YAML_data > data_a_sauvegarder_base() const
void associer_vitesse(const Champ_base &)
Associe la vitesse transportante a l'equation.
const Champ_Inc_base & inconnue() const override=0
Champ_Inc_base & inconnue() override=0
virtual const Champ_Don_base & diffusivite_pour_transport() const
virtual const Champ_base & diffusivite_pour_pas_de_temps() const
const Operateur & operateur(int) const override
Renvoie l'operateur specifie par son index: renvoie terme_diffusif si i = 0.
void set_param(Param &titi) const override
const Champ_Inc_base & vitesse_transportante() const
Renvoie une reference sur le champ representant la vitesse transportante.
int nombre_d_operateurs() const override
Renvoie le nombre d'operateurs de l'equation: 2 pour une equation de diffusion.
virtual const Champ_base & vitesse_pour_transport() const
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.
OBS_PTR(Champ_Inc_base) la_vitesse_transportante
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
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
classe Operateur_Conv Classe generique de la hierarchie des operateurs representant un terme
classe Operateur_Diff Classe generique de la hierarchie des operateurs representant un terme
classe Operateur Classe generique de la hierarchie des operateurs.
Definition Operateur.h:39
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112