TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Navier_Stokes_IBM_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_IBM_Turbulent_included
17#define Navier_Stokes_IBM_Turbulent_included
18
19#include <Modele_turbulence_hyd_base.h>
20#include <Navier_Stokes_IBM.h>
21
22
23/*! @brief Turbulent IBM Navier-Stokes equation.
24 *
25 * This class represents the momentum equation for a viscous fluid satisfying
26 * the incompressibility condition div U = 0 with turbulence modelling.
27 * A member of type OWN_PTR(Modele_turbulence_hyd_base) represents the turbulence model.
28 *
29 * @sa Navier_Stokes_IBM OWN_PTR(Modele_turbulence_hyd_base) Pb_Hydraulique_Turbulent, Pb_Thermohydraulique_Turbulent
30 */
32{
33 Declare_instanciable(Navier_Stokes_IBM_Turbulent);
34
35public:
36 void set_param(Param& titi) const override;
37 int lire_motcle_non_standard(const Motcle&, Entree&) override;
38 inline const Champ_Fonc_base& viscosite_turbulente() const { return le_modele_turbulence->viscosite_turbulente(); }
39 inline const Modele_turbulence_hyd_base& modele_turbulence() const { return le_modele_turbulence.valeur(); }
40 std::vector<YAML_data> data_a_sauvegarder() const override;
41 int sauvegarder(Sortie&) const override;
42 int reprendre(Entree&) override;
43 int preparer_calcul() override;
44 bool initTimeStep(double dt) override;
45 void mettre_a_jour(double) override;
46 void completer() override;
47 const Champ_Don_base& diffusivite_pour_transport() const override;
48 const Champ_base& diffusivite_pour_pas_de_temps() const override;
49
50 void creer_champ(const Motcle& motlu) override;
51 const Champ_base& get_champ(const Motcle& nom) const override;
52 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const override;
53 bool has_champ(const Motcle& nom) const override;
54 void get_noms_champs_postraitables(Noms& nom, Option opt = NONE) const override;
55
56 void imprimer(Sortie&) const override;
57 const RefObjU& get_modele(Type_modele type) const override;
58 void imprime_residu(SFichier&) override;
59 Nom expression_residu() override;
60
61protected:
63 OWN_PTR(Modele_turbulence_hyd_base) le_modele_turbulence;
64
65private:
66 int typer_lire_mod_turb_hyd(Entree& s);
67};
68
69#endif /* Navier_Stokes_IBM_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
OBS_PTR(Equation_base) eq_IBM_
Base class for the turbulence model hierarchy for Navier-Stokes equations.
A character string (Nom) in uppercase.
Definition Motcle.h:26
Turbulent IBM Navier-Stokes equation.
const RefObjU & get_modele(Type_modele type) const override
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
const Champ_base & diffusivite_pour_pas_de_temps() const override
int sauvegarder(Sortie &) const override
Saves the equation (and its turbulence model) to an output stream.
void mettre_a_jour(double) override
Performs a time update of the equation.
void completer() override
Successive calls to: Navier_Stokes_IBM::completer().
std::vector< YAML_data > data_a_sauvegarder() const override
for PDI IO: retrieve name, type and dimensions of the fields to save/restore
const Champ_base & get_champ(const Motcle &nom) const override
void creer_champ(const Motcle &motlu) override
void set_param(Param &titi) const override
const Modele_turbulence_hyd_base & modele_turbulence() const
int preparer_calcul() override
Prepares the computation.
void imprimer(Sortie &) const override
Prints the equation operators if the time scheme indicates it is necessary.
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
OWN_PTR(Modele_turbulence_hyd_base) le_modele_turbulence
const Champ_Fonc_base & viscosite_turbulente() const
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
const Champ_Don_base & diffusivite_pour_transport() const override
int reprendre(Entree &) override
Restores the equation and its turbulence model from an input stream.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
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