TrioCFD 1.9.9_beta
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 // added to avoid 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
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Probleme_base It is a Probleme_U that is not a coupling.
SFichier is to the C++ ofstream class what Sortie is to the C++ ostream class.
Definition SFichier.h:29
Source_base A Source_base object is a term appearing on the right-hand side of an.
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
Reads non-simple-type parameters of an Objet_U from an input stream.
void associer_pb(const Probleme_base &) override
void completer() override
Updates internal references of the Source_base object.
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