TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Constituant.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 Constituant_included
17#define Constituant_included
18
19#include <Milieu_base.h>
20
21/*! @brief classe Constituant Cette classe represente le(s) constituant(s) d'un fluide.
22 *
23 * Elle contient un champ alpha representant le coefficient de diffusion du constituant.
24 * Lorsqu'un objet de type Constituant represente plusieurs constituant
25 * le champ alpha est vectoriel avec autant de composantes qu'il y a de constituants.
26 *
27 * @sa Milieu_base
28 */
30{
31 Declare_instanciable(Constituant);
32public :
33
34 void set_param(Param& param) const override;
35
37 {
38 assert(D_);
39 return D_.valeur();
40 }
41
42 inline void mettre_a_jour(double temps) override
43 {
44 if (D_) D_->mettre_a_jour(temps);
45 }
46
47 void discretiser(const Probleme_base& pb, const Discretisation_base& dis) override;
48
49 void discretiser_multi_concentration(const Nom& , const Probleme_base& pb, const Discretisation_base& dis);
50
51 int initialiser(const double temps) override
52 {
53 if (D_) D_->initialiser(temps);
54 return 1;
55 }
56
57 inline int nb_constituants() const
58 {
59 return diffusion_multi_scalaire_ ? static_cast<int>(std::sqrt(D_->nb_comp())) /* TODO FIXME */ : D_->nb_comp();
60 }
61 int lire_motcle_non_standard(const Motcle& mot, Entree& is) override;
62
63protected :
64 OWN_PTR(Champ_Don_base) D_; // Coefficient de diffusion du constituant dans un milieu
66};
67
68#endif /* Constituant_included */
classe Champ_Don_base classe de base des Champs donnes (non calcules)
classe Constituant Cette classe represente le(s) constituant(s) d'un fluide.
Definition Constituant.h:30
int nb_constituants() const
Definition Constituant.h:57
const Champ_Don_base & diffusivite_constituant() const
Definition Constituant.h:36
void discretiser(const Probleme_base &pb, const Discretisation_base &dis) override
void discretiser_multi_concentration(const Nom &, const Probleme_base &pb, const Discretisation_base &dis)
int lire_motcle_non_standard(const Motcle &mot, Entree &is) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
bool diffusion_multi_scalaire_
Definition Constituant.h:65
void set_param(Param &param) const override
void mettre_a_jour(double temps) override
Definition Constituant.h:42
OWN_PTR(Champ_Don_base) D_
int initialiser(const double temps) override
Definition Constituant.h:51
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
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
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.