TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Constituant.cpp
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#include <Discretisation_base.h>
17#include <Equation_base.h>
18#include <Probleme_base.h>
19#include <Constituant.h>
20#include <Param.h>
21
22Implemente_instanciable(Constituant, "Constituant", Milieu_base);
23
24Sortie& Constituant::printOn(Sortie& os) const { return os; }
25
27
28void Constituant::set_param(Param& param) const
29{
31 param.ajouter("coefficient_diffusion", &D_, Param::REQUIRED);
32 param.ajouter_non_std("is_multi_scalar|is_multi_scalar_diffusion", (this));
33}
34
36{
37 discretiser_multi_concentration(Nom("coefficient_diffusion"), pb, dis);
38}
39
41{
42 const Domaine_dis_base& domaine_dis = pb.equation(0).domaine_dis();
43 dis.nommer_completer_champ_physique(domaine_dis, nm, "m2/s", D_.valeur(), pb);
44 champs_compris_.ajoute_champ(D_.valeur());
46}
47
49{
50 if (mot=="is_multi_scalar" || mot=="is_multi_scalar_diffusion")
51 {
53 return 1;
54 }
55 else
57}
classe Constituant Cette classe represente le(s) constituant(s) d'un fluide.
Definition Constituant.h:30
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
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
void nommer_completer_champ_physique(const Domaine_dis_base &domaine_vdf, const Nom &nom_champ, const Nom &unite, Champ_base &champ, const Probleme_base &pbi) const
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
virtual void discretiser(const Probleme_base &pb, const Discretisation_base &dis)
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.
Champs_compris champs_compris_
virtual void set_param(Param &param) const override
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
friend class Entree
Definition Objet_U.h:76
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Definition Param.cpp:364
@ REQUIRED
Definition Param.h:115
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
Definition Param.cpp:489
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
virtual const Equation_base & equation(int) const =0
Classe de base des flux de sortie.
Definition Sortie.h:52