TrioCFD 1.9.9_beta
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 class Champ_front_contact_VEF Enables scalar coupling (temperature or concentration) between problems by computing
36 *
37 * the wall value that equalizes the fluxes.
38 * calculer_coeffs_echange stores grad_num_local and grad_fro_local such that (up to sign?)
39 * flux = grad_num_local + Scal_paroi*grad_fro_local
40 * mettre_a_jour retrieves the grad* from the opposite side and computes Scal_paroi
41 * so as to equalize the fluxes.
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; // Are we in a conduction problem?
105 OBS_PTR(Front_VF) fr_vf_autre_pb;
107
113
114 IntVect connect_bords; // Connectivity array of the boundary faces of the two conjugate boundaries (sequential)
116
121 DoubleVect Scal_moy;
122
123 DoubleVect coeff_amort_num;
125
126 IntVect elems_voisin_bord_; //Contains the index of the neighboring element for each boundary face
127 IntVect faces_coin; //Takes the value 1 if the boundary face is a corner face (0 otherwise)
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
class Ch_front_var_instationnaire_dep This abstract class represents a field on a boundary,
Class Champ_Inc_base.
class Champ_front_base Base class for the hierarchy of boundary fields.
class Champ_front_contact_VEF Enables scalar coupling (temperature or concentration) between problems...
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
DOES NOTHING, to override. This method can calculate and store useful data for the.
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
DOES NOTHING, to override.
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
Initialization at the beginning of calculation.
const Domaine_dis_base & domaine_dis() const override
const Champ_Inc_base & inconnue() const
const Milieu_base & milieu() const
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_VEF
Definition Domaine_VEF.h:53
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
class Equation_base The role of an equation is the calculation of one or more fields....
class Front_VF
Definition Front_VF.h:36
class Frontiere_dis_base Class representing a discretized boundary.
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