TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Eval_Dift_Multiphase_VDF.h
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#ifndef Eval_Dift_Multiphase_VDF_included
17#define Eval_Dift_Multiphase_VDF_included
18
19#include <Correlation_base.h>
20#include <Eval_Dift_VDF.h>
21#include <Pb_Multiphase.h>
22
24{
25public:
26 void associer_corr(const Correlation_base& c ) { corr_ = c; is_multi_ = 1; /* XXX */ }
27
28 inline void mettre_a_jour() override
29 {
32 }
33
34 inline void set_nut(const DoubleTab& nut, const bool need_ar) { nu_t_ = nut; need_alpha_rho_ = need_ar; }
35
36 inline virtual void update_diffusivite_turbulente() final
37 {
38 const DoubleTab& rho = ref_probleme_->milieu().masse_volumique().passe();
39 const int cR = rho.dimension(0) == 1;
41
42 if (need_alpha_rho_ && sub_type(Pb_Multiphase, ref_probleme_.valeur()))
43 {
44 for (int e = 0; e < nu_t_->dimension(0); e++)
45 for (int n = 0; n < nu_t_->dimension(1); n++)
46 tab_diffusivite_turbulente(e, n) = tab_alpha_(e, n) * rho(!cR * e, n) * nu_t_.valeur()(e, n);
47 }
48
49 tab_diffusivite_turbulente.echange_espace_virtuel();
51 }
52
60
61 const Champ_Fonc_base& diffusivite_turbulente() const { throw; }
62 const DoubleTab& tab_nu_t() const { return nu_t_.valeur(); }
63
64 void associer_diff_turb(const Champ_Fonc_base& diff_turb) { throw; }
65
66 void associer_loipar(const Turbulence_paroi_scal_base& loi_paroi) override { throw; }
67
68 // pour CRTP : TODO : appel depuis eval mere
69 inline const Correlation_base& get_corr() const { return corr_; }
70
71protected:
73 OBS_PTR(DoubleTab) nu_t_;
75};
76
77#endif /* Eval_Dift_Multiphase_VDF_included */
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
virtual void mettre_a_jour()
DoubleTab tab_alpha_
virtual void update_diffusivite_turbulente() final
void set_nut(const DoubleTab &nut, const bool need_ar)
const Correlation_base & get_corr() const
void associer_loipar(const Turbulence_paroi_scal_base &loi_paroi) override
OBS_PTR(DoubleTab) nu_t_
const DoubleTab & get_diffusivite_turbulente_multiphase() const
void associer_corr(const Correlation_base &c)
OBS_PTR(Correlation_base) corr_
const DoubleTab & tab_nu_t() const
const Champ_Fonc_base & diffusivite_turbulente() const
void associer_diff_turb(const Champ_Fonc_base &diff_turb)
DoubleTab tab_diffusivite_turbulente
classe Pb_Multiphase Cette classe represente un probleme de thermohydraulique multiphase de type "3*N...
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
Classe Turbulence_paroi_scal_base Classe de base pour la hierarchie des classes representant les mode...