TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Perte_Charge_VEF_Face.cpp
1/****************************************************************************
2* Copyright (c) 2024, 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#include <Perte_Charge_VEF_Face.h>
17#include <Fluide_Incompressible.h>
18#include <Probleme_base.h>
19#include <Navier_Stokes_std.h>
20#include <Domaine_VEF.h>
21#include <Champ_P1NC.h>
22
23Implemente_base(Perte_Charge_VEF_Face,"Perte_Charge_VEF_Face",Source_base);
24
25
26
27//// printOn
28//
29
31{
32 return s << que_suis_je();
33}
34
35
36//// readOn
37//
38
40{
41 return s ;
42}
43
45{
46 ;
47}
48
49
50/////////////////////////////////////////////////////////////////////
51//
52// Implementation des fonctions
53//
54// de la classe Perte_Charge_VEF_Face
55//
56////////////////////////////////////////////////////////////////////
57
59{
60 Cerr << " Perte_Charge_VEF_Face::associer_pb " << finl ;
61 int nb_eqn = pb.nombre_d_equations();
62 int ok=0;
63 for (int i=0; i<nb_eqn; i++)
64 {
65 const Equation_base& eqn = pb.equation(i);
66 if (sub_type(Navier_Stokes_std,eqn))
67 {
68 la_vitesse = ref_cast(Champ_P1NC,eqn.inconnue());
69 le_fluide = ref_cast(Fluide_base,eqn.milieu());
71 i = nb_eqn;
72 ok = 1;
73 }
74 }
75
76 if (!ok)
77 {
78 Cerr << "Erreur TRUST dans Perte_Charge_VEF_Face::associer_pb()" << finl;
79 Cerr << "On ne trouve pas d'equation d'hydraulique dans le probleme" << finl;
81 }
82}
83
85 const Domaine_Cl_dis_base& domaine_Cl_dis)
86{
87 Cerr << " Perte_Charge_VEF_Face::associer_domaines " << finl ;
88 le_dom_VEF = ref_cast(Domaine_VEF, domaine_dis);
89 le_dom_Cl_VEF = ref_cast(Domaine_Cl_VEF, domaine_Cl_dis);
90}
91
92
93
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
class Domaine_VEF
Definition Domaine_VEF.h:54
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....
virtual const Milieu_base & milieu() const =0
virtual const Champ_Inc_base & inconnue() const =0
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limite discretisee associee a l'equation.
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
classe Fluide_base Cette classe represente un d'un fluide incompressible ainsi que
Definition Fluide_base.h:38
classe Navier_Stokes_std Cette classe porte les termes de l'equation de la dynamique
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
class Perte_Charge_VEF_Face
void associer_pb(const Probleme_base &) override
void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &) override
void mettre_a_jour(double) override
DOES NOTHING - to override in derived classes.
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
virtual int nombre_d_equations() const =0
virtual const Equation_base & equation(int) const =0
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
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42