TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Modele_turbulence_scal_null.cpp
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#include <Modele_turbulence_scal_null.h>
17#include <Modele_turbulence_hyd_null.h>
18#include <Convection_Diffusion_std.h>
19#include <Discretisation_base.h>
20#include <Probleme_base.h>
21
22Implemente_instanciable(Modele_turbulence_scal_null, "Modele_turbulence_scal_null", Modele_turbulence_scal_base);
23// XD modele_turbulence_scal_null modele_turbulence_scal_base null INHERITS_BRACE Null scalar turbulence model
24// XD_CONT (turbulent diffusivity = 0) which can be used with a turbulent problem.
25// XD attr turbulence_paroi suppress_param turbulence_paroi OPT del
26
28{
29 return s << que_suis_je() << " " << le_nom();
30}
31
33{
34 // Creation of a null wall law:
35 const Nom& discr = mon_equation_->discretisation().que_suis_je();
36 const Probleme_base& le_pb = mon_equation_->probleme();
37 // lp wall law of the hydraulic turbulence model
38 const RefObjU& modele_turbulence = le_pb.equation(0).get_modele(TURBULENCE);
39 const Modele_turbulence_hyd_base& mod_turb_hydr = ref_cast(Modele_turbulence_hyd_base, modele_turbulence.valeur());
40 if (!sub_type(Modele_turbulence_hyd_null, mod_turb_hydr))
41 {
42 Cerr << "Error in Modele_turbulence_scal_null::readOn !!!" << finl;
43 Cerr << "You use a Null turbulence model for the scalar equation " << mon_equation_->que_suis_je() << " together with a non Null turbulence model for " << le_pb.equation(0).que_suis_je() << finl;
44 Cerr << "This is impossible !!! Replace the model " << mod_turb_hydr.que_suis_je() << " by the Null model !!!" << finl;
46 }
47
48 if (discr == "VEF" || discr == "VEFPreP1B") loipar_.typer("negligeable_scalaire_VEF");
49 else if (discr == "VDF") loipar_.typer("negligeable_scalaire_VDF");
50 else if (discr == "EF") loipar_.typer("negligeable_scalaire_EF");
51 else
52 {
53 Cerr << "Error in Modele_turbulence_scal_null::readOn: the discretization " << discr << " is not supported" << finl;
55 }
56 loipar_->associer_modele(*this);
57 loipar_->associer(le_pb.equation(0).domaine_dis(), le_pb.equation(0).domaine_Cl_dis());
58
59 // Not willing to debug XDATA ... penalizing everyone instead
60 Param param(que_suis_je());
61 param.lire_avec_accolades_depuis(is);
62 return is;
63}
64
65
66
67
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual const RefObjU & get_modele(Type_modele type) const
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Base class for scalar turbulence models coupled to a Navier-Stokes convection-diffusion equation.
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 const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition Objet_U.cpp:317
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
virtual const Equation_base & equation(int) const =0
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
const Objet_U & valeur() const
Definition TRUST_Ref.h:134