TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Terme_Source_Canal_perio.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
17
18#ifndef Terme_Source_Canal_perio_included
19#define Terme_Source_Canal_perio_included
20
21#include <Source_base.h>
22#include <SFichier.h>
23class Probleme_base;
24class Param;
25
26/*! @brief Source term to keep a constant flow rate in a channel with periodic boundary conditions
27 *
28 */
29
31{
32
33 Declare_base(Terme_Source_Canal_perio);
34
35public:
36 void associer_pb(const Probleme_base& ) override;
37 void mettre_a_jour(double temps) override {}
38 DoubleTab& calculer(DoubleTab& resu) const override;
39
40protected :
41 void set_param(Param& param) const override;
42 int lire_motcle_non_standard(const Motcle&, Entree&) override;
43 void completer() override;
44
45 // This one is overridden depending on discret.
46 virtual void calculer_debit(double&) const=0;
47
48 ArrOfDouble source() const;
49 void write_flow_rate(const Nom& ext_nom_source, double debit) const;
50 double compute_heat_flux() const;
51 // This one is overridden for P0 fields in VDF
52 virtual ArrOfDouble source_convection_diffusion(double debit_e) const;
53
54 ArrOfDouble dir_source_;
60 // ajout pour eviter des statics
61 mutable int deb_;
62 mutable double source_;
63 mutable double debnm1_;
64 mutable double debit_ref_;
65 mutable double dernier_temps_calc_ ;
68
69private:
70 mutable SFichier flow_rate_file_;
71 mutable SFichier pressure_gradient_file_;
72 mutable SFichier restart_file_;
73};
74
75
76#endif
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42
Source term to keep a constant flow rate in a channel with periodic boundary conditions.
virtual void calculer_debit(double &) const =0
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void associer_pb(const Probleme_base &) override
void completer() override
Met a jour les references internes a l'objet Source_base.
DoubleTab & calculer(DoubleTab &resu) const override
virtual ArrOfDouble source_convection_diffusion(double debit_e) const
ArrOfDouble source() const
Term source calculation (called by VDF and VEF implementations) TODO: returning an ArrOfDouble is baa...
void set_param(Param &param) const override
void mettre_a_jour(double temps) override
DOES NOTHING - to override in derived classes.
void write_flow_rate(const Nom &ext_nom_source, double debit) const