TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Source_Darcy_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_Darcy_VEF_Face.h>
17#include <Fluide_Incompressible.h>
18#include <Probleme_base.h>
19#include <Domaine_Cl_VEF.h>
20#include <Domaine_VEF.h>
21#include <Param.h>
22
23Implemente_instanciable_sans_constructeur(Source_Darcy_VEF_Face,"Darcy_VEF_P1NC",Terme_Source_VEF_base);
24
25Sortie& Source_Darcy_VEF_Face::printOn(Sortie& s ) const { return s << que_suis_je() ; }
26
28{
29 Param param(que_suis_je());
30 set_param(param);
31 param.lire_avec_accolades_depuis(is);
32 set_fichier("Source_Darcy");
33 set_description("Darcy term = Integral(-nu/K*vitesse*dv) [m/s2]");
34 return is;
35}
36
38{
39 param.ajouter_non_std("modele_K",(this),Param::REQUIRED);
40 param.ajouter_non_std("porosite",(this),Param::REQUIRED);
41}
42
44{
45 if (mot=="modele_K")
46 {
47 Motcle motlu;
48 is >> motlu;
49 eval().modK_.typer(motlu);
50 is >> eval().modK_.valeur();
51 return 1;
52 }
53 else if (mot=="porosite")
54 {
55 is >> eval().getPorosite();
56 return 1;
57 }
58 else
59 {
60 Cerr << "Unknown keyword in Source_Darcy_VEF_Face" << finl;
62 }
63 return -1;
64}
65
67{
68 const Domaine_VEF& zvdf = ref_cast(Domaine_VEF,domaine_dis);
69 const Domaine_Cl_VEF& zclvdf = ref_cast(Domaine_Cl_VEF,domaine_cl_dis);
70 iter_->associer_domaines(zvdf, zclvdf);
71 eval().associer_domaines(zvdf, zclvdf);
72}
73
75{
76 const Champ_Don_base& diffu = ref_cast(Fluide_base,pb.milieu()).viscosite_cinematique();
77 const Champ_Inc_base& vit = pb.equation(0).inconnue();
78 eval().associer(diffu);
79 eval().associer(vit);
80}
class Champ_Don_base base class of Given Fields (not calculated)
Class Champ_Inc_base.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VEF
Definition Domaine_VEF.h:53
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
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_Don_base &)
void associer_domaines(const Domaine_dis_base &domaine, const Domaine_Cl_dis_base &domaine_cl)
Base class for an incompressible fluid and its properties:
Definition Fluide_base.h:36
A character string (Nom) in uppercase.
Definition Motcle.h:26
friend class Entree
Definition Objet_U.h:71
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
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
class Probleme_base It is a Probleme_U that is not a coupling.
virtual const Milieu_base & milieu() const
Returns the physical medium associated with the problem (const version).
virtual const Equation_base & equation(int) const =0
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52
class Source_Darcy_VEF_Face
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
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
Eval_Darcy_VEF_Face & eval()
void set_fichier(const Nom &)
void set_description(const Nom &nom)
Definition Source_base.h:83