TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Eval_Diff_K_Eps_Bas_Re_VDF_var.h
1/****************************************************************************
2* Copyright (c) 2019, 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_Bas_Re_VDF_var_included
17#define Eval_Diff_K_Eps_Bas_Re_VDF_var_included
18
19#include <Eval_Diff_VDF.h>
20#include <TRUST_Ref.h>
21#include <K_Omega_Eps_constants.h>
22
23class Champ_Fonc_base;
24class Champ_Uniforme;
25
27{
28public:
29 Eval_Diff_K_Eps_Bas_Re_VDF_var(double Sigma_K = SIGMA_K_KEPS , double Sigma_Eps =SIGMA_EPS_KEPS ) : Sigma_K_(Sigma_K) , Sigma_Eps_(Sigma_Eps)
30 {
31 Sigma_[0]=Sigma_K;
32 Sigma_[1]=Sigma_Eps;
33 }
34
35 inline void associer_diff_turb(const Champ_Fonc_base& diffu) { diffusivite_turbulente_ = diffu; }
36 inline const Champ_Fonc_base& diffusivite_turbulente() const { return diffusivite_turbulente_.valeur(); }
37 inline void mettre_a_jour() override { dv_diffusivite_turbulente.ref(diffusivite_turbulente_->valeurs()); }
38
39 // pour CRTP
40 inline double nu_1_impl(int i, int compo) const
41 {
43 }
44
45 inline double compute_heq_impl(double d0, int i, double d1, int j, int compo) const
46 {
47 return 0.5*(nu_1_impl(i,compo) + nu_1_impl(j,compo))/(d0+d1);
48 }
49
50protected:
52 OBS_PTR(Champ_Fonc_base) diffusivite_turbulente_;
54};
55
56#endif /* Eval_Diff_K_Eps_Bas_Re_VDF_var_included */
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Champ_Uniforme Represents a field that is constant in space and time.
Eval_Diff_K_Eps_Bas_Re_VDF_var(double Sigma_K=SIGMA_K_KEPS, double Sigma_Eps=SIGMA_EPS_KEPS)
double compute_heq_impl(double d0, int i, double d1, int j, int compo) const
double nu_1_impl(int i, int compo) const
OBS_PTR(Champ_Fonc_base) diffusivite_turbulente_
const Champ_Fonc_base & diffusivite_turbulente() const
void associer_diff_turb(const Champ_Fonc_base &diffu)
DoubleTab tab_diffusivite_