TRUST 1.9.8
HPC thermohydraulic platform
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
classe Champ_Don_base classe de base des Champs donnes (non calcules)
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
void enthalpie(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&, int nb_comp=1) const
classe Discret_Thyd Cette classe est la classe de base representant une discretisation
void discretiser() override
Discretise l'equation.
const Champ_base & diffusivite_pour_pas_de_temps() const override
const Champ_Don_base & diffusivite_pour_transport() const override
classe Energie_Multiphase Cas particulier de Convection_Diffusion_std pour un fluide quasi conpressib...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Discretisation_base & discretisation() const
Renvoie la discretisation associee a l'equation.
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
Schema_Temps_base & schema_temps()
Renvoie le schema en temps associe a l'equation.
virtual void discretiser()
Discretise l'equation.
Champs_compris champs_compris_
Domaine_dis_base & domaine_dis()
Renvoie le domaine discretise associe a l'equation.
virtual const Champ_Don_base & diffusivite_fois_rho() const
virtual const Champ_Don_base & diffusivite() const
Renvoie la diffusivite du milieu.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
static int dimension
Definition Objet_U.h:99
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
const Nom & nom_phase(int i) const
int nb_phases() const
Classe de base des flux de sortie.
Definition Sortie.h:52