TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Champ_front_contact_fictif_VEF.cpp
1/****************************************************************************
2* Copyright (c) 2026, 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#include <Champ_front_contact_fictif_VEF.h>
17#include <Probleme_base.h>
18#include <Champ_Uniforme.h>
19#include <Fluide_Incompressible.h>
20#include <Interprete.h>
21#include <Domaine.h>
22#include <Champ_Fonc_P0_VEF.h>
23
24Implemente_instanciable(Champ_front_contact_fictif_VEF,"Champ_front_contact_fictif_VEF",Champ_front_contact_VEF);
25
26
28{
29 return os;
30}
31
32
34{
36 is >> conduct_fictif >> ep_fictif ;
37 Cerr << "Champ_front_contact_fictif_VEF::readOn : " << nom_pb1 << nom_bord1 << finl;
38 Cerr << " connecte a : " << nom_pb2 << nom_bord2 << finl;
39 //connect_est_remplit=0;
40 return is;
41}
42
44{
45
46
47 const Frontiere& la_front=la_frontiere_dis->frontiere();
48 int nb_faces=la_front.nb_faces();
49 DoubleTab& tab=valeurs();
50
51 // On recupere les coefficients gradient_num_transf et gradient_fro_transf de l'autre probleme
52 DoubleVect gradient_num_transf_autre_pb(nb_faces);
53 DoubleVect gradient_fro_transf_autre_pb(nb_faces);
54 if (!ch_fr_autre_pb)
55 {
56 Cerr << "Attention: Vous utilisez une condition de contact Champ_front_contact_fictif_VEF sur le bord " << nom_bord1 << " sur le probleme "<< nom_pb1 <<" " << finl;
57 Cerr << "Vous devez avoir un Champ_front_contact_fictif_VEF equivalent sur le bord " << nom_bord2 << " du probleme "<<nom_pb2<<" " << finl;
59 }
60 trace_face_raccord(fr_vf_autre_pb.valeur(),ch_fr_autre_pb->get_gradient_num_transf(),gradient_num_transf_autre_pb);
61 trace_face_raccord(fr_vf_autre_pb.valeur(),ch_fr_autre_pb->get_gradient_fro_transf(),gradient_fro_transf_autre_pb);
62
63
64 // PQ : 10/09/07 : pour plus de lisibilite, on renomme les tableaux servant
65 // au calcul de la temperature parietale, de sorte d'avoir :
66 //
67 // h1.Tf1 + (h2.hs/(h2+hs)). Tf2
68 // Tw_1 = ------------------------------
69 // (h1+hs) - (hs*hs/(h2+hs))
70 //
71 // avec :
72
73 double hs = conduct_fictif / ep_fictif; // coefficient d'echange du solide fictif
74 DoubleVect& h1Tf1=(gradient_num_local); // temperature du fluide 1
75 DoubleVect& h1=(gradient_fro_local); // coefficient d'echange du fluide 1
76 DoubleVect& h2Tf2=(gradient_num_transf_autre_pb); // temperature du fluide 2
77 DoubleVect& h2=(gradient_fro_transf_autre_pb); // coefficient d'echange du fluide 2
78
79
80 // Calcul de la temperature imposee
81 int fac_front;
82 for (fac_front=0; fac_front<nb_faces; fac_front++)
83 {
84 tab(fac_front,0)= -( h1Tf1(fac_front) + (hs*h2Tf2(fac_front)/(hs+h2(fac_front))) )
85 / ( hs+h1(fac_front) - (hs*hs/(hs+h2(fac_front))) );
86
87 // Cerr << " H1 " << h1(fac_front) << finl;
88 // Cerr << " T1 " << Tf1(fac_front) << finl;
89 // Cerr << " H2 " << h2(fac_front) << finl;
90 // Cerr << " T2 " << Tf2(fac_front) << finl;
91 // Cerr << " Hs " << hs << finl;
92 // Cerr << " TW " << tab(fac_front,0) << finl;
93 // Cerr << " " << finl;
94
95 }
97 // Verification de la coherence des temperatures de bord calculees
98 //verifier_temperature_bord();
99}
100
virtual DoubleTab & valeurs() override
Renvoie le tableau des valeurs du champ.
classe Champ_front_contact_VEF Permet le couplage scalaire (temperature ou concentration) entre probl...
DoubleVect & trace_face_raccord(const Front_VF &fr_vf, const DoubleVect &y, DoubleVect &x)
classe Champ_front_contact_fictif_VEF Classe derivee de Champ_front_contact_VEF elle-meme derivant de
void mettre_a_jour(double temps) override
NE FAIT RIEN, a surcharger.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
int_t nb_faces() const
Renvoie le nombre de faces de la frontiere.
Definition Frontiere.h:59
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")