TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_front_contact_VEF.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 Champ_front_contact_VEF_included
17#define Champ_front_contact_VEF_included
18
19#include <Ch_front_var_instationnaire_dep.h>
20#include <Domaine_VEF.h>
21#include <TRUST_Ref.h>
22#include <Front_VF.h>
23#include <Motcle.h>
24
25class Equation_base;
26class Milieu_base;
30class Champ_Inc_base;
31class Front_dis_base;
32class Equation_base;
33class Milieu_base;
34
35/*! @brief classe Champ_front_contact_VEF Permet le couplage scalaire (temperature ou concentration) entre problemes en calculant
36 *
37 * la valeur a la paroi qui permet d'egaliser les flux.
38 * calculer_coeffs_echange stocke grad_num_local et grad_fro_local tels que (aux signes pres?)
39 * flux = grad_num_local + Scal_paroi*grad_fro_local
40 * mettre_a_jour recupere les grad* d'en face et calcule Scal_paroi de
41 * facon a egaliser les flux.
42 *
43 * @sa Champ_front_var_instationnaire Champ_Inc
44 */
46{
47
48 Declare_instanciable(Champ_front_contact_VEF);
49
50public:
51 int initialiser(double temps, const Champ_Inc_base& inco) override;
52 Champ_front_base& affecter_(const Champ_front_base& ch) override ;
53 void mettre_a_jour(double temps) override;
54 void calculer_coeffs_echange(double temps) override;
55 void creer(const Nom&, const Nom&,const Nom&, const Nom&, const Motcle&);
56 const Champ_Inc_base& inconnue() const;
57 const Equation_base& equation() const;
58 const Domaine_dis_base& domaine_dis() const override;
59 const Domaine_Cl_dis_base& domaine_Cl_dis() const ;
60 const Frontiere_dis_base& front_dis() const ;
62 const Nom& nom_bord_oppose() const;
63 const Milieu_base& milieu() const;
64
65 virtual void calcul_grads_transf(double temps);
66 virtual void calcul_grads_locaux(double temps);
67 void calcul_coeff_amort();
68 void recupere_gradients_autre_pb(const Front_VF&, DoubleVect&, DoubleVect&);
69 DoubleVect& trace_face_raccord(const Front_VF& fr_vf,const DoubleVect& y,DoubleVect& x);
71 void verifier_scalaire_bord(double temps);
73
74 void connectivity_failed(const Domaine_VEF&, int&, int&,
75 const Domaine_VEF&, int&, int&, Nom&, Nom&) ;
76 void remplir_faces_coin();
78 void test_faces_coin();
79
80 inline DoubleVect& set_gradient_num_local();
81 inline const DoubleVect& get_gradient_num_local() const;
82 inline DoubleVect& set_gradient_fro_local();
83 inline const DoubleVect& get_gradient_fro_local() const;
84
85 inline DoubleVect& set_gradient_num_transf();
86 inline const DoubleVect& get_gradient_num_transf() const;
87 inline DoubleVect& set_gradient_fro_transf();
88 inline const DoubleVect& get_gradient_fro_transf() const;
89
90 inline DoubleVect& set_coeff_amort_num();
91 inline const DoubleVect& get_coeff_amort_num() const;
92 inline DoubleVect& set_coeff_amort_denum();
93 inline const DoubleVect& get_coeff_amort_denum() const;
94
95 inline const IntVect& get_elems_voisin_bord() const;
96 inline const Nom& get_nom_bord1() const;
97 inline const IntVect& get_connect_bords() const;
98 inline const IntVect& get_faces_coin() const;
99
100protected :
101 int is_conduction=0; // Est-on dans un probleme conduction ?
105 OBS_PTR(Front_VF) fr_vf_autre_pb;
107
113
114 IntVect connect_bords; // Tableau de connectivite des faces de bord des deux bord conjugues (en sequentiel)
116
121 DoubleVect Scal_moy;
122
123 DoubleVect coeff_amort_num;
125
126 IntVect elems_voisin_bord_; //Contient le numero de l element voisin pour chaque face de bord
127 IntVect faces_coin; //Prend la valeur 1 si la face de bord est une face de coin (0 sinon)
129};
130
131
132
133
134
139
141{
142 return gradient_num_local;
143}
144
149
151{
152 return gradient_fro_local;
153}
154
155
160
162{
163 return gradient_num_transf;
164}
165
170
172{
173 return gradient_fro_transf;
174}
175
177{
178 return coeff_amort_num;
179}
180
181inline const DoubleVect& Champ_front_contact_VEF::get_coeff_amort_num() const
182{
183 return coeff_amort_num;
184}
185
187{
188 return coeff_amort_denum;
189}
190
192{
193 return coeff_amort_denum;
194}
195
197{
198 return elems_voisin_bord_;
199}
200
202{
203 return nom_bord1;
204}
205
207{
208 return connect_bords;
209}
210
211inline const IntVect& Champ_front_contact_VEF::get_faces_coin() const
212{
213 return faces_coin;
214}
215
216#endif
classe Ch_front_var_instationnaire_dep Cette classe abstraite represente un champ sur une frontiere,
Classe Champ_Inc_base.
classe Champ_front_base Classe de base pour la hierarchie des champs aux frontieres.
classe Champ_front_contact_VEF Permet le couplage scalaire (temperature ou concentration) entre probl...
const DoubleVect & get_gradient_fro_transf() const
const IntVect & get_elems_voisin_bord() const
const DoubleVect & get_gradient_fro_local() const
void recupere_gradients_autre_pb(const Front_VF &, DoubleVect &, DoubleVect &)
virtual void calcul_grads_transf(double temps)
const DoubleVect & get_coeff_amort_denum() const
const Equation_base & equation() const
void calculer_coeffs_echange(double temps) override
NE FAIT RIEN, a surcharger Cette methode peut calculer et stocker des donnees utiles a la.
void creer(const Nom &, const Nom &, const Nom &, const Nom &, const Motcle &)
virtual void calcul_grads_locaux(double temps)
const DoubleVect & get_coeff_amort_num() const
OBS_PTR(Champ_Inc_base) l_inconnue
OBS_PTR(Champ_front_contact_VEF) ch_fr_autre_pb
const Domaine_Cl_dis_base & domaine_Cl_dis() const
void connectivity_failed(const Domaine_VEF &, int &, int &, const Domaine_VEF &, int &, int &, Nom &, Nom &)
OBS_PTR(Front_VF) fr_vf_autre_pb
const DoubleVect & get_gradient_num_transf() const
const Frontiere_dis_base & front_dis() const
void verifier_scalaire_bord(double temps)
Champ_front_base & affecter_(const Champ_front_base &ch) override
void mettre_a_jour(double temps) override
NE FAIT RIEN, a surcharger.
DoubleVect & trace_face_raccord(const Front_VF &fr_vf, const DoubleVect &y, DoubleVect &x)
OBS_PTR(Champ_Inc_base) l_inconnue2
void associer_ch_inc_base(const Champ_Inc_base &)
OBS_PTR(Champ_Inc_base) l_inconnue1
const DoubleVect & get_gradient_num_local() const
const IntVect & get_connect_bords() const
const IntVect & get_faces_coin() const
int initialiser(double temps, const Champ_Inc_base &inco) override
Initialisation en debut de calcul.
const Domaine_dis_base & domaine_dis() const override
const Champ_Inc_base & inconnue() const
const Milieu_base & milieu() const
classe Domaine_Cl_dis_base Les objets Domaine_Cl_dis_base representent les conditions aux limites
class Domaine_VEF
Definition Domaine_VEF.h:54
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
class Front_VF
Definition Front_VF.h:36
classe Frontiere_dis_base Classe representant une frontiere discretisee.
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
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31