TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Viscosite_turbulente_WIT.cpp
1/****************************************************************************
2* Copyright (c) 2021, 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#include <Viscosite_turbulente_WIT.h>
17#include <Param.h>
18#include <Probleme_base.h>
19#include <Champ_base.h>
20#include <TRUSTTab_parts.h>
21
22Implemente_instanciable(Viscosite_turbulente_WIT, "Viscosite_turbulente_WIT", Viscosite_turbulente_base);
23
25{
26 return os;
27}
28
30{
31 Param param(que_suis_je());
32 param.ajouter("limiter|limiteur", &limiter_);
33 param.lire_avec_accolades_depuis(is);
34 return is;
35}
36
38{
39 nu_t = 0; // no eddy viscosity here ; use ggdh for diffusion
40}
41
42void Viscosite_turbulente_WIT::reynolds_stress(DoubleTab& R_ij) const // Renvoie <u_i'u_j'>
43{
44 const DoubleTab& tab_k_WIT = pb_->get_champ("k_WIT").passe();
45
46 const int D = dimension;
47 const int N = R_ij.dimension(1);
48 if (N != 2)
49 Process::exit("WIT only works when there are 2 phases");
50
51 for (int i = 0; i < R_ij.dimension(0); i++)
52 for (int d = 0; d < D; d++)
53 for (int db = 0; db < D; db++) //on ne remplit que les phases concernees par k
54 {
55 R_ij(i, 1, d, db) = 0 ; // No WIT for gas phase
56 R_ij(i, 0, d, db) = 2./3. * (db == d ? 1 : 0) * tab_k_WIT(i, 0);
57 }
58}
59
60void Viscosite_turbulente_WIT::k_over_eps(DoubleTab& k_sur_eps) const
61{
62 k_sur_eps = 0;
63}
64
65void Viscosite_turbulente_WIT::eps(DoubleTab& eps_) const
66{
67 eps_ = 0;
68}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
static int dimension
Definition Objet_U.h:94
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52
classe Viscosite_turbulente_WIT Renvoie le tenseur de Reynolds pour une turbulence de bulles de type ...
void reynolds_stress(DoubleTab &R_ij) const override
void k_over_eps(DoubleTab &k_sur_eps) const override
void eps(DoubleTab &eps) const override
void eddy_viscosity(DoubleTab &nu_t) const override
Turbulent viscosity correlations describing the Reynolds stress tensor R_{ij} = - <u'_i u'_j>.