TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Pb_rayo_semi_transp.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 Pb_rayo_semi_transp_included
17#define Pb_rayo_semi_transp_included
18
19#include <Eq_rayo_semi_transp.h>
20#include <Probleme_base.h>
21
22/*! @brief Le Pb_rayo_semi_transp est un Probleme_base qui a 4 particularites : * Son equation doit etre typee en fonction de la dicretisation.
23 *
24 * Cela impose de differer certaines initialisations jusqu'a
25 * connaitre la discretisation utilisee.
26 * * Il partage son domaine avec un probleme de type hydraulique
27 * * Il n'y a qu'une seule valeur temporelle (futur=present).
28 * Il faudrait en faire un probleme independant du temps.
29 * * Il conserve une ref sur le probleme hydraulique. Cette ref est utilisee de
30 * maniere intensive.
31 *
32 *
33 * @sa Pb_Couple_rayo_semi_transp Eq_rayo_semi_transp
34 */
36{
37 Declare_instanciable(Pb_rayo_semi_transp);
38public:
39 void terminate() override { finir(); }
40
41 double computeTimeStep(bool& stop) const override
42 {
43 stop=false;
44 return DMAXFLOAT;
45 }
46
47 bool initTimeStep(double dt) override;
48 bool iterateTimeStep(bool& converged) override;
49 void validateTimeStep() override;
50
51 void completer() override { }
52 int nombre_d_equations() const override { return 1; }
53
54 double calculer_pas_de_temps() const override { return DMAXFLOAT; }
55
56 // Cette methode ne doivent pas servir : on passe par l'interface de Problem
57 void mettre_a_jour(double temps) override { Process::exit(); }
58
59 void preparer_calcul() override;
60 void associer_sch_tps_base(const Schema_Temps_base&) override;
61
62 const Champ_front_base& flux_radiatif(const Nom& nom_bord) const;
64
66 void get_noms_champs_postraitables(Noms& nom,Option opt=NONE) const override;
67 void creer_champ(const Motcle& motlu) override { }
68
69 inline Probleme_base& probleme_fluide() { return pb_fluide_.valeur(); }
70 inline const Probleme_base& probleme_fluide() const { return pb_fluide_.valeur(); }
71 inline const double& valeur_sigma() const { return sigma_; }
72 inline void associer_probleme_fluide(Probleme_base& Pb) { pb_fluide_ = Pb; }
73 void typer_lire_milieu(Entree& is) override;
74
75 inline const Equation_base& equation(int i) const override
76 {
77 assert(i==0);
78 return eq_rayo_;
79 }
80
81 inline Equation_base& equation(int i) override
82 {
83 assert(i==0);
84 return eq_rayo_;
85 }
86
87 inline const Equation_base& get_equation_by_name(const Nom& un_nom) const override
88 {
89 assert(Motcle(un_nom)==Motcle("Eq_rayo_semi_transp"));
90 return eq_rayo_;
91 }
92
93 inline Equation_base& getset_equation_by_name(const Nom& un_nom) override
94 {
95 assert(Motcle(un_nom)==Motcle("Eq_rayo_semi_transp"));
96 return eq_rayo_;
97 }
98
99 inline Eq_rayo_semi_transp& eq_rayo() { return eq_rayo_; }
100 inline const Eq_rayo_semi_transp& eq_rayo() const { return eq_rayo_; }
101
102protected :
103 static constexpr double sigma_ = 5.67e-8;
106};
107
108#endif /* Pb_rayo_semi_transp_included */
classe Champ_front_base Classe de base pour la hierarchie des champs aux frontieres.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
Le Pb_rayo_semi_transp est un Probleme_base qui a 4 particularites : * Son equation doit etre typee e...
double calculer_pas_de_temps() const override
Calcul la valeur du prochain pas de temps du probleme.
void preparer_calcul() override
Prepare le calcul: initialise les parametres du milieu et prepare le calcul de chacune des equations.
void creer_champ(const Motcle &motlu) override
Equation_base & equation(int i) override
void associer_probleme_fluide(Probleme_base &Pb)
const Champ_front_base & flux_radiatif(const Nom &nom_bord) const
OBS_PTR(Probleme_base) pb_fluide_
bool iterateTimeStep(bool &converged) override
In the case solveTimeStep uses an iterative process, this method executes a single iteration.
void terminate() override
This method is called once at the end, after any other one.
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
double computeTimeStep(bool &stop) const override
Compute the value the Problem would like for the next time step.
void typer_lire_milieu(Entree &is) override
int nombre_d_equations() const override
Eq_rayo_semi_transp & eq_rayo()
const double & valeur_sigma() const
Probleme_base & probleme_fluide()
void mettre_a_jour(double temps) override
Effectue une mise a jour en temps du probleme.
static constexpr double sigma_
Equation_base & getset_equation_by_name(const Nom &un_nom) override
(B. Math): Methode virtuelle ajoutee pour les problemes ayant plusieurs equations de meme type (Probl...
void associer_sch_tps_base(const Schema_Temps_base &) override
Associe un schema en temps au probleme.
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
const Probleme_base & probleme_fluide() const
const Eq_rayo_semi_transp & eq_rayo() const
void completer() override
Complete les equations associees au probleme.
const Equation_base & get_equation_by_name(const Nom &un_nom) const override
(B. Math): Methode virtuelle ajoutee pour les problemes ayant plusieurs equations de meme type (Probl...
Eq_rayo_semi_transp eq_rayo_
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
virtual void finir()
Finit le postraitement et sauve le probleme dans un fichier.
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
class Schema_Temps_base