TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Pb_Thermohydraulique_Concentration.cpp
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#include <Pb_Thermohydraulique_Concentration.h>
17#include <Fluide_Incompressible.h>
18#include <Constituant.h>
19#include <Verif_Cl.h>
20
21Implemente_instanciable(Pb_Thermohydraulique_Concentration, "Pb_Thermohydraulique_Concentration", Pb_Thermohydraulique);
22// XD pb_thermohydraulique_concentration Pb_base pb_thermohydraulique_concentration INHERITS_BRACE Resolution of
23// XD_CONT Navier-Stokes/energy/multiple constituent transport equations.
24// XD attr fluide_incompressible fluide_incompressible fluide_incompressible REQ The fluid medium associated with the
25// XD_CONT problem.
26// XD attr constituant constituant constituant OPT Constituents.
27// XD attr navier_stokes_standard navier_stokes_standard navier_stokes_standard OPT Navier-Stokes equations.
28// XD attr convection_diffusion_concentration convection_diffusion_concentration convection_diffusion_concentration OPT
29// XD_CONT Constituent transport equations (concentration diffusion convection).
30// XD attr convection_diffusion_temperature convection_diffusion_temperature convection_diffusion_temperature OPT Energy
31// XD_CONT equation (temperature diffusion convection).
32
35
36/*! @brief Renvoie l'equation d'hydraulique de type Navier_Stokes_std si i=0 Renvoie l'equation de la thermique de type
37 *
38 * Convection_Diffusion_Temperature si i=1
39 * Renvoie l'equation de la thermique de type
40 * Convection_Diffusion_Concentration si i=2
41 * (version const)
42 *
43 * @param (int i) l'index de l'equation a renvoyer
44 * @return (Equation_base&) l'equation correspondante a l'index
45 */
51
52/*! @brief Renvoie l'equation d'hydraulique de type Navier_Stokes_std si i=0 Renvoie l'equation de la thermique de type
53 *
54 * Convection_Diffusion_Temperature si i=1
55 * Renvoie l'equation de la thermique de type
56 * Convection_Diffusion_Concentration si i=2
57 *
58 * @param (int i) l'index de l'equation a renvoyer
59 * @return (Equation_base&) l'equation correspondante a l'index
60 */
66
67/*! @brief Associe un milieu au probleme, Si le milieu est de type
68 *
69 * - Fluide_Incompressible, il sera associe a l'equation de l'hydraulique
70 * et a l'equation d'energie.
71 * - Constituant, il sera associe a l'equation de convection-diffusion
72 * Un autre type de milieu provoque une erreur
73 *
74 * @param (Milieu_base& mil) le milieu physique a associer au probleme
75 * @throws mauvais type de milieu physique
76 */
78{
79 if (sub_type(Constituant, mil))
80 eq_concentration.associer_milieu_base(mil);
81 else
83}
84
85/*! @brief Teste la compatibilite des equations de convection-diffusion et de l'hydraulique.
86 *
87 * Le test se fait sur les conditions
88 * aux limites discretisees de chaque equation.
89 * Appels aux fonctions de librairie hors classe:
90 * tester_compatibilite_hydr_thermique(const Domaine_Cl_dis_base&,const Domaine_Cl_dis_base&)
91 * tester_compatibilite_hydr_concentration(const Domaine_Cl_dis_base&,const Domaine_Cl_dis_base&)
92 *
93 * @return (int) code de retour propage
94 */
96{
98 const Domaine_Cl_dis_base& domaine_Cl_hydr = eq_hydraulique.domaine_Cl_dis();
99 const Domaine_Cl_dis_base& domaine_Cl_co = eq_concentration.domaine_Cl_dis();
100 return tester_compatibilite_hydr_concentration(domaine_Cl_hydr, domaine_Cl_co);
101}
classe Constituant Cette classe represente le(s) constituant(s) d'un fluide.
Definition Constituant.h:30
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
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....
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
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
Navier_Stokes_std eq_hydraulique
classe Pb_Thermohydraulique_Concentration Cette classe represente un probleme de thermohydraulique av...
void associer_milieu_base(const Milieu_base &) override
Associe un milieu au probleme, Si le milieu est de type.
const Equation_base & equation(int) const override
Renvoie l'equation d'hydraulique de type Navier_Stokes_std si i=0 Renvoie l'equation de la thermique ...
Convection_Diffusion_Concentration eq_concentration
int verifier() override
Teste la compatibilite des equations de convection-diffusion et de l'hydraulique.
classe Pb_Thermohydraulique Cette classe represente un probleme de thermohydraulique standard:
void associer_milieu_base(const Milieu_base &) override
Associe le milieu au probleme Le milieu doit etre de type fluide incompressible.
const Equation_base & equation(int) const override
Renvoie l'equation d'hydraulique de type Navier_Stokes_std si i=0 Renvoie l'equation de la thermique ...
int verifier() override
Teste la compatibilite des equations de la thermique et de l'hydraulique.
Classe de base des flux de sortie.
Definition Sortie.h:52