TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Eval_Diff_K_Eps_VDF.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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_Eps_VDF_included
17#define Eval_Diff_K_Eps_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_Eps_VDF(double Sigma_K = SIGMA_K_KEPS, double Sigma_Eps = SIGMA_EPS_KEPS ) : Sigma_K_(Sigma_K) , Sigma_Eps_(Sigma_Eps), db_diffusivite(-123.)
31 {
32 Sigma_[0]=Sigma_K;
33 Sigma_[1]=Sigma_Eps;
34 }
35
36 inline void associer_diff_turb(const Champ_Fonc_base& diffu) { diffusivite_turbulente_ = diffu; }
37
38 inline void associer_mvolumique(const Champ_base& mvol)
39 {
40 masse_volumique_ = mvol;
41 dv_mvol.ref(mvol.valeurs());
42 }
43
44 inline void associer_Pr_K_Eps(double Sigma_K,double Sigma_Eps)
45 {
46 Sigma_K_ = Sigma_K;
47 Sigma_Eps_ = Sigma_Eps;
48 Sigma_[0] = Sigma_K;
49 Sigma_[1] = Sigma_Eps;
50 }
51
52 inline void associer(const Champ_base& diffu)
53 {
54 diffusivite_ = diffu;
55 if (sub_type(Champ_Uniforme, diffu)) db_diffusivite = diffu.valeurs()(0,0);
56 }
57
58 inline virtual void mettre_a_jour()
59 {
60 dv_diffusivite_turbulente.ref(diffusivite_turbulente_->valeurs());
61 if (sub_type(Champ_Uniforme, diffusivite_.valeur())) db_diffusivite = diffusivite_->valeurs()(0,0);
62 }
63
64 inline const Champ_Fonc_base& diffusivite_turbulente() const { return diffusivite_turbulente_.valeur(); }
65 inline const Champ_base& diffusivite() const { return diffusivite_.valeur(); }
66
67 // Pour CRTP !
68 inline int get_ind_Fluctu_Term() const { throw; }
69 inline double get_equivalent_distance(int boundary_index,int local_face) const { throw; }
70 inline double get_dv_mvol(const int i) const { return dv_mvol[i]; }
71
72protected:
75 OBS_PTR(Champ_Fonc_base) diffusivite_turbulente_;
76 OBS_PTR(Champ_base) masse_volumique_, diffusivite_;
77};
78
79#endif /* Eval_Diff_K_Eps_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
Eval_Diff_K_Eps_VDF(double Sigma_K=SIGMA_K_KEPS, double Sigma_Eps=SIGMA_EPS_KEPS)
double get_dv_mvol(const int i) const
const Champ_base & diffusivite() const
OBS_PTR(Champ_Fonc_base) diffusivite_turbulente_
void associer_mvolumique(const Champ_base &mvol)
DoubleVect dv_diffusivite_turbulente
void associer_diff_turb(const Champ_Fonc_base &diffu)
virtual void mettre_a_jour()
void associer(const Champ_base &diffu)
double get_equivalent_distance(int boundary_index, int local_face) const
void associer_Pr_K_Eps(double Sigma_K, double Sigma_Eps)
const Champ_Fonc_base & diffusivite_turbulente() const