TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Y_plus_Champ_Face.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_hyd_base.h>
17#include <Y_plus_Champ_Face.h>
18#include <Champ_Face_VDF.h>
19#include <Domaine_Cl_VDF.h>
20#include <Equation_base.h>
21#include <Milieu_base.h>
22
23Implemente_instanciable(Y_plus_Champ_Face, "Y_plus_Champ_Face", Champ_Fonc_P0_VDF);
24
25Sortie& Y_plus_Champ_Face::printOn(Sortie& s) const { return s << que_suis_je() << " " << le_nom(); }
26
28
30{
31 mon_champ_ = un_champ;
32}
33
35{
36 const Nom& nom_eq = mon_champ().equation().que_suis_je();
37 const Milieu_base& mil = mon_champ().equation().milieu(); // returns Fluide_Diphasique or Fluide_Incompressible
38
39 if (nom_eq == "Navier_Stokes_FT_Disc" && mil.que_suis_je() == "Fluide_Diphasique")
40 {
41 const RefObjU& modele_turbulence = mon_champ().equation().get_modele(TURBULENCE);
42 const Modele_turbulence_hyd_base& mod_turb = ref_cast(Modele_turbulence_hyd_base, modele_turbulence.valeur());
43 if (mod_turb.loi_paroi().que_suis_je() == "loi_standard_hydr_diphasique_VDF")
44 mon_champ_->calcul_y_plus_diphasique(valeurs(), le_dom_Cl_VDF.valeur());
45 }
46 else
47 mon_champ_->calcul_y_plus(valeurs(), le_dom_Cl_VDF.valeur());
48}
49
51{
52 return le_dom_Cl_VDF.valeur();
53}
54
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
class Champ_Face_VDF
class Champ_Fonc_P0_VDF
void mettre_a_jour(double temps) override
Time update of the field.
virtual double changer_temps(const double t)
Sets the time at which the field is defined.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual const Milieu_base & milieu() const =0
virtual const RefObjU & get_modele(Type_modele type) const
const Nom & le_nom() const override
Returns the name of the field.
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
Base class for the turbulence model hierarchy for Navier-Stokes equations.
const Turbulence_paroi_base & loi_paroi() const
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
Definition MorEqn.h:62
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
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
Base class for output streams.
Definition Sortie.h:52
const Objet_U & valeur() const
Definition TRUST_Ref.h:134
class Y_plus_Champ_Face
void me_calculer(double) override
const Domaine_Cl_dis_base & domaine_Cl_dis_base() const
void mettre_a_jour(double) override
Time update of the field.
const Champ_Face_VDF & mon_champ() const
void associer_champ(const Champ_Face_VDF &)