TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Temperature_imposee_paroi_rayo_transp.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 <Temperature_imposee_paroi_rayo_transp.h>
17#include <Champ_front_contact_rayo_transp_VEF.h>
18#include <Pb_Fluide_base.h>
19#include <Equation_base.h>
20#include <Domaine_VEF.h>
21
22Implemente_instanciable(Temperature_imposee_paroi_rayo_transp, "Paroi_temperature_imposee_rayo_transp", Temperature_imposee_paroi);
23
25
27
29{
30 assert(!le_modele_rayo_);
31
32 // on recupere le modele rayo seulement si pb fluide et rayo ... !
33 const Probleme_base& this_pb = domaine_Cl_dis().equation().probleme();
34 if (sub_type(Pb_Fluide_base, this_pb)) // sinon Pb_conduction par exemple ;)
35 {
36 if (this_pb.milieu().is_rayo_transp())
37 {
38 le_modele_rayo_ = ref_cast(Pb_Fluide_base, this_pb).get_mod_rayo_transp();
39
40 if (le_modele_rayo_->nom_pb_rayonnant() != this_pb.le_nom())
41 error_pb_name(que_suis_je(), this_pb.le_nom(), le_modele_rayo_->nom_pb_rayonnant());
42 }
43 else
44 error_non_rad_bc(que_suis_je(), this_pb.le_nom(), frontiere_dis().frontiere().le_nom(), "temperature_imposee_paroi");
45 }
46
48}
49
55
57{
58 if (sub_type(Champ_front_contact_rayo_transp_VEF, le_champ_front.valeur()))
59 {
60 Champ_front_contact_rayo_transp_VEF& Ch_contact = ref_cast(Champ_front_contact_rayo_transp_VEF, le_champ_front.valeur());
61 Ch_contact.calculer_temperature_bord(temps);
62 }
63 else
64 {
65 // La temperature de paroi etant directement donnee par le champ_front associe a la condition a la limite, il n'y a rien a calculer ici
66 }
67
68 const Front_VF& front_vf = ref_cast(Front_VF, frontiere_dis());
69 for (int numfa = 0; numfa < front_vf.nb_faces(); numfa++)
70 teta_i_[numfa] = val_imp(numfa);
71}
Domaine_Cl_dis_base & domaine_Cl_dis()
Renvoie le domaine des conditions aux limites discretisee dont l'objet fait partie.
virtual void completer()
NE FAIT RIEN A surcharger dans les classes derivees.
virtual int initialiser(double temps)
Initialisation en debut de calcul.
virtual Frontiere_dis_base & frontiere_dis()
Renvoie la frontiere discretisee a laquelle les conditions aux limites s'appliquent.
void error_non_rad_bc(const Nom &nom_class, const Nom &nom_pb, const Nom &nom_bord, const Nom &other_type)
void preparer_surface(const Frontiere_dis_base &, const Domaine_Cl_dis_base &)
void error_pb_name(const Nom &nom_class, const Nom &nom_pb, const Nom &nom_pb_ray)
virtual double val_imp(int i) const
Renvoie la valeur imposee sur la i-eme composante du champ a la frontiere au temps par defaut du cham...
Definition Dirichlet.cpp:35
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Probleme_base & probleme()
Renvoie le probleme associe a l'equation.
class Front_VF
Definition Front_VF.h:36
int nb_faces() const
Definition Front_VF.h:53
virtual bool is_rayo_transp() const
Definition Milieu_base.h:83
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual const Nom & le_nom() const
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Definition Objet_U.cpp:319
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
classe Pb_Fluide_base Cette classe a pour but de disposer d une classe amont pour
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
Definition Probleme_U.h:109
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
virtual const Milieu_base & milieu() const
Renvoie le milieu physique associe au probleme.
Classe de base des flux de sortie.
Definition Sortie.h:52
int initialiser(double temps) override
Initialisation en debut de calcul.
classe Temperature_imposee_paroi Impose la temperature de la paroi dans une equation de type Convecti...