TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_Thermal_Multiple_Subresolutions.cpp
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#include <IJK_Thermal_Multiple_Subresolutions.h>
17#include <Param.h>
18#include <IJK_Navier_Stokes_tools.h>
19#include <DebogIJK.h>
20
21#include <Probleme_FTD_IJK.h>
22#include <Corrige_flux_FT_base.h>
23#include <OpConvDiscQuickIJKScalar.h>
24
25Implemente_instanciable_sans_constructeur( IJK_Thermal_Multiple_Subresolutions, "IJK_Thermal_Multiple_Subresolutions", IJK_Thermal_Subresolution ) ;
26
27IJK_Thermal_Multiple_Subresolutions::IJK_Thermal_Multiple_Subresolutions() {}
28
30{
32 return os;
33}
34
36{
38 /*
39 * The main phase is called liquid because it is mainly used in bubbly flows
40 * It will directly influence which phase uses the temperature_ field attribute.
41 * Correction of temperature_ and temperature_vap_ may be different
42 */
43 if (main_phase_)
44 {
46 uniform_alpha_vap_ = lambda_vapour_ / (ref_ijk_ft_->milieu_ijk().get_rho_vapour() * cp_vapour_);
47 }
48 else
49 {
52 uniform_alpha_vap_ = lambda_liquid_ / (ref_ijk_ft_->milieu_ijk().get_rho_liquid() * cp_liquid_);
53 uniform_alpha_ = lambda_vapour_ / (ref_ijk_ft_->milieu_ijk().get_rho_vapour() * cp_vapour_);
54 }
55 return is;
56}
57
59{
60 param.ajouter_flag("main_phase_", &main_phase_);
61}
62
64{
65 Cout << que_suis_je() << "::initialize()" << finl;
66
68
69 temperature_vapour_.allocate(splitting, Domaine_IJK::ELEM, 2);
70
72
73 Cout << "End of " << que_suis_je() << "::initialize()" << finl;
74}
75
80
82{
83 if (!ghost_fluid_)
84 {
86 {
87 const int ni = temperature_vapour_.ni();
88 const int nj = temperature_vapour_.nj();
89 const int nk = temperature_vapour_.nk();
90 for (int k = 0; k < nk; k++)
91 for (int j = 0; j < nj; j++)
92 for (int i = 0; i < ni; i++)
93 {
94 const double indic = ref_ijk_ft_->get_interface().I(i,j,k);
95 if (std::fabs(1.-indic)>1.e-8) // Mixed cells and pure vapour cells
96 { temperature_vapour_(i,j,k) = 0; }
97 }
98 }
99// TODO: Temperature sub-resolution
100// else
101// {
102//
103// }
104 }
105}
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
void initialize(const Domaine_IJK &splitting) override
void initialize(const Domaine_IJK &splitting) override
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter_flag(const char *keyword, const bool *value)
Register a boolean flag whose mere presence switches it to true.
Definition Param.cpp:474
Classe de base des flux de sortie.
Definition Sortie.h:52