TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Paroi_std_hyd_VDF.h
1/****************************************************************************
2* Copyright (c) 2017, 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
17
18#ifndef Paroi_std_hyd_VDF_included
19#define Paroi_std_hyd_VDF_included
20
21#include <Paroi_hyd_base_VDF.h>
22#include <Paroi_log_QDM.h>
23#include <Modele_turbulence_hyd_K_Omega.h>
24
25
26class Champ_Fonc_base;
27class Param;
28
29/*! @brief CLASS: Paroi_std_hyd_VDF
30 *
31 * .SECTION voir aussi
32 * Turbulence_paroi_base
33 *
34 */
36{
37 Declare_instanciable(Paroi_std_hyd_VDF);
38
39public:
40
41 void set_param(Param& param) const override;
42 int init_lois_paroi() override;
43 int calculer_hyd(DoubleTab& ) override; // for K_Epsilon model
44 int calculer_hyd_BiK(DoubleTab&, DoubleTab& ) override; // for K_Epsilon model, splitted version
45 int calculer_hyd(DoubleTab&, DoubleTab& ) override; // for K_Epsilon model
46 int calculer_hyd(DoubleTab&, int isKeps, DoubleTab& ); // for K_Epsilon model
47 int compute_law_komega(DoubleTab&); // for K_Omega model
48 inline const DoubleVect& tab_u_plus() const { return uplus_; }
49 inline double tau_tang(int face, int k) const;
50 void imprimer_ustar(Sortie& ) const override;
51 void calculer_uplus_dplus(DoubleVect&, DoubleVect&, DoubleVect&, int, double, double, double ) ;
52 inline void check_turbulence_model();
53
54protected:
55 DoubleVect uplus_;
56
57 double coeff_omega_wall_=1.; // coefficient for the wall law for k_omega
58
59 virtual int init_lois_paroi_hydraulique();
60 virtual int preparer_calcul_hyd(DoubleTab&);
61
62 // = K_Omega model functions
63 virtual int initialize_wall_law_komega(DoubleTab&);
64 int compute_layer_selection(double, double, DoubleTab&, double, double, int, int);
65 int compute_viscous_layer(DoubleTab& field_komega, double dist_y, double viscosity, int elem);
66 int compute_buffer_layer(DoubleTab&, double, double, int, int);
67 int compute_log_layer(DoubleTab&, double, int, int);
68 void set_yplus_komega();
69
70 // = Viscous sub-layer
71 int calculer_u_star_sous_couche_visq(double, double, double, int);
72 double calculer_u_star_sous_couche_visq(double, double, double);
73 int calculer_sous_couche_visq(DoubleTab&, double, int, double, int);
74 int calculer_sous_couche_visq(DoubleTab&, DoubleTab&, int);
75
76 // = Buffer layer
77 int calculer_u_star_sous_couche_tampon(double&, double, double, double, int);
78 double calculer_u_star_sous_couche_tampon(double, double, double, double&);
79 int calculer_sous_couche_tampon(DoubleTab&, double, double, int, int);
80 int calculer_sous_couche_tampon(DoubleTab&, DoubleTab&, double, double, int, int);
81
82 // = Inertial sub-layer
83 int calculer_u_star_sous_couche_log(double, double, double, int);
84 virtual double calculer_u_star(double&, double&, double&);
85 int calculer_sous_couche_log(DoubleTab&, double, int, int);
86 int calculer_sous_couche_log(DoubleTab&, DoubleTab&, double, int, int);
87
88 // Identify in which part of the boundary layer we are
89 int calculer_local(double, double, DoubleTab&, double, double, int, int); // k-eps version
90 int calculer_local(double, double, DoubleTab&, DoubleTab&, double, double, int, int); // nu_t, tab_k
91 double calculer_local(double, double, double, double, int&, double&);
92
93 void calculer_moyennes_parois(double&, double&, double&, double&, double&, double&);
94 void modifs_valeurs_turb(int, int, double, double, double, double, DoubleTab&, DoubleTab&);
95
96 // Constant
97 static constexpr double BETA_OMEGA {0.075};
98 static constexpr double BETA_K {0.09}; // equals to Cmu
99 static constexpr double BETA1 {0.075};
100 const double Cmu025 {std::pow(0.09, 0.25)}; // Cmu to the power 0.25
101 const double sCmu {std::sqrt(0.09)}; // Square root of Cmu
102 double ypluslam {0};
103 int blended_ {0};
104 int turbulence_model_type_ {0}; // To redirect the computation of the wall quantities. 0:K-Eps, 1:K-Omega
105};
106
107/*! @brief Returns an integer value depending on the turbulence model.
108 *
109 */
111{
112 if (sub_type(Modele_turbulence_hyd_K_Omega, mon_modele_turb_hyd.valeur()))
114}
115
116inline double Paroi_std_hyd_VDF::tau_tang(int face, int k) const
117{
118 if(face >= Cisaillement_paroi_.dimension(0))
119 face -= le_dom_dis_->nb_faces_internes();
120
121 if(face >= Cisaillement_paroi_.dimension_tot(0))
122 {
123 Cerr << "Erreur dans tau_tang " << finl;
124 Cerr << "dimension : " << Cisaillement_paroi_.dimension(0) << finl;
125 Cerr << "dimension_tot : " << Cisaillement_paroi_.dimension_tot(0) << finl;
126 Cerr << "face : " << face << finl;
128 }
129 return Cisaillement_paroi_(face, k);
130}
131
132/*! @brief cette classe permet de specifier des options a la loi de paroi standard.
133 *
134 * Elle est reservee aux experts.
135 *
136 */
138{
139 Declare_instanciable(Loi_expert_hydr_VDF);
140};
141#endif
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
cette classe permet de specifier des options a la loi de paroi standard.
Classe Modele_turbulence_hyd_K_Omega Cette classe represente le modele de turbulence (k,...
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Paroi_log_QDM()=default
CLASS: Paroi_std_hyd_VDF.
int calculer_u_star_sous_couche_visq(double, double, double, int)
int compute_buffer_layer(DoubleTab &, double, double, int, int)
int calculer_u_star_sous_couche_log(double, double, double, int)
virtual int initialize_wall_law_komega(DoubleTab &)
int calculer_local(double, double, DoubleTab &, double, double, int, int)
static constexpr double BETA_K
const DoubleVect & tab_u_plus() const
int init_lois_paroi() override
void calculer_moyennes_parois(double &, double &, double &, double &, double &, double &)
virtual double calculer_u_star(double &, double &, double &)
int calculer_sous_couche_tampon(DoubleTab &, double, double, int, int)
int compute_law_komega(DoubleTab &)
void imprimer_ustar(Sortie &) const override
int compute_viscous_layer(DoubleTab &field_komega, double dist_y, double viscosity, int elem)
virtual int preparer_calcul_hyd(DoubleTab &)
static constexpr double BETA1
void check_turbulence_model()
Returns an integer value depending on the turbulence model.
int calculer_sous_couche_visq(DoubleTab &, double, int, double, int)
double tau_tang(int face, int k) const
int calculer_hyd_BiK(DoubleTab &, DoubleTab &) override
void modifs_valeurs_turb(int, int, double, double, double, double, DoubleTab &, DoubleTab &)
virtual int init_lois_paroi_hydraulique()
void calculer_uplus_dplus(DoubleVect &, DoubleVect &, DoubleVect &, int, double, double, double)
void set_param(Param &param) const override
int calculer_u_star_sous_couche_tampon(double &, double, double, double, int)
int compute_log_layer(DoubleTab &, double, int, int)
static constexpr double BETA_OMEGA
int calculer_sous_couche_log(DoubleTab &, double, int, int)
int compute_layer_selection(double, double, DoubleTab &, double, double, int, int)
int calculer_hyd(DoubleTab &) override
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