TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Navier_Stokes_Turbulent.h
1/****************************************************************************
2* Copyright (c) 2026, 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 Navier_Stokes_Turbulent_included
17#define Navier_Stokes_Turbulent_included
18
19#include <Modele_turbulence_hyd_base.h>
20#include <Navier_Stokes_std.h>
21#include <YAML_data.h>
22
23
24/*! @brief Navier-Stokes equation for a viscous incompressible fluid (div U = 0) with turbulence modelling.
25 *
26 * Contains an OWN_PTR(Modele_turbulence_hyd_base) member representing the turbulence model.
27 *
28 * @sa Navier_Stokes_std OWN_PTR(Modele_turbulence_hyd_base) Pb_Hydraulique_Turbulent, Pb_Thermohydraulique_Turbulent
29 */
31{
32 Declare_instanciable(Navier_Stokes_Turbulent);
33
34public:
35 void set_param(Param& titi) const override;
36 int lire_motcle_non_standard(const Motcle&, Entree&) override;
37 inline const Champ_Fonc_base& viscosite_turbulente() const { return le_modele_turbulence->viscosite_turbulente(); }
38 inline const Modele_turbulence_hyd_base& modele_turbulence() const { return le_modele_turbulence.valeur(); }
39 std::vector<YAML_data> data_a_sauvegarder() const override;
40 int sauvegarder(Sortie&) const override;
41 int reprendre(Entree&) override;
42 int preparer_calcul() override;
43 bool initTimeStep(double dt) override;
44 void mettre_a_jour(double) override;
45 void completer() override;
46 const Champ_Don_base& diffusivite_pour_transport() const override;
47 const Champ_base& diffusivite_pour_pas_de_temps() const override;
48
49 void creer_champ(const Motcle& motlu) override;
50 const Champ_base& get_champ(const Motcle& nom) const override;
51 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const override;
52 bool has_champ(const Motcle& nom) const override;
53 void get_noms_champs_postraitables(Noms& nom, Option opt = NONE) const override;
54
55 void imprimer(Sortie&) const override;
56 const RefObjU& get_modele(Type_modele type) const override;
57 void imprime_residu(SFichier&) override;
58 Nom expression_residu() override;
59
60protected:
62 OWN_PTR(Modele_turbulence_hyd_base) le_modele_turbulence;
63
64private:
65 int typer_lire_mod_turb_hyd(Entree& s);
66};
67
68#endif /* Navier_Stokes_Turbulent_included */
class Champ_Don_base base class of Given Fields (not calculated)
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Base class for the turbulence model hierarchy for Navier-Stokes equations.
A character string (Nom) in uppercase.
Definition Motcle.h:26
Navier-Stokes equation for a viscous incompressible fluid (div U = 0) with turbulence modelling.
std::vector< YAML_data > data_a_sauvegarder() const override
for PDI IO: retrieve name, type and dimensions of the fields to save/restore
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
const Champ_base & diffusivite_pour_pas_de_temps() const override
const Champ_base & get_champ(const Motcle &nom) const override
void mettre_a_jour(double) override
Performs a time update of the equation.
int sauvegarder(Sortie &) const override
Saves the equation (and its turbulence model) to an output stream.
int preparer_calcul() override
Prepares the computation.
const Champ_Don_base & diffusivite_pour_transport() const override
const Modele_turbulence_hyd_base & modele_turbulence() const
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
int reprendre(Entree &) override
Restores the equation and its turbulence model from an input stream.
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
void imprime_residu(SFichier &) override
void set_param(Param &titi) const override
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void completer() override
Successive calls to: Navier_Stokes_std::completer().
const Champ_Fonc_base & viscosite_turbulente() const
const RefObjU & get_modele(Type_modele type) const override
void creer_champ(const Motcle &motlu) override
void imprimer(Sortie &) const override
Prints the equation operators if the time scheme indicates it is necessary.
Entree & lire_op_diff_turbulent(Entree &is)
OWN_PTR(Modele_turbulence_hyd_base) le_modele_turbulence
OBS_PTR(Fluide_base) le_fluide
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
Base class for output streams.
Definition Sortie.h:52