TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_Diffusion_Temperature_FT_Disc.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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#ifndef Convection_Diffusion_Temperature_FT_Disc_included
16#define Convection_Diffusion_Temperature_FT_Disc_included
17
18#include <Convection_Diffusion_Temperature.h>
19
20
21#include <Assembleur_base.h>
22#include <TRUST_Ref.h>
23
27
28
30{
31 Declare_instanciable_sans_constructeur(Convection_Diffusion_Temperature_FT_Disc);
32public:
34
36 void set_param(Param& titi) const override;
37 int lire_motcle_non_standard(const Motcle&, Entree&) override;
38 virtual void preparer_pas_de_temps();
39 virtual void corriger_pas_de_temps(double dt);
41 DoubleTab& derivee_en_temps_inco(DoubleTab&) override;
42 void mettre_a_jour(double temps) override;
43 int preparer_calcul() override;
44 double get_flux_to_face(const int num_face) const;
45 double get_Twall_at_face(const int num_face) const;
46 double get_Twall_at_elem(const int elem) const;
47 const double& get_tsat_constant() const;
48 void get_flux_and_Twall(const int num_face,
49 double& flux, double& Twall) const;
50 double get_Twall(const int num_face) const;
51 virtual void suppression_interfaces(const IntVect& num_compo, const ArrOfInt& flags_compo_a_supprimer, int nouvelle_phase);
52 void associer_milieu_base(const Milieu_base& milieu) override;
53 Milieu_base& milieu() override;
54 const Milieu_base& milieu() const override;
55 const Champ_base& vitesse_pour_transport() const override;
56 void discretiser() override;
57
58 int get_phase() const;
60 void completer() override;
61
62 void check_injection();
63 bool is_reinject_activated() const { return reinjection_;};
64
65 bool ready_injection() const { return ready_inject_; };
66 bool& ready_injection() { return ready_inject_; };
67 const double& get_tempC() const { return tempC_; };
68 const double& get_Rc_inject() const { return Rc_inject_; } ;
69 const double& get_thetaC() const { return thetaC_;};
70
71 const DoubleTab& get_mpoint() const
72 {
73 return mpoint_->valeurs();
74 };
75
77 {
78 return ref_eq_interface_.valeur();
79 };
80
82 {
83 return ref_eq_interface_.valeur();
84 };
85
86 ArrOfInt& mixed_elems()
87 {
88 return mixed_elems_;
89 };
90 ArrOfDouble& lost_fluxes()
91 {
92 return lost_fluxes_;
93 }
94 void calculer_grad_t();
95 void calculer_mpoint(Champ_base& mpoint);
96 void calculer_mpoint();
97
101
102
103protected:
104 void correct_mpoint();
105 void set_is_solid_particle(const bool is_solid_particle) { is_solid_particle_=is_solid_particle; }
106
107 // Quelle phase cette equation concerne-t-elle ? 0 ou 1
109 //GB : Ajout de variables :
119 ArrOfInt correction_mpoint_diff_conv_energy_ ; // on attend trois flags 0 ou 1
120
122 // parameters injection seed nucleate
123 // Size: Using the same Radius defined above (Rc_gridN_), [in number of grids]
124 // Temperature beyond which the site is activeted [in K] T-Tsat
125 // in this case, we need the initial value for contact angle, thetaC_tcl_ will be used
126
127 // reinjection: if a re-injection of interface if nessaire
128 // Par defaut, do not reinject bubble if previous bubbl is detached
129 bool reinjection_ = false;
130 // Par defaut, temperature of activation is 0;
131 double tempC_ = 0;
132 // Par defaut, radius of bubble seed is 0;
133 double Rc_inject_ = 0;
134 // Par defaut, angle of bubble seed is 0;
135 double thetaC_ = 0;
136 // Par defaut, radius of bubble seed in number of grids is 0;
137 int Rc_GridN_ = 0;
138 // Par defaut, Not ready to inject the bubble
139 bool ready_inject_ = false;
140
141 // Champs compris par le postraitement
142 LIST(OBS_PTR(Champ_base)) liste_champs_compris_;
143
144 // Reference a l'equation de transport de l'interface pour l'indicatrice de phase
146 // Reference a l'equation de navier_stokes pour le champ de vitesse (convection)
148
149 // Gradient normal de temperature a l'interface phase 0
150 // (grad T scalaire normale a l'interface, normale dirigee
151 // vers la phase 1)
154 OWN_PTR(Champ_Fonc_base) mpoint_uncorrected_;
155 OWN_PTR(Champ_Inc_base) vitesse_convection_;
156
157 // To make a divergence-free velocity extension :
158 bool divergence_free_velocity_extension_ = false; // Default set to historical behavior : velocity extension is NOT divergence-free
159 OWN_PTR(Assembleur_base) assembleur_pression_;
160 OWN_PTR(Champ_Inc_base) la_pression; // Of course, it's a fake :D
161 OWN_PTR(Champ_Inc_base) gradient_pression_;
162 OWN_PTR(Champ_Inc_base) divergence_delta_U;
165 OWN_PTR(Domaine_Cl_dis_base) zcl_fictitious_;
166 Noms name_bc_opening_pressure_; // Liste de noms pour laisser sortir la source de div(delta u)
167
168 ArrOfInt mixed_elems_;
169 ArrOfDouble lost_fluxes_;
170 ArrOfDouble derivee_energy_;
174 ArrOfDouble lost_fluxes_conv_;
175
178
179 bool explicit_u_NS_ = false;
180};
181#endif
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
OWN_PTR(Champ_Inc_base) la_pression
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.
void associer_milieu_base(const Milieu_base &milieu) override
Associe un milieu physique a l'equation, le milieu est en fait caste en Fluide_base.
int preparer_calcul() override
Tout ce qui ne depend pas des autres problemes eventuels.
void completer() override
Complete la construction (initialisation) des objets associes a l'equation.
void get_flux_and_Twall(const int num_face, double &flux, double &Twall) const
OWN_PTR(Assembleur_base) assembleur_pression_
const Transport_Interfaces_FT_Disc & get_eq_interface() const
void calculer_grad_t()
met a jour le champ grad_t en fonction du champ inconnue.
OWN_PTR(Champ_Inc_base) vitesse_convection_
DoubleTab & derivee_en_temps_inco(DoubleTab &) override
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
OWN_PTR(Champ_Inc_base) divergence_delta_U
Thermal_correction_discretization_method thermal_correction_discretization_method_
OWN_PTR(Champ_Fonc_base) mpoint_uncorrected_
LIST(OBS_PTR(Champ_base)) liste_champs_compris_
OBS_PTR(Navier_Stokes_std) ref_eq_ns_
void mettre_a_jour(double temps) override
La valeur de l'inconnue sur le pas de temps a ete calculee.
OBS_PTR(Fluide_Diphasique) fluide_dipha_
virtual void suppression_interfaces(const IntVect &num_compo, const ArrOfInt &flags_compo_a_supprimer, int nouvelle_phase)
Methode appelee par Transport_Interfaces_xxx::test_suppression_interfaces_sous_domaine() lorqu'une in...
const Thermal_correction_discretization_method & get_thermal_correction_discretization_method() const
OWN_PTR(Champ_Inc_base) gradient_pression_
OBS_PTR(Transport_Interfaces_FT_Disc) ref_eq_interface_
OWN_PTR(Domaine_Cl_dis_base) zcl_fictitious_
classe Convection_Diffusion_Temperature Cas particulier de Convection_Diffusion_std
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Classe Matrice Classe generique de la hierarchie des matrices.
Definition Matrice.h:34
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
classe Navier_Stokes_std Cette classe porte les termes de l'equation de la dynamique
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class SolveurSys Un SolveurSys represente n'importe qu'elle classe
Definition SolveurSys.h:32