TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Paroi_Knudsen_non_negligeable.cpp
1/****************************************************************************
2* Copyright (c) 2024, 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 <Paroi_Knudsen_non_negligeable.h>
17#include <Champ_front_fonc_gradient.h>
18#include <Discretisation_base.h>
19
20Implemente_instanciable(Paroi_Knudsen_non_negligeable, "Paroi_Knudsen_non_negligeable", Dirichlet_paroi_defilante);
21// XD paroi_knudsen_non_negligeable dirichlet paroi_knudsen_non_negligeable INHERITS_BRACE Boundary condition for number
22// XD_CONT of Knudsen (Kn) above 0.001 where slip-flow condition appears: the velocity near the wall depends on the
23// XD_CONT shear stress : Kn=l/L with l is the mean-free-path of the molecules and L a characteristic length scale. NL2
24// XD_CONT U(y=0)-Uwall=k(dU/dY) NL2 Where k is a coefficient given by several laws: NL2 Mawxell : k=(2-s)*l/s NL2
25// XD_CONT Bestok\&Karniadakis :k=(2-s)/s*L*Kn/(1+Kn) NL2 Xue\&Fan :k=(2-s)/s*L*tanh(Kn) NL2 s is a value between 0 and
26// XD_CONT 2 named accomodation coefficient. s=1 seems a good value. NL2 Warning : The keyword is available for VDF
27// XD_CONT calculation only for the moment.
28// XD attr name_champ_1 chaine(into=["vitesse_paroi","k"]) name_champ_1 REQ Field name.
29// XD attr champ_1 front_field_base champ_1 REQ Boundary field type.
30// XD attr name_champ_2 chaine(into=["vitesse_paroi","k"]) name_champ_2 REQ Field name.
31// XD attr champ_2 front_field_base champ_2 REQ Boundary field type.
32
33
34Sortie& Paroi_Knudsen_non_negligeable::printOn(Sortie& s) const { return s << que_suis_je() << finl; }
35
37{
38 if (app_domains.size() == 0) app_domains = { Motcle("Hydraulique"), Motcle("indetermine") };
39
40 Cerr << "Paroi_Knudsen_non_negligeable::readOn" << finl;
41 Motcle mot;
42 Motcles les_motcles(3);
43 {
44 les_motcles[0] = "vitesse_paroi";
45 les_motcles[1] = "k";
46 }
47 int nb_champs_lus = 0;
48 while (nb_champs_lus < 2)
49 {
50 s >> mot;
51 int rang = les_motcles.search(mot);
52 if (rang == 0)
53 s >> vitesse_paroi_;
54 if (rang == 1)
55 s >> k_;
56 nb_champs_lus++;
57 }
58
59 le_champ_front.typer("Champ_front_fonc_gradient");
60 le_champ_front->fixer_nb_comp(dimension);
61 return s;
62}
63
65{
66 Cerr << "Paroi_Knudsen_non_negligeable::completer" << finl;
67 Nom type = "Champ_front_fonc_gradient_";
69 // Typage definitif en fonction de la discretisation
70 Frontiere_dis_base& fr = le_champ_front->frontiere_dis();
71 le_champ_front.typer(type);
72 le_champ_front->associer_fr_dis_base(fr);
73 // Paroi defilante : le champ_front est la vitesse de nombre
74 // de composantes la dimension du pb ... Est ce utile de dimensionner
75 // maintenant cela ?
76 le_champ_front->fixer_nb_comp(dimension);
77 // On associe l'inconnue:
78 Champ_front_fonc_gradient& ch = ref_cast(Champ_front_fonc_gradient, le_champ_front.valeur());
79 ch.associer_ch_inc_base(domaine_Cl_dis().equation().inconnue());
80 Cerr << "Paroi_Knudsen_non_negligeable::completer OK" << finl;
81}
class Champ_front_fonc_gradient
void associer_ch_inc_base(const Champ_Inc_base &)
Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limites discretisee dont l'objet fait partie.
std::vector< Motcle > app_domains
classe Dirichlet_paroi_defilante Impose la vitesse de paroi dnas une equation de type Navier_Stokes.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Discretisation_base & discretisation() const
Renvoie la discretisation associee a l'equation.
classe Frontiere_dis_base Classe representant une frontiere discretisee.
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
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
classe Paroi_Knudsen_non_negligeable Impose un saut de vitesse de paroi dans une equation de type Nav...
void completer() override
NE FAIT RIEN A surcharger dans les classes derivees.
Classe de base des flux de sortie.
Definition Sortie.h:52