TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Source_Forchheimer_VEF_Face.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 <Source_Forchheimer_VEF_Face.h>
17#include <Probleme_base.h>
18#include <Milieu_base.h>
19#include <Domaine_Cl_VEF.h>
20
21#include <Domaine_VEF.h>
22#include <Param.h>
23
24Implemente_instanciable_sans_constructeur(Source_Forchheimer_VEF_Face, "Forchheimer_VEF_P1NC", Terme_Source_VEF_base);
25
27
29{
30 Param param(que_suis_je());
31 set_param(param);
32 param.lire_avec_accolades_depuis(is);
33 set_fichier("Forcheimer");
34 set_description("Forchheimer term = Integral(-Cf/K*abs(vitesse)*vitesse*dv) [m/s2]");
35 return is;
36}
37
39{
40 param.ajouter_non_std("modele_K", (this), Param::REQUIRED);
41 param.ajouter_non_std("Cf", (this), Param::REQUIRED);
42 param.ajouter_non_std("porosite", (this), Param::REQUIRED);
43}
44
46{
47 if (mot == "modele_K")
48 {
49 Motcle motlu;
50 is >> motlu;
51 eval().modK_.typer(motlu);
52 is >> eval().modK_.valeur();
53 return 1;
54 }
55 else if (mot == "Cf")
56 {
57 double c;
58 is >> c;
59 eval().setCf(c);
60 return 1;
61 }
62 else if (mot == "porosite")
63 {
64 double c;
65 is >> c;
66 eval().setPorosite(c);
67 return 1;
68 }
69 else
70 {
71 Cerr << "Unknown keyword in Source_Forchheimer_VEF_Face " << finl;
73 }
74 return -1;
75}
76
78{
79 const Domaine_VEF& zvdf = ref_cast(Domaine_VEF, domaine_dis);
80 const Domaine_Cl_VEF& zclvdf = ref_cast(Domaine_Cl_VEF, domaine_cl_dis);
81 iter_->associer_domaines(zvdf, zclvdf);
82 eval().associer_domaines(zvdf, zclvdf);
83}
84
86{
87 const Champ_Inc_base& vit = pb.equation(0).inconnue();
88 eval().associer(vit);
89}
Classe Champ_Inc_base.
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
class Domaine_VEF
Definition Domaine_VEF.h:54
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
virtual const Champ_Inc_base & inconnue() const =0
void associer(const Champ_Inc_base &v)
void associer_domaines(const Domaine_dis_base &domaine, const Domaine_Cl_dis_base &domaine_cl)
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
friend class Entree
Definition Objet_U.h:76
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
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
@ 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
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
class Source_Forchheimer_VEF_Face
Eval_Forchheimer_VEF_Face & eval()
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.
void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &) override
void set_param(Param &param) const override
void associer_pb(const Probleme_base &) override
void set_fichier(const Nom &)
void set_description(const Nom &nom)
Definition Source_base.h:83