TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Perte_Charge_VDF_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_VDF_Face.h>
17#include <Fluide_Incompressible.h>
18#include <Probleme_base.h>
19#include <Navier_Stokes_std.h>
20#include <Champ_Face_VDF.h>
21#include <Domaine_VDF.h>
22#include <Domaine_Cl_VDF.h>
23
24Implemente_base(Perte_Charge_VDF_Face,"Perte_Charge_VDF_Face",Source_dep_inco_base);
25
26
27//// printOn
28//
29
31{
32 return s ;
33}
34
35
36//// readOn
37//
38
40{
41 return s ;
42}
43
44
45
46/////////////////////////////////////////////////////////////////////
47//
48// Implementation of functions
49//
50// of the Perte_Charge_VDF_Face class
51//
52////////////////////////////////////////////////////////////////////
53
55{
56 int nb_eqn = pb.nombre_d_equations();
57 int ok=0;
58 for (int i=0; i<nb_eqn; i++)
59 {
60 const Equation_base& eqn = pb.equation(i);
61 if (sub_type(Navier_Stokes_std,eqn))
62 {
63 la_vitesse = ref_cast(Champ_Face_VDF,eqn.inconnue());
64 le_fluide = ref_cast(Fluide_base,eqn.milieu());
66 i = nb_eqn;
67 ok = 1;
68 }
69 }
70
71 if (!ok)
72 {
73 Cerr << "TRUST Error in Perte_Charge_VDF_Face::associer_pb()" << finl;
74 Cerr << "Cannot find a hydraulic equation in the problem" << finl;
76 }
77}
78
80 const Domaine_Cl_dis_base& domaine_Cl_dis)
81{
82 le_dom_VDF = ref_cast(Domaine_VDF, domaine_dis);
83 le_dom_Cl_VDF = ref_cast(Domaine_Cl_VDF, domaine_Cl_dis);
84}
85
86
87
88
class Champ_Face_VDF
class Domaine_Cl_VDF
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VDF
Definition Domaine_VDF.h:61
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....
virtual const Milieu_base & milieu() const =0
virtual const Champ_Inc_base & inconnue() const =0
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
Base class for an incompressible fluid and its properties:
Definition Fluide_base.h:36
Navier_Stokes_std This class carries the terms of the momentum equation.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
void associer_domaines(const Domaine_dis_base &, const Domaine_Cl_dis_base &) override
void associer_pb(const Probleme_base &) override
class Probleme_base It is a Probleme_U that is not a coupling.
virtual int nombre_d_equations() const =0
virtual const Equation_base & equation(int) const =0
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52
class Source_dep_inco_base Sources inheriting from this class must implement ajouter_ in a way that a...