TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Energie_Multiphase_Enthalpie.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 <Energie_Multiphase_Enthalpie.h>
17#include <Pb_Multiphase_Enthalpie.h>
18#include <Discret_Thyd.h>
19
20Implemente_instanciable(Energie_Multiphase_Enthalpie, "Energie_Multiphase_Enthalpie|Energie_Multiphase_h", Energie_Multiphase);
21// XD Energie_Multiphase_Enthalpie eqn_base Energie_Multiphase_h INHERITS_BRACE Internal energy conservation equation
22// XD_CONT for a multi-phase problem where the unknown is the enthalpy
23
25
27{
29 l_inco_ch_->nommer("enthalpie");
30 return is;
31}
32
34{
35 const Discret_Thyd& dis=ref_cast(Discret_Thyd, discretisation());
36 Cerr << "Energy-enthalpy equation discretization " << finl;
38 dis.enthalpie(schema_temps(), domaine_dis(), l_inco_ch_, pb.nb_phases());
39 l_inco_ch_->fixer_nature_du_champ(pb.nb_phases() == 1 ? scalaire : pb.nb_phases() == dimension ? vectoriel : multi_scalaire); //pfft
40 for (int i = 0; i < pb.nb_phases(); i++)
41 l_inco_ch_->fixer_nom_compo(i, Nom("enthalpie_") + pb.nom_phase(i));
42 champs_compris_.ajoute_champ(l_inco_ch_);
44 Cerr << "Energie_Multiphase_Enthalpie::discretiser() ok" << finl;
45}
46
51
class Champ_Don_base base class of Given Fields (not calculated)
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
void enthalpie(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&, int nb_comp=1) const
class Discret_Thyd This class is the base class representing a discretization
void discretiser() override
Discretizes the equation.
const Champ_base & diffusivite_pour_pas_de_temps() const override
const Champ_Don_base & diffusivite_pour_transport() const override
Specialisation of Convection_Diffusion_std for multiphase flows where the transported scalar is tempe...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual void discretiser()
Discretizes the equation.
Champs_compris champs_compris_
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
virtual const Champ_Don_base & diffusivite_fois_rho() const
virtual const Champ_Don_base & diffusivite() const
Returns the diffusivity of the medium (const version).
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
static int dimension
Definition Objet_U.h:94
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
const Nom & nom_phase(int i) const
int nb_phases() const
Base class for output streams.
Definition Sortie.h:52