TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Fluide_Diphasique.h
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#ifndef Fluide_Diphasique_included
17#define Fluide_Diphasique_included
18
19#include <Fluide_Incompressible.h>
20#include <Milieu_base.h>
21#include <Objet_U.h>
22#include <Milieu_base.h>
23#include <Solid_Particle_base.h>
24
26{
27 Declare_instanciable(Fluide_Diphasique);
28public:
29
30 const Fluide_Incompressible& fluide_phase(int la_phase) const;
31 double sigma() const;
32 double chaleur_latente() const;
33 int formule_mu() const;
34
35 // Surcharge des methodes standard du milieu_base :
36 void set_param(Param& param) const override;
37 void verifier_coherence_champs(int& err, Nom& message) override;
38 int initialiser(const double temps) override;
39 void mettre_a_jour(double temps) override;
40 void discretiser(const Probleme_base& pb, const Discretisation_base& dis) override;
41
42 // L'appel a ces methodes est invalide et genere une erreur
43 const Champ_base& masse_volumique() const override { return invalid_<const Champ_base&>(__func__); }
44 Champ_base& masse_volumique() override { return invalid_<Champ_base&>(__func__); }
45 const Champ_Don_base& diffusivite() const override { return invalid_<const Champ_Don_base&>(__func__); }
46 Champ_Don_base& diffusivite() override { return invalid_<Champ_Don_base&>(__func__); }
47 const Champ_Don_base& conductivite() const override { return invalid_<const Champ_Don_base&>(__func__); }
48 Champ_Don_base& conductivite() override { return invalid_<Champ_Don_base&>(__func__); }
49 const Champ_Don_base& capacite_calorifique() const override { return invalid_<const Champ_Don_base&>(__func__); }
51 const Champ_Don_base& beta_t() const override { return invalid_<const Champ_Don_base&>(__func__); }
52 Champ_Don_base& beta_t() override { return invalid_<Champ_Don_base&>(__func__); }
53
54 const bool& get_is_solid_particle() const { return is_solid_particle_; }
55 const int& get_id_fluid_phase() const { return id_fluid_phase_; }
56
57protected:
59 OWN_PTR(Champ_Don_base) sigma_; // Tension de surface (J/m^2)
60 OWN_PTR(Champ_Don_base) chaleur_latente_; // Enthalpie de changement de phase h(phase1_) - h(phase0_) (J/kg/K)
61 Motcle formule_mu_ = "standard"; // Formule utilisee pour le calcul de la moyenne de mu
62 bool is_solid_particle_ = false; // True if phase0_ or phase1_ is a Solid_Particle
63 int id_fluid_phase_ = -1; // number (0 or 1) of the Fluid_Incompressible phase
64 template <typename RETURN_TYPE>
65 RETURN_TYPE invalid_(const char * nom_funct) const
66 {
67 Cerr << "Invalid call to the method Fluide_Diphasique::" << nom_funct << " !!!" << finl;
68 throw;
69 }
70};
71
72#endif /* Fluide_Diphasique_included */
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
class Discretisation_base This class represents a spatial discretization scheme, which
double chaleur_latente() const
const Champ_Don_base & conductivite() const override
Returns the conductivity of the medium (const version).
int initialiser(const double temps) override
OWN_PTR(Champ_Don_base) sigma_
Champ_Don_base & capacite_calorifique() override
Returns the heat capacity of the medium.
const bool & get_is_solid_particle() const
const Fluide_Incompressible & fluide_phase(int la_phase) const
const Champ_Don_base & capacite_calorifique() const override
Returns the heat capacity of the medium (const version).
void set_param(Param &param) const override
Champ_Don_base & conductivite() override
Returns the conductivity of the medium.
Champ_Don_base & beta_t() override
Returns beta_t of the medium.
OWN_PTR(Milieu_base) phase0_
Champ_base & masse_volumique() override
Returns the mass density of the medium.
const Champ_Don_base & diffusivite() const override
Returns the diffusivity of the medium (const version).
void verifier_coherence_champs(int &err, Nom &message) override
const int & get_id_fluid_phase() const
Champ_Don_base & diffusivite() override
Returns the diffusivity of the medium.
void mettre_a_jour(double temps) override
void discretiser(const Probleme_base &pb, const Discretisation_base &dis) override
RETURN_TYPE invalid_(const char *nom_funct) const
OWN_PTR(Champ_Don_base) chaleur_latente_
const Champ_base & masse_volumique() const override
Returns the mass density of the medium (const version).
const Champ_Don_base & beta_t() const override
Returns beta_t of the medium (const version).
Represents an incompressible fluid and its properties:
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Probleme_base It is a Probleme_U that is not a coupling.