TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Transport_K_Omega_base.h
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#ifndef Transport_K_Omega_base_included
17#define Transport_K_Omega_base_included
18
19#include <Modele_turbulence_hyd_RANS_K_Omega_base.h>
20#include <Transport_2eq_base.h>
21#include <TRUST_Ref.h>
22
23
24class Champ_Inc_base;
25class Milieu_base;
26
27/*! @brief Classe Transport_K_Omega_base Classe de base pour les equations
28 *
29 * de transport des modeles k_Omega.
30 *
31 */
33{
34 Declare_base(Transport_K_Omega_base);
35
36public:
37
38 void discretiser() override;
39 void mettre_a_jour(double temps) override;
41 void valider_iteration() override;
42 inline const Champ_Inc_base& inconnue() const override;
43 inline Champ_Inc_base& inconnue() override;
44
45 void raise_control_k_omega_flag() const { flag_control_k_omega_required_ = true; }
46 void lower_control_k_omega_flag() const { flag_control_k_omega_required_ = false; }
47
48protected:
49
50 virtual void set_param(Param& ) const override;
51
53
54 OWN_PTR(Champ_Inc_base) le_champ_K_Omega;
55
56private:
57 bool exit_on_negative_k_omega_ = false;
58 bool exit_on_big_omega_ = false;
59 bool disable_report_on_corrected_values_ = false;
60 mutable bool flag_control_k_omega_required_ = true; // EB: mutable to allow to raise the flag in const methods rather than use ref_cast_non_const.
61};
62
63/*! @brief Renvoie le champ inconnue de l'equation.
64 *
65 * Un champ vecteur contenant K et omega.
66 *
67 * @return (Champ_Inc_base&) le champ inconnue de l'equation
68 */
69inline Champ_Inc_base& Transport_K_Omega_base::inconnue() { return le_champ_K_Omega; }
70
71
72/*! @brief Renvoie le champ inconnue de l'equation.
73 *
74 * Un champ vecteur contenant K et omega.
75 * (version const)
76 *
77 * @return (Champ_Inc_base&) le champ inconnue de l'equation
78 */
79inline const Champ_Inc_base& Transport_K_Omega_base::inconnue() const { return le_champ_K_Omega; }
80
81#endif
Classe Champ_Inc_base.
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Classe Transport_2eq_base Classe de base pour les equations.
Classe Transport_K_Omega_base Classe de base pour les equations.
void valider_iteration() override
on remet omega et K positifs
void discretiser() override
Discretise l'equation.
const Champ_Inc_base & inconnue() const override
Renvoie le champ inconnue de l'equation.
virtual void set_param(Param &) const override
void mettre_a_jour(double temps) override
La valeur de l'inconnue sur le pas de temps a ete calculee.
int controler_K_Omega()
Controle le champ inconnue K-Omega en forcant a zero les valeurs du champ.
OWN_PTR(Champ_Inc_base) le_champ_K_Omega