TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Source_Transport_proto.h
1/****************************************************************************
2* Copyright (c) 2022, 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 Source_Transport_proto_included
17#define Source_Transport_proto_included
18
19#include <Source_base.h>
20#include <TRUST_Ref.h>
21
22
25class Champ_Don_base;
26class Equation_base;
28class Fluide_base;
29
31{
32protected:
34 Source_Transport_proto(double cs1, double cs2) : C1(cs1), C2(cs2) { }
35
36 Entree& readOn_proto(Entree&, const Nom& );
37 Entree& readOn_nothing(Entree& , const Nom& );
39 Entree& readOn_concen(Entree& , const Nom& );
41 Entree& readOn_real(Entree& , const Nom& );
45
46 void verifier_pb_keps(const Probleme_base&, const Nom& );
48 void verifier_pb_keps_concen(const Probleme_base&, const Nom& );
50
51 void verifier_pb_komega(const Probleme_base&, const Nom&);
52
53 void verifier_milieu_anisotherme(const Probleme_base&, const Nom& );
54 void verifier_milieu_concen(const Probleme_base&, const Nom& );
57
58 void associer_pb_proto(const Probleme_base& );
62
63 static constexpr double C1__ = 1.44, C2__ = 1.92, C3__ = 1.0; // Chabard et N3S
64 static constexpr double C21_R__ = 1.9, C3_R__ = 1.0 /* = C3__ */; // Pour realisable, Chabard et N3S
65 static constexpr double C11__ = 1.55, C21__ = 2.; // pour Bas Re !
66 static constexpr int interpolation_viscosite_turbulente__ = 0; // moyenne arithmetique par defaut
67 static constexpr double coefficient_limiteur__ = 1.; // inactif par defaut
68 double C1 = C1__, C2 = C2__, C3 = C3__;
71
74 OBS_PTR(Equation_base) eq_hydraulique;
77};
78
79inline void error_model(const Nom& source, const Nom& nom)
80{
81 Cerr << "Error ! You can't use the " << source << " source term with a " << nom << " problem/medium !!" << finl;
82 Cerr << "Check the reference manual. It is may be another source term which should be used." << finl;
84}
85
86template <typename RETURN_TYPE>
87RETURN_TYPE not_implemented(const char * nom_funct)
88{
89 Cerr << "The method " << nom_funct << " should be implemented in a derived class !" << finl;
90 throw;
91}
92
93#endif /* Source_Transport_proto_included */
class Champ_Don_base base class of Given Fields (not calculated)
Convection_Diffusion_Concentration Special case of Convection_Diffusion_std.
Convection_Diffusion_Temperature Special case of Convection_Diffusion_std.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Equation_base The role of an equation is the calculation of one or more fields....
Base class for an incompressible fluid and its properties:
Definition Fluide_base.h:36
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
class Probleme_base It is a Probleme_U that is not a coupling.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
static constexpr double C11__
Entree & readOn_anisotherme(Entree &, const Nom &)
static constexpr double C3__
Entree & readOn_anisotherme_concen_real(Entree &, const Nom &)
Entree & readOn_concen(Entree &, const Nom &)
static constexpr double C2__
OBS_PTR(Champ_Don_base) gravite
static constexpr double coefficient_limiteur__
Entree & readOn_anisotherme_real(Entree &, const Nom &)
Entree & readOn_concen_real(Entree &, const Nom &)
static constexpr double C3_R__
static constexpr int interpolation_viscosite_turbulente__
OBS_PTR(Equation_base) eq_hydraulique
static constexpr double C21__
OBS_PTR(Champ_Don_base) beta_t
OBS_PTR(Convection_Diffusion_Temperature) eq_thermique
Entree & readOn_nothing(Entree &, const Nom &)
void associer_pb_concen(const Probleme_base &)
void associer_pb_anisotherme(const Probleme_base &)
void verifier_milieu_concen(const Probleme_base &, const Nom &)
void verifier_pb_keps_anisotherme(const Probleme_base &, const Nom &)
static constexpr double C21_R__
void associer_pb_proto(const Probleme_base &)
void verifier_pb_keps(const Probleme_base &, const Nom &)
Entree & readOn_real(Entree &, const Nom &)
Entree & readOn_anisotherme_concen(Entree &, const Nom &)
void verifier_milieu_anisotherme(const Probleme_base &, const Nom &)
Entree & readOn_proto(Entree &, const Nom &)
void verifier_pb_komega(const Probleme_base &, const Nom &)
void verifier_milieu_anisotherme_concen(const Probleme_base &, const Nom &)
static constexpr double C1__
void associer_pb_anisotherme_concen(const Probleme_base &)
void verifier_pb_keps_concen(const Probleme_base &, const Nom &)
void verifier_beta_concen(const Fluide_base &)
OBS_PTR(Convection_Diffusion_Concentration) eq_concentration
void verifier_pb_keps_anisotherme_concen(const Probleme_base &, const Nom &)
Source_Transport_proto(double cs1, double cs2)