TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Eval_Diff_K_Omega_VDF.h
1/****************************************************************************
2* Copyright (c) 2023, 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#ifndef Eval_Diff_K_Omega_VDF_included
17#define Eval_Diff_K_Omega_VDF_included
18
19#include <Champ_Fonc_base.h>
20#include <Champ_Uniforme.h>
21#include <Champ_base.h>
22#include <TRUST_Ref.h>
23#include <K_Omega_Eps_constants.h>
24
26{
27public:
29
30 Eval_Diff_K_Omega_VDF(double Sigma_K = SIGMA_K, double Sigma_Omega = SIGMA_OMEGA ) : Sigma_K_(Sigma_K) , Sigma_Omega_(Sigma_Omega), db_diffusivite_(-123.)
31 {
32 Sigma_[0]=Sigma_K;
33 Sigma_[1]=Sigma_Omega;
34 Sigma_K_Omega_SST_.resize(2,2);
35 }
36
37 inline void associer_diff_turb(const Champ_Fonc_base& diffu) { diffusivite_turbulente_ = diffu; }
38
39 inline void associer_mvolumique(const Champ_base& mvol)
40 {
41 masse_volumique_ = mvol;
42 dv_mvol_.ref(mvol.valeurs());
43 }
44
45 inline void associer_Sigma_K_Omega(double Sigma_K,double Sigma_Omega)
46 {
47 Sigma_K_ = Sigma_K;
48 Sigma_Omega_ = Sigma_Omega;
49 Sigma_[0] = Sigma_K;
50 Sigma_[1] = Sigma_Omega;
51 }
52 inline void associer_Sigma_K_Omega_SST(double Sigma_K1, double Sigma_K2, double Sigma_Omega1, double Sigma_Omega2)
53 {
54 Sigma_K_Omega_SST_(0,0) = Sigma_K1;
55 Sigma_K_Omega_SST_(0,1) = Sigma_K2;
56 Sigma_K_Omega_SST_(1,0) = Sigma_Omega1;
57 Sigma_K_Omega_SST_(1,1) = Sigma_Omega2;
58 }
59 inline void associer(const Champ_base& diffu)
60 {
61 diffusivite_ = diffu;
62 if (sub_type(Champ_Uniforme, diffu)) db_diffusivite_ = diffu.valeurs()(0,0);
63 }
64
65 inline void associer_tab_F1(const DoubleTab& tabF1)
66 {
67 tab_F1_.ref(tabF1);
68 }
70 inline void initialize_tab_F1(const int nb_elem_tot)
71 {
72 tab_F1_.resize(nb_elem_tot);
73 tab_F1_=1;
74 }
75
76 inline virtual void mettre_a_jour()
77 {
78 dv_diffusivite_turbulente_.ref(diffusivite_turbulente_->valeurs());
79 if (sub_type(Champ_Uniforme, diffusivite_.valeur())) db_diffusivite_ = diffusivite_->valeurs()(0,0);
80 }
81
82 inline const Champ_Fonc_base& diffusivite_turbulente() const { return diffusivite_turbulente_.valeur(); }
83 inline const Champ_base& diffusivite() const { return diffusivite_.valeur(); }
84
85 // Pour CRTP !
86 inline int get_ind_Fluctu_Term() const { throw; }
87 inline double get_equivalent_distance(int boundary_index,int local_face) const { throw; }
88 inline double get_dv_mvol(const int i) const { return dv_mvol_[i]; }
89
90protected:
94 DoubleTab tab_F1_;
96 OBS_PTR(Champ_Fonc_base) diffusivite_turbulente_;
97 OBS_PTR(Champ_base) masse_volumique_, diffusivite_;
98};
99
100#endif /* Eval_Diff_K_Omega_VDF_included */
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
virtual DoubleTab & valeurs()=0
classe Champ_Uniforme Represente un champ constant dans l'espace et dans le temps.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
double get_dv_mvol(const int i) const
void associer(const Champ_base &diffu)
const Champ_base & diffusivite() const
const Champ_Fonc_base & diffusivite_turbulente() const
void associer_diff_turb(const Champ_Fonc_base &diffu)
void associer_tab_F1(const DoubleTab &tabF1)
void associer_Sigma_K_Omega(double Sigma_K, double Sigma_Omega)
OBS_PTR(Champ_Fonc_base) diffusivite_turbulente_
Eval_Diff_K_Omega_VDF(double Sigma_K=SIGMA_K, double Sigma_Omega=SIGMA_OMEGA)
void associer_mvolumique(const Champ_base &mvol)
double get_equivalent_distance(int boundary_index, int local_face) const
void initialize_tab_F1(const int nb_elem_tot)
void associer_Sigma_K_Omega_SST(double Sigma_K1, double Sigma_K2, double Sigma_Omega1, double Sigma_Omega2)