TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Conv_VDF_base.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Op_Conv_VDF_base_included
17#define Op_Conv_VDF_base_included
18
19#include <Iterateur_VDF_base.h>
20#include <Operateur_Conv.h>
21#include <TRUST_Deriv.h>
22
23/*! @brief class Op_Conv_VDF_base Classe de base des operateurs de convection VDF
24 *
25 */
27{
28 Declare_base(Op_Conv_VDF_base);
29
30public:
31 inline Op_Conv_VDF_base( const Iterateur_VDF_base& iter_base) { iter_ = iter_base; } // constructeur
32 void completer() override;
33 void preparer_calcul() override;
34 void associer_domaine_cl_dis(const Domaine_Cl_dis_base& zcl) override { iter_->associer_domaine_cl_dis(zcl); }
35 void calculer_dt_local(DoubleTab&) const override ; //Local time step calculation
36 void calculer_pour_post(Champ_base& espace_stockage,const Nom& option,int comp) const override;
37 void creer_champ(const Motcle& ) override;
38 void get_noms_champs_postraitables(Noms& nom,Option opt=NONE) const override;
39 void mettre_a_jour(double ) override;
40
41 double calculer_dt_stab() const override;
42 int impr(Sortie& os) const override;
43 Motcle get_localisation_pour_post(const Nom& option) const override;
44 virtual const Champ_base& vitesse() const = 0;
45 virtual Champ_base& vitesse() = 0;
46 inline DoubleTab& calculer(const DoubleTab& inco, DoubleTab& resu ) const override { return iter_->calculer(inco, resu); }
47 inline const OWN_PTR(Iterateur_VDF_base)& get_iter() const { return iter_; }
48 inline OWN_PTR(Iterateur_VDF_base)& get_iter() { return iter_; }
49
50 inline int has_interface_blocs() const override { return 1; }
51
52 void set_incompressible(const int flag) override
53 {
54 if (flag == 0)
55 {
56 Cerr << "Compressible form of operator \"" << que_suis_je() << "\" :" << finl;
57 Cerr << "Discretization of \u2207(inco \u2297 v) - v \u2207.(inco)" << finl;
58 }
59 incompressible_ = flag; // XXX remove later !
60 iter_->set_incompressible(flag);
61 }
62
63 void ajouter_blocs(matrices_t , DoubleTab& , const tabs_t& ) const override;
64 void dimensionner_blocs_elem(matrices_t , const tabs_t& ) const;
65 void dimensionner_blocs_face(matrices_t , const tabs_t& ) const;
66
67 void associer_champ_temp(const Champ_Inc_base&, bool) const override;
68 void contribuer_au_second_membre(DoubleTab& resu) const override
69 {
70 Cerr << "Op_Conv_VDF_base::" << __func__ << " should not be called !" << finl;
72 }
73
74protected:
78
79private:
80 /* si operateur de convection de Masse_Multiphase */
81 std::vector<OWN_PTR(Champ_Inc_base)> cc_phases_; //flux massiques (kg/m2/s)
82 Motcles noms_cc_phases_; //leurs noms
83 std::vector<OWN_PTR(Champ_Inc_base)> vd_phases_; //vitesses debitantes
84 Motcles noms_vd_phases_; //leurs noms
85 std::vector<OWN_PTR(Champ_Inc_base)> x_phases_; //titres par phase
86 Motcles noms_x_phases_; //leurs noms
87 mutable DoubleTab fluent_;
88};
89
90// Fonction utile pour le calcul du pas de temps de stabilite
91inline void eval_fluent(const double , const int , const int , const int , DoubleTab& );
92
93#endif /* Op_Conv_VDF_base_included */
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
DoubleTab & calculer(const DoubleTab &inco, DoubleTab &resu) const override
const OWN_PTR(Iterateur_VDF_base) &get_iter() const
void creer_champ(const Motcle &) override
virtual const Champ_base & vitesse() const =0
void completer() override
Associe l'operateur au domaine_dis, le domaine_Cl_dis, et a l'inconnue de son equation.
void dimensionner_blocs_elem(matrices_t, const tabs_t &) const
void calculer_dt_local(DoubleTab &) const override
void mettre_a_jour(double) override
DOES NOTHING - to override in derived classes.
OWN_PTR(Iterateur_VDF_base) iter_
void set_incompressible(const int flag) override
void preparer_calcul() override
void associer_champ_convecte_elem()
void calculer_pour_post(Champ_base &espace_stockage, const Nom &option, int comp) const override
OWN_PTR(Iterateur_VDF_base) &get_iter()
void contribuer_au_second_membre(DoubleTab &resu) const override
DOES NOTHING - to override in derived classes.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
int impr(Sortie &os) const override
DOES NOTHING - to override in derived classes.
Motcle get_localisation_pour_post(const Nom &option) const override
void associer_champ_temp(const Champ_Inc_base &, bool) const override
void ajouter_blocs(matrices_t, DoubleTab &, const tabs_t &) const override
void associer_domaine_cl_dis(const Domaine_Cl_dis_base &zcl) override
void associer_champ_convecte_face()
void dimensionner_blocs_face(matrices_t, const tabs_t &) const
virtual Champ_base & vitesse()=0
double calculer_dt_stab() const override
Calcul dt_stab.
Op_Conv_VDF_base(const Iterateur_VDF_base &iter_base)
int has_interface_blocs() const override
classe Operateur_Conv_base Cette classe est la base de la hierarchie des operateurs representant
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52