TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Milieu_Phase_field.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Milieu_Phase_field_included
17#define Milieu_Phase_field_included
18
19#include <Fermeture_Phase_field_base.h>
20#include <Fluide_Incompressible.h>
21
22class Pb_Phase_field;
23
25{
26 Declare_instanciable(Milieu_Phase_field);
27public:
28 void set_param(Param& param) const override;
29 int lire_motcle_non_standard(const Motcle&, Entree&) override;
30 void discretiser(const Probleme_base& pb, const Discretisation_base& dis) override;
31 int initialiser(const double temps) override;
32 void mettre_a_jour(double temps) override;
33 void update_rho_mu(double temps);
34
35 inline int get_diff_boussi() const { return diff_boussi_; }
36 inline int get_boussi() const { return boussi_; }
37
38 inline const Champ_Don_base& rho() const { return rho_; }
39 inline Champ_Don_base& rho() { return rho_; }
40 inline const Champ_Don_base& drhodc() const { return drhodc_; }
41 inline Champ_Don_base& drhodc() { return drhodc_; }
42 inline const double& rho0() const { return rho0_; }
43 inline Champ_Don_base& mu() { return mu_; }
44 inline const Champ_Don_base& mu() const { return mu_; }
45
46 void calculer_rho(const bool init = false);
47 void calculer_mu(const bool init = false);
48
49 inline const Fermeture_Phase_field_base& get_fermeture() const { return fermeture_; }
50 inline Fermeture_Phase_field_base& get_fermeture() { return fermeture_; }
51
52protected:
54 int boussi_ = -1, diff_boussi_ = -1;
55 OWN_PTR(Champ_Don_base) rho_; // soit lu dans le jdd (boussi_==0)
56 // soit construit comme rho0_*(1+betac_*c) (boussi_==1)
57 OWN_PTR(Champ_Don_base) drhodc_; // soit lu dans le jdd (boussi_==0)
58 // soit construit comme rho0_*betac_ (boussi_==1 mais attention strictement valide seulement si betac_= Champs_Uniforme)
59
60 double rho0_ = -123.;
61
62 OWN_PTR(Champ_Don_base) mu_;// lu dans le jdd (boussi_==0) seulement pour boussi_==0 && diff_boussi_==0
63
65};
66
67#endif /* Milieu_Phase_field_included */
classe Champ_Don_base classe de base des Champs donnes (non calcules)
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
const Champ_Don_base & rho() const
OWN_PTR(Champ_Don_base) rho_
Fermeture_Phase_field_base & get_fermeture()
void calculer_rho(const bool init=false)
Calcule rho_n+1 pour utilisation dans la pression.
OWN_PTR(Champ_Don_base) drhodc_
OWN_PTR(Champ_Don_base) mu_
void mettre_a_jour(double temps) override
Effectue une mise a jour en temps du milieu, et donc de ses parametres caracteristiques.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
Champ_Don_base & rho()
OWN_PTR(Fermeture_Phase_field_base) fermeture_
void calculer_mu(const bool init=false)
const double & rho0() const
Champ_Don_base & mu()
void set_param(Param &param) const override
const Champ_Don_base & drhodc() const
OBS_PTR(Pb_Phase_field) pb_pf_
int initialiser(const double temps) override
Initialise les parametres du fluide.
void discretiser(const Probleme_base &pb, const Discretisation_base &dis) override
const Champ_Don_base & mu() const
Champ_Don_base & drhodc()
const Fermeture_Phase_field_base & get_fermeture() const
void update_rho_mu(double temps)
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Classe Pb_Phase_field Cette classe represente un probleme d'hydraulique avec transport.
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.