TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Perte_Charge_Anisotrope_PolyMAC_CDO_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 <Perte_Charge_Anisotrope_PolyMAC_CDO_Face.h>
17#include <Motcle.h>
18#include <Param.h>
19
20Implemente_instanciable(Perte_Charge_Anisotrope_PolyMAC_CDO_Face, "Perte_Charge_Anisotrope_Face_PolyMAC_CDO", Perte_Charge_PolyMAC_CDO);
21
23
25{
27 if (v->nb_comp() != dimension)
28 {
29 Cerr << "Il faut definir le champ direction a " << dimension << " composantes" << finl;
31 }
32 return s;
33}
34
36{
38 param.ajouter_non_std("lambda_ortho", (this), Param::REQUIRED);
39 param.ajouter("direction", &v, Param::REQUIRED);
40}
41
43{
44 if (mot == "lambda_ortho")
45 return lire_motcle_non_standard_impl(mot, is);
46 else
48}
49
50void Perte_Charge_Anisotrope_PolyMAC_CDO_Face::coeffs_perte_charge(const DoubleVect& u, const DoubleVect& pos, double t, double norme_u,
51 double dh, double nu, double reynolds, double& coeff_ortho,
52 double& coeff_long, double& u_l, DoubleVect& v_valeur) const
53{
54 coeffs_perte_charge_impl(u, pos, t, norme_u, dh, nu, reynolds, K_, coeff_ortho, coeff_long, u_l, v_valeur, lambda);
55}
56
57/////////////////////////////////////////////////
58
59Implemente_instanciable(Perte_Charge_Anisotrope_PolyMAC_HFV_Face, "Perte_Charge_Anisotrope_Face_PolyMAC_HFV|Perte_Charge_Anisotrope_Face_PolyMAC_MPFA", Perte_Charge_PolyMAC_HFV);
60
62
64{
66 if (v->nb_comp() != dimension)
67 {
68 Cerr << "Il faut definir le champ direction a " << dimension << " composantes" << finl;
70 }
71 return s;
72}
73
75{
77 param.ajouter_non_std("lambda_ortho", (this), Param::REQUIRED);
78 param.ajouter("direction", &v, Param::REQUIRED);
79}
80
82{
83 if (mot == "lambda_ortho")
84 return lire_motcle_non_standard_impl(mot, is);
85 else
87}
88
89void Perte_Charge_Anisotrope_PolyMAC_HFV_Face::coeffs_perte_charge(const DoubleVect& u, const DoubleVect& pos, double t, double norme_u,
90 double dh, double nu, double reynolds, double& coeff_ortho,
91 double& coeff_long, double& u_l, DoubleVect& v_valeur) const
92{
93 coeffs_perte_charge_impl(u, pos, t, norme_u, dh, nu, reynolds, K_, coeff_ortho, coeff_long, u_l, v_valeur, lambda);
94}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
virtual void set_param(Param &) const
Definition Objet_U.h:135
virtual int lire_motcle_non_standard(const Motcle &motlu, Entree &is)
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
Definition Objet_U.cpp:115
static int dimension
Definition Objet_U.h:99
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
void coeffs_perte_charge_impl(const DoubleVect &, const DoubleVect &, double, double, double, double, double, double, double &, double &, double &, DoubleVect &, Parser_U &) const
Implemente le calcul effectif de la perte de charge pour un lieu donne.
int lire_motcle_non_standard_impl(const Motcle &, Entree &)
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
Perte de charge anisotrope (selon un vecteur unitaire v et dans le plan orthogonal a ce vecteur).
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 coeffs_perte_charge(const DoubleVect &, const DoubleVect &, double, double, double, double, double, double &, double &, double &, DoubleVect &) const override
Implemente le calcul effectif de la perte de charge pour un lieu donne.
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 coeffs_perte_charge(const DoubleVect &, const DoubleVect &, double, double, double, double, double, double &, double &, double &, DoubleVect &) const override
Appele pour chaque face par ajouter().
Factorise les fonctionnalites de plusieurs pertes de charge en VEF, vitesse aux faces.
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