16#include <Source_rayo_semi_transp_base.h>
17#include <Cond_lim_rayo_semi_transp.h>
18#include <Pb_rayo_semi_transp.h>
19#include <Discretisation_base.h>
20#include <Flux_radiatif_base.h>
21#include <Schema_Temps_base.h>
22#include <Champ_Uniforme.h>
23#include <Fluide_base.h>
46 double temps = pb_fluide_->presentTime();
50 statistics().begin_count(STD_COUNTERS::update_variables, statistics().get_last_opened_counter_level() + 1);
52 statistics().end_count(STD_COUNTERS::update_variables);
57 le_schema_en_temps_ = un_schema_en_temps;
85 ch_l_rayo.
nommer(
"longueur_de_rayonnement");
95 Cerr <<
"The absorption coefficient is not a uniform OWN_PTR(Champ_base) but a " << coeff_abs.
que_suis_je() <<
". modify the method " << finl;
96 Cerr <<
"Pb_Couple_rayo_semi_transp::discretiser to be able to handle this type of Champ_Don" << finl;
98 fluide.
initialiser(pb_fluide_->schema_temps().temps_courant());
102 Cerr <<
"Error 0 in Pb_Couple_rayo_semi_transp::discretiser you have probably not specified all the" << finl;
103 Cerr <<
"physical parameters of your incompressible fluid to handle a semi-transparent radiation problem" << finl;
109 Cerr <<
"Error in Pb_rayo_semi_transp::readOn: the semi-transparent radiation problem can only be used" << finl;
110 Cerr <<
"with a Fluide_base and not " << pb_fluide_->milieu().que_suis_je() << finl;
117 int contient_source_rayo_semi_transp = 0;
119 for (
int j = 0; j < pb_fluide_->nombre_d_equations(); j++)
124 for (
int num_cl = 0; num_cl < la_zcl.
nb_cond_lim(); num_cl++)
141 for (
int num_source = 0; num_source < les_sources.size(); num_source++)
143 contient_source_rayo_semi_transp = 1;
146 if (contient_source_rayo_semi_transp == 0)
148 Cerr <<
"Warning, you have not defined a semi-transparent radiation source term" << finl;
149 Cerr <<
"remember to add the source term Source_rayo_semi_transp in the list of source terms " << finl;
150 Cerr <<
"of the energy equation" << finl;
167 for (
int num_cl_rayo = 0; num_cl_rayo < les_cl_rayo.size(); num_cl_rayo++)
176 else if (sub_type(
Symetrie, la_cl_rayo.valeur()))
182 Cerr <<
"Error: the boundary conditions of the radiation equation" << finl;
183 Cerr <<
"must necessarily be of radiation type" << finl;
194 for (
int num_cl_rayo = 0; num_cl_rayo < les_cl_rayo.size(); num_cl_rayo++)
198 if (la_cl_rayo->frontiere_dis().le_nom() == nom_bord)
207 Cerr <<
"Error: the boundary conditions of the radiation equation" << finl;
208 Cerr <<
"must necessarily be of radiation type" << finl;
214 Cerr <<
"Error: Pb_rayo_semi_transp::flux_radiatif" << finl;
215 Cerr <<
"there is no boundary condition named " << nom_bord << finl;
class Champ_Don_base base class of Given Fields (not calculated)
int fixer_nb_valeurs_nodales(int nb_noeuds) override
Sets the number of degrees of freedom per component.
virtual double changer_temps(const double t)
Sets the time at which the field is defined.
class Champ_front_base Base class for the hierarchy of boundary fields.
class Cond_lim_base Base class for the hierarchy of classes that represent the different boundary con...
virtual bool is_bc_rayo_semi_transp(Cond_lim_rayo_semi_transp *&la_cl_rayo)
Base class for semi-transparent radiation boundary conditions.
virtual void associer_pb_rayo_semi_transp(const Pb_rayo_semi_transp &)
virtual void completer_Cl_opposee_si_contact()
virtual void recherche_emissivite_et_A()
class Cond_lim Generic class used to represent any class
class Conds_lim This class represents a vector of boundary conditions.
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
int nb_cond_lim() const
Returns the number of boundary conditions.
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
Class defining operators and methods for all reading operation in an input flow (file,...
void completer() override
Completes the construction (initialization) of objects associated with the equation.
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
class Equation_base The role of an equation is the calculation of one or more fields....
Sources & sources()
Returns the source terms associated with the equation.
virtual void mettre_a_jour(double temps)
The value of the unknown at the time step has been calculated.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
virtual void fixer_nb_comp(int i)
Sets the number of components of the field.
void nommer(const Nom &) override
Gives a name to the field.
virtual const Nom & fixer_unite(const Nom &)
Specifies the unit of a scalar field or whose all components have the same unit.
Base class for an incompressible fluid and its properties:
bool is_rayo_semi_transp() const override
void typer_longeur_rayo(const Nom &typ)
int initialiser(const double temps) override
Initializes the fluid parameters.
Champ_Don_base & longueur_rayo()
Champ_front_base & flux_radiatif()
virtual void calculer_flux_radiatif(const Equation_base &eq_temp)=0
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
class Nom: a character string for naming TRUST objects.
An array of character strings (VECT(Nom)).
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 Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Semi-transparent radiation problem. Pb_rayo_semi_transp is a Probleme_base with 4 specific features:
void preparer_calcul() override
Prepares the computation: initializes the medium parameters and prepares the computation of each equa...
const Champ_front_base & flux_radiatif(const Nom &nom_bord) const
bool iterateTimeStep(bool &converged) override
In the case solveTimeStep uses an iterative process, this method executes a single iteration.
void validateTimeStep() override
Validates the calculated unknown by moving the present time at the end of the time step.
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
void discretise_longueur_rayo()
void typer_lire_milieu(Entree &is) override
int nombre_d_equations() const override
Eq_rayo_semi_transp & eq_rayo()
void calculer_flux_radiatif()
void associer_sch_tps_base(const Schema_Temps_base &) override
Associates a time scheme with the problem.
bool initTimeStep(double dt) override
This method allocates and initializes the unknown and given fields for the future time step.
const Equation_base & equation(int i) const override
Eq_rayo_semi_transp eq_rayo_
class Probleme_base It is a Probleme_U that is not a coupling.
virtual void discretiser_equations()
Postraitements les_postraitements_
const Schema_Temps_base & schema_temps() const
Returns the time scheme associated with the problem.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
virtual void associer_pb(const Probleme_base &)
virtual int mettre_a_jour()
Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).
Base class for output streams.
Source_rayo_semi_transp_base Base class of the source term hierarchy for the temperature.
class Sources Sources represents a list of Source objects.
Symetrie On symmetry faces, the following properties hold: