TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_contact_Correlation_VEF.h
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#ifndef Echange_contact_Correlation_VEF_included
17#define Echange_contact_Correlation_VEF_included
18
19#include <Temperature_imposee_paroi.h>
20#include <Conduction.h>
21#include <Parser_U.h>
22
23class Front_VF;
24class Domaine_VEF;
25#include <Domaine_forward.h>
26class Param;
27
29{
30 Declare_instanciable(Echange_contact_Correlation_VEF);
31public:
32 void mettre_a_jour(double) override;
33 void completer() override;
34 virtual void imprimer(double) const;
35 virtual int limpr(double, double) const;
36
37 // Returns the heat exchange coefficient value on cell i.
38 virtual double calculer_coefficient_echange(int i);
39
40 // Returns U, T and physical properties on the 1D cell i
41 inline double getU(int i) const { return U(i); }
42 inline double getT(int i) const { return T(i); }
43 inline double getMu(int i) const { return mu(i); }
44 inline double getLambda(int i) const { return lambda(i); }
45 inline double getRho(int i) const { return rho(i); }
46 inline double getCp() const { return Cp; }
47 inline double getDh(int i) const { return diam(i); }
48 inline double getQh() const { return debit; }
49
50protected:
51 void set_param(Param& param) const override;
52 int lire_motcle_non_standard(const Motcle&, Entree&) override;
53
54 void calculer_CL();
55 void calculer_Q();
57 void init();
58 void calculer_Vitesse();
59 void calculer_Tfluide();
60 void calculer_h_solide(DoubleTab&);
61 double pdt_scalSqrt(const Domaine_VEF&, int, int, int, int, double);
62 double pdt_scal(const Domaine_VEF&, int, int, int, int, double);
63 double surfacesVEF(const Domaine_VEF&, int, int);
64 void init_tab_echange();
65
67 DoubleTab autre_h;
68 bool Reprise_temperature = false;
69
70 double T_CL0 = -100., T_CL1 = -100.; // BC on the domain. Sequential: = Tinf and Tsup; Parallel: = neighbor temperature
71 double Tinf = -100., Tsup = -100.; // Inlet and outlet temperature
72 int dir = -1; // Direction du cylindre
79 double dt_impr = -100.;
80 double Cp = -100.;
81 double debit = -100.;
82 double xinf = -100., xsup = -100.;
83
84 DoubleVect vol; // volumes of the Sdz slices along the flow direction
85 DoubleVect coord; // coordinates of the 1D discretization points
86
87 int N = -1; // number of 1D mesh points for velocity and temperature
88 DoubleVect U, T; // fluid unknowns: velocity and temperature
89 DoubleVect Qvol; // volumetric power in the 1D fluid
90 DoubleVect rho, mu, lambda, diam; // array of fluid physical properties at a given instant
91 DoubleVect h_correlation; // heat exchange coefficient from correlation
92 DoubleTab h_solide; // heat exchange coefficient from correlation
93 DoubleVect flux_radiatif; // radiative flux between patches
94
95private:
96 int avec_rayo = -1;
97 double emissivite = -100.;
98 IntTab patches_rayo;
99 IntVect nb_faces_patch;
100 IntVect correspondance_face_patch;
101 IntTab correspondance_fluide_patch;
102
103};
104
105#endif
class Domaine_VEF
Definition Domaine_VEF.h:53
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
double pdt_scalSqrt(const Domaine_VEF &, int, int, int, int, double)
void calculer_CL()
Computes the boundary conditions to apply to the energy equation.
virtual void imprimer(double) const
Prints the results.
void calculer_Tfluide()
Computes the 1D fluid temperature by solving energy conservation.
void completer() override
Completes and initializes the class attributes.
double pdt_scal(const Domaine_VEF &, int, int, int, int, double)
void set_param(Param &param) const override
virtual double calculer_coefficient_echange(int i)
Computes the heat exchange coefficient using the correlation specified in the data file.
void init_tab_echange()
Initializes the tab_ech array for parallel execution.
virtual int limpr(double, double) const
Tests whether output printing is requested.
void calculer_Q()
Computes the volumetric power source term in the 1D fluid energy equation.
double surfacesVEF(const Domaine_VEF &, int, int)
void calculer_Vitesse()
Computes the velocity by mass conservation.
void calculer_prop_physique()
Computes rho, mu, and lambda of the fluid at the current temperature.
void calculer_h_solide(DoubleTab &)
Computes the local heat exchange coefficient in the solid cell.
void mettre_a_jour(double) override
Updates the velocity, fluid temperature, and heat exchange coefficient.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
class Front_VF
Definition Front_VF.h:36
A character string (Nom) in uppercase.
Definition Motcle.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Parser_U Version of the Parser class, deriving from Objet_U.
Definition Parser_U.h:32
Temperature_imposee_paroi Imposes the wall temperature in a Convection_Diffusion_Temperature type equ...