TrioCFD 1.9.9_beta
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
This method is called when the boundary condition is not compatible with the equation on which we try...
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
Base class for turbulent boundary conditions of type Echange_global_impose.
virtual int initialiser(double temps) override
Initialization at the beginning of the calculation.
int compatible_avec_eqn(const Equation_base &) const override
virtual void liste_faces_loi_paroi(IntTab &) override
void mettre_a_jour(double tps) override
Performs a time update of the boundary condition.
Classe Echange_global_impose This class represents the special case of the class.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Equation_base The role of an equation is the calculation of one or more fields....
Probleme_base & probleme()
Returns the problem associated with the equation.
virtual const Motcle & domaine_application() const
Returns "indeterminate" Navier_Stokes_standard for example overrides this method.
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
Definition MorEqn.h:62
A character string (Nom) in uppercase.
Definition Motcle.h:26
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
const Correlation_base & get_correlation(std::string nom_correlation) const
Base class for output streams.
Definition Sortie.h:52
int line_size() const
Definition TRUSTVect.tpp:67