TrioCFD 1.9.8
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 Cette classe derivee de Perte_Charge est utilisee lorsque l'on veut
29 *
30 * modeliser une perte de charge sur une surface (passage d'une grille par exemple)
31 * par exemple)
32 *
33 * @sa Perte_Charge Perte_Charge_Reguliere
34 */
36{
37
38public :
39
43 /* by default, reads one { and two } */
44 virtual void lire_surfaces(Entree&, const Domaine&, const Domaine_dis_base&, IntVect&, IntVect&, int lire_derniere_accolade = 1);
45 inline double K() const;
46 double calculate_Q(const Equation_base& eqn, const IntVect& num_faces, const IntVect& sgn) const; //met a jour le debit a travers la surface et le renvoie
47 void update_K(const Equation_base& eqn, double deb, DoubleVect& bilan); //regule K_ a partir du debit calcule par update_Q
48
49protected :
50
51 double K_ = 1; //default value if K is used as a regulation factor (for instance in Perte_Charge_Regulieres)
52
53 //pour la regulation de K;
54 Nom identifiant_; //nom pour le fichier de sortie : celui de la surface, ou celui du sous-domaine et de la coupe
55 int regul_; //1 si regulation activee
56 Parser_U deb_cible_, alpha_; //K_ peut varier pour atteindre deb_cible_(t)
57};
58
59
60/*! @brief
61 *
62 * @return (double)
63 */
64inline double Perte_Charge_Singuliere::K() const
65{
66 return K_;
67}
68
69#endif
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
classe Parser_U Version de la classe Parser, derivant de Objet_U.
Definition Parser_U.h:32
Classe Perte_Charge_Singuliere Cette classe derivee de Perte_Charge est utilisee lorsque l'on veut.
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 &)
Lit les specifications d'une perte de charge singuliere a partir d'un flot d'entree.
Classe Perte_Charge Cette classe represente un terme de perte de charge quiest introduit.
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42