TrioCFD 1.9.9_beta
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
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Class Champ_Inc_base.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
OWN_PTR(Champ_Inc_base) la_pression
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void associer_milieu_base(const Milieu_base &milieu) override
Associates a physical medium to the equation; the medium is cast to Fluide_base.
int preparer_calcul() override
Everything that does not depend on other possible problems.
void completer() override
Completes the construction (initialization) of objects associated with the 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
The value of the unknown at the time step has been calculated.
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_
Convection_Diffusion_Temperature Special case of Convection_Diffusion_std.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Matrice class - Generic class in the matrix hierarchy.
Definition Matrice.h:34
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
Navier_Stokes_std This class carries the terms of the momentum equation.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
An array of character strings (VECT(Nom)).
Definition Noms.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class SolveurSys A SolveurSys represents any class
Definition SolveurSys.h:32