TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Perte_Charge_Singuliere.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 Perte_Charge_Singuliere_included
17#define Perte_Charge_Singuliere_included
18
19#include <TRUSTTabs_forward.h>
20#include <Perte_Charge.h>
21#include <Parser_U.h>
22#include <Domaine_forward.h>
23
25class Equation_base;
26class Source_base;
27
28/*! @brief Classe Perte_Charge_Singuliere This class derived from Perte_Charge is used when one wants
29 *
30 * to model a pressure drop over a surface (passage through a grid, for example).
31 *
32 * @sa Perte_Charge Perte_Charge_Reguliere
33 */
35{
36
37public :
38
42 /* by default, reads one { and two } */
43 virtual void lire_surfaces(Entree&, const Domaine&, const Domaine_dis_base&, IntVect&, IntVect&, int lire_derniere_accolade = 1);
44 inline double K() const;
45 double calculate_Q(const Equation_base& eqn, const IntVect& num_faces, const IntVect& sgn) const; // updates and returns the flow rate through the surface
46 void update_K(const Equation_base& eqn, double deb, DoubleVect& bilan); // regulates K_ from the flow rate computed by update_Q
47
48protected :
49
50 double K_ = 1; //default value if K is used as a regulation factor (for instance in Perte_Charge_Regulieres)
51
52 // for K regulation;
53 Nom identifiant_; // name for the output file: that of the surface, or of the sub-domain and cut
54 int regul_; // 1 if regulation is enabled
55 Parser_U deb_cible_, alpha_; // K_ can vary to reach deb_cible_(t)
56};
57
58
59/*! @brief
60 *
61 * @return (double)
62 */
63inline double Perte_Charge_Singuliere::K() const
64{
65 return K_;
66}
67
68#endif
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
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....
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
class Parser_U Version of the Parser class, deriving from Objet_U.
Definition Parser_U.h:32
Classe Perte_Charge_Singuliere This class derived from Perte_Charge is used when one wants.
void update_K(const Equation_base &eqn, double deb, DoubleVect &bilan)
double calculate_Q(const Equation_base &eqn, const IntVect &num_faces, const IntVect &sgn) const
virtual void lire_surfaces(Entree &, const Domaine &, const Domaine_dis_base &, IntVect &, IntVect &, int lire_derniere_accolade=1)
Entree & lire_regul(Entree &)
Reads the specifications of a singular pressure drop from an input stream.
Classe Perte_Charge This class represents a pressure drop term that is introduced.
Source_base A Source_base object is a term appearing on the right-hand side of an.
Definition Source_base.h:42