16#include <Frontiere_ouverte_temperature_imposee_rayo_semi_transp.h>
17#include <Echange_externe_impose_rayo_semi_transp.h>
18#include <Echange_global_impose_rayo_semi_transp.h>
19#include <Echange_contact_rayo_semi_transp_VDF.h>
20#include <Frontiere_ouverte_rayo_semi_transp.h>
21#include <Neumann_paroi_rayo_semi_transp_VDF.h>
22#include <Champ_front_uniforme.h>
23#include <Eq_rayo_semi_transp.h>
24#include <Pb_rayo_semi_transp.h>
25#include <Flux_radiatif_VDF.h>
26#include <Schema_Temps_base.h>
27#include <Champ_Uniforme.h>
28#include <Fluide_base.h>
29#include <Domaine_VDF.h>
39 const double sigma,
double temps)
41 const DoubleTab& l_rayo = longueur_rayo.
valeurs();
42 const DoubleTab& n = indice.
valeurs();
44 const DoubleTab& kappa = coeff_abs.
valeurs();
51 assert(le_champ_front->nb_comp() == 1);
52 DoubleTab& tab = le_champ_front->valeurs_au_temps(temps);
56 assert(longueur_rayo.
nb_comp() == 1);
57 assert(coeff_abs.
nb_comp() == 1);
62 const int nfin = ndeb + le_bord.
nb_faces();
63 double nn = -123., k = -123., l_r = -123.;
64 double epsi = -123., T = -123.;
67 for (
int face = ndeb; face < nfin; face++)
69 int elem = face_voisins(face, 0);
81 l_r = l_rayo(elem, 0);
98 epsi = epsilon(face - ndeb, 0);
101 double numer_coeff = l_r;
102 numer_coeff *= 4 * nn * nn * sigma * pow(T, 4);
104 double denum_coeff = 3 * k * epsi;
105 denum_coeff = 1 / denum_coeff;
106 denum_coeff *=
A_ * (2 - epsi);
107 denum_coeff = denum_coeff + eF;
109 if (epsi < DMINFLOAT)
110 tab(face - ndeb, 0) = 0.;
112 tab(face - ndeb, 0) = numer_coeff / denum_coeff;
122 const int nb_faces = le_bord.
nb_faces();
127 for (
int num_cl_temp = 0; num_cl_temp < les_cl_temp.size(); num_cl_temp++)
130 Nom nom_cl_temp = la_cl_temp->frontiere_dis().le_nom();
166 Cerr <<
"Implementation needed for other boundary conditions of the temperature equation 1 " << finl;
173 Cerr <<
"Error: there is no boundary condition on a boundary named: " <<
le_nom() << finl;
179 DoubleTab& Flux = flux_radiatif_->valeurs();
195 assert(Tb->nb_comp() == 1);
197 double bilan_flux = 0.;
199 double kappa_F = -123., epsi = -123.;
200 double Tbord = -123., n = -123.;
203 for (
int face = 0; face < nb_faces; face++)
205 int elem = face_voisins(face + ndeb, 0);
207 elem = face_voisins(face + ndeb, 1);
210 kappa_F = kappa(0, 0);
212 kappa_F = kappa(elem, 0);
225 Tbord = Tb->valeurs()(0, 0);
227 Tbord = Tb->valeurs()(face, 0);
229 const double G_F = irradiance(elem);
232 double denum =
A_ * (2 - epsi);
233 denum /= 3 * kappa_F * epsi;
236 const double numer = G_F - 4 * n * n * sigma * pow(Tbord, 4);
237 double grad_G = numer / denum;
239 if (epsi < DMINFLOAT)
242 Flux(face, 0) = -grad_G / (3 * kappa_F);
244 bilan_flux += face_surfaces(face + ndeb) * Flux(face, 0);
250 Cout <<
"Radiative flux on the boundary " << le_bord.
le_nom() <<
": " << bilan_flux << finl;
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
DoubleTab & valeurs() override
Returns the array of field values at the current time.
class Champ_front_base Base class for the hierarchy of boundary fields.
virtual DoubleTab & valeurs() override
Returns the array of field values.
virtual DoubleTab & valeurs_au_temps(double temps)=0
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
class Cond_lim Generic class used to represent any class
class Conds_lim This class represents a vector of boundary conditions.
static void verifier_bord(const char *const msg, const DoubleVect &arr, int num_deb)
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
double dist_norm_bord(int num_face) const override
Returns the normal distance for a boundary face (Cartesian coordinates).
virtual const DoubleVect & face_surfaces() const
int face_voisins(int num_face, int i) const
Returns the neighbouring element of num_face in direction i.
class Echange_externe_impose_rayo_semi_transp
Champ_front_base & temperature_bord()
class Echange_global_impose_rayo_semi_transp
Champ_front_base & temperature_bord()
Class defining operators and methods for all reading operation in an input flow (file,...
const Pb_rayo_semi_transp & pb_rayo_semi_transp() const
const Champ_Inc_base & inconnue() const override
class Equation_base The role of an equation is the calculation of one or more fields....
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual int nb_comp() const
Base class for an incompressible fluid and its properties:
Champ_Don_base & indice()
void calculer_flux_radiatif(const Equation_base &eq_temp) override
void evaluer_cl_rayonnement(Champ_front_base &Tb, const Champ_Don_base &, const Champ_Don_base &, const Champ_Don_base &, const Domaine_VF &, const double, double)
Champ_front_base & emissivite()
int num_premiere_face() const
const Nom & le_nom() const override
Returns the name of the geometric boundary.
Champ_front_base & temperature_bord()
Champ_front_base & temperature_bord()
Champ_front_base & temperature_bord()
class Nom: a character string for naming TRUST objects.
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
const double & valeur_sigma() const
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
int limpr() const
Returns 1 if there is a need to perform a print (cf dt_impr) Returns 0 otherwise.
Base class for output streams.
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")