TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_global_impose_turbulent.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 <Echange_global_impose_turbulent.h>
17#include <Probleme_base.h>
18#include <Domaine_VF.h>
19#include <Frontiere.h>
20#include <Motcle.h>
21#include <math.h>
22
23Implemente_base(Echange_global_impose_turbulent,"Echange_global_impose_turbulent",Echange_global_impose);
24
26
28{
29 h_imp_.typer("Champ_front_vide");
30 le_champ_front.typer("Champ_front_vide");
31 return s;
32}
33
35{
36 int nf = la_frontiere_dis->frontiere().nb_faces(), f1 = la_frontiere_dis->frontiere().num_premiere_face();
37 int N = tab.line_size();
38
39 for (int f =0 ; f < nf ; f++)
40 for (int n = 0 ; n<N ; n++)
41 tab(f + f1, n) |= 1;
42}
43
45{
46 Motcle dom_app=eqn.domaine_application();
47 Motcle Turbulence="Turbulence";
48
49 if (dom_app==Turbulence)
50 return 1;
51 else err_pas_compatible(eqn);
52 return 0;
53}
54
56{
57 if (mon_temps!=tps) {me_calculer() ; mon_temps=tps;}
58}
59
61{
62 h_.resize(0,domaine_Cl_dis().equation().inconnue().valeurs().line_size());
63 la_frontiere_dis->frontiere().creer_tableau_faces(h_);
64
65 h_grad_.resize(0,domaine_Cl_dis().equation().inconnue().valeurs().line_size());
66 la_frontiere_dis->frontiere().creer_tableau_faces(h_grad_);
67
68 T_.resize(0,domaine_Cl_dis().equation().inconnue().valeurs().line_size());
69 la_frontiere_dis->frontiere().creer_tableau_faces(T_);
70
71 correlation_loi_paroi_ = domaine_Cl_dis().equation().probleme().get_correlation("Loi_paroi");
72
73 return 1;
74}
void err_pas_compatible(const Equation_base &) const
Cette methode est appelee quand la condition aux limites n'est pas compatible avec l'equation sur laq...
Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limites discretisee dont l'objet fait partie.
Classe Echange_global_impose_turbulent.
virtual int initialiser(double temps) override
Initialisation en debut de calcul.
int compatible_avec_eqn(const Equation_base &) const override
virtual void liste_faces_loi_paroi(IntTab &) override
void mettre_a_jour(double tps) override
Effectue une mise a jour en temps de la condition aux limites.
Classe Echange_global_impose Cette classe represente le cas particulier de la classe.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
virtual const Motcle & domaine_application() const
Renvoie "indetermine" Navier_Stokes_standard par exemple surcharge cette methode.
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
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
const Correlation_base & get_correlation(std::string nom_correlation) const
Classe de base des flux de sortie.
Definition Sortie.h:52
int line_size() const
Definition TRUSTVect.tpp:67