TrioCFD 1.9.9_beta
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 Returns the hydraulic equation of type Navier_Stokes_std if i=0, returns the thermal equation of type
37 *
38 * Convection_Diffusion_Temperature if i=1,
39 * returns the concentration equation of type
40 * Convection_Diffusion_Concentration if i=2
41 * (const version)
42 *
43 * @param i the index of the equation to return
44 * @return the equation corresponding to the index
45 */
51
52/*! @brief Returns the hydraulic equation of type Navier_Stokes_std if i=0, returns the thermal equation of type
53 *
54 * Convection_Diffusion_Temperature if i=1,
55 * returns the concentration equation of type
56 * Convection_Diffusion_Concentration if i=2
57 *
58 * @param i the index of the equation to return
59 * @return the equation corresponding to the index
60 */
66
67/*! @brief Associates a medium to the problem. If the medium is of type:
68 *
69 * - Fluide_Incompressible, it will be associated with the hydraulic equation
70 * and the energy equation.
71 * - Constituant, it will be associated with the convection-diffusion equation
72 * Any other medium type causes an error.
73 *
74 * @param mil the physical medium to associate with the problem
75 * @throws wrong type of physical medium
76 */
78{
79 if (sub_type(Constituant, mil))
80 eq_concentration.associer_milieu_base(mil);
81 else
83}
84
85/*! @brief Tests the compatibility of the convection-diffusion and hydraulic equations.
86 *
87 * The test is performed on the discretized boundary conditions of each equation.
88 * Calls the library functions:
89 * tester_compatibilite_hydr_thermique(const Domaine_Cl_dis_base&,const Domaine_Cl_dis_base&)
90 * tester_compatibilite_hydr_concentration(const Domaine_Cl_dis_base&,const Domaine_Cl_dis_base&)
91 *
92 * @return propagated return code
93 */
95{
97 const Domaine_Cl_dis_base& domaine_Cl_hydr = eq_hydraulique.domaine_Cl_dis();
98 const Domaine_Cl_dis_base& domaine_Cl_co = eq_concentration.domaine_Cl_dis();
99 return tester_compatibilite_hydr_concentration(domaine_Cl_hydr, domaine_Cl_co);
100}
Represents the constituent(s) of a fluid.
Definition Constituant.h:30
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
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....
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
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
Navier_Stokes_std eq_hydraulique
Pb_Thermohydraulique_Concentration This class represents a thermohydraulic problem with concentration...
void associer_milieu_base(const Milieu_base &) override
Associates a medium to the problem. If the medium is of type:
const Equation_base & equation(int) const override
Returns the hydraulic equation of type Navier_Stokes_std if i=0, returns the thermal equation of type...
Convection_Diffusion_Concentration eq_concentration
int verifier() override
Tests the compatibility of the convection-diffusion and hydraulic equations.
Pb_Thermohydraulique This class represents a standard thermohydraulic problem:
void associer_milieu_base(const Milieu_base &) override
Associates the medium to the problem. The medium must be of type incompressible fluid.
const Equation_base & equation(int) const override
Returns the hydraulic equation of type Navier_Stokes_std if i=0, returns the thermal equation of type...
int verifier() override
Tests the compatibility of the thermal and hydraulic equations.
Base class for output streams.
Definition Sortie.h:52