TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Neumann_paroi_rayo_semi_transp_VEF.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 <Neumann_paroi_rayo_semi_transp_VEF.h>
17#include <Pb_rayo_semi_transp.h>
18#include <Champ_Uniforme.h>
19#include <Milieu_base.h>
20#include <Front_VF.h>
21
22Implemente_instanciable(Neumann_paroi_rayo_semi_transp_VEF,"Paroi_flux_impose_rayo_semi_transp_VEF",Neumann_paroi);
23
25{
26 return os;
27}
28
30{
31 is >> le_champ_front;
32 return is;
33}
34
39
41{
42 const DoubleTab& flux_radiatif = pb_rayo_semi_transp().flux_radiatif(frontiere_dis().le_nom()).valeurs();
43
44 if (le_champ_front->valeurs().size() == 1)
45 return le_champ_front->valeurs()(0, 0) - flux_radiatif(i, 0);
46 else if (le_champ_front->valeurs().dimension(1) == 1)
47 return le_champ_front->valeurs()(i, 0) - flux_radiatif(i, 0);
48 else
49 Cerr << "Neumann_paroi_rayo_semi_transp_VEF::flux_impose erreur" << finl;
50
51 return 0;
52}
53
55{
56 const DoubleTab& flux_radiatif = pb_rayo_semi_transp().flux_radiatif(frontiere_dis().le_nom()).valeurs();
57
58 if (le_champ_front->valeurs().dimension(0) == 1)
59 return le_champ_front->valeurs()(0, j) - flux_radiatif(i);
60 else
61 return le_champ_front->valeurs()(i, j) - flux_radiatif(i);
62}
63
65{
66 return (*this);
67}
68
70{
71 // Cerr<<"Neumann_paroi_rayo_semi_transp_VEF::calculer_temperature_bord() : Debut"<<finl;
72 // Pour une discretisation VEF, la temperature est codee sur les faces
73 // des elements, il suffit donc ici de recuperer les valeurs des temperatures
74 // sur les faces de bord.
75 DoubleTab& temperature = domaine_Cl_dis().equation().inconnue().valeurs();
76 DoubleTab& tab = temperature_bord_->valeurs_au_temps(temps);
77
78 const Front_VF& front_vf = ref_cast(Front_VF, frontiere_dis());
79 int ndeb = front_vf.num_premiere_face();
80 int nfin = ndeb + front_vf.nb_faces();
81 int face = 0;
82 for (face = ndeb; face < nfin; face++)
83 tab(face - ndeb, 0) = temperature(face);
84 // Cerr<<"Neumann_paroi_rayo_semi_transp_VEF::calculer_temperature_bord() : Fin"<<finl;
85}
86
88{
89 Motcle dom_app = eqn.domaine_application();
90 Motcle Thermique = "Thermique";
91 Motcle indetermine = "indetermine";
92 if ((dom_app == Thermique) || (dom_app == indetermine))
93 return 1;
94 else
95 {
97 return 0;
98 }
99}
100
102{
104
105 // On type et on dimmensionne le champ_front temperature_bord_
106 const Front_VF& front_vf = ref_cast(Front_VF, frontiere_dis());
107 int nb_comp = 1;
108
109 temperature_bord_.typer("Champ_front_fonc");
110 temperature_bord_->fixer_nb_comp(nb_comp);
111 DoubleTab& tab = temperature_bord_->valeurs();
112 tab.resize(front_vf.nb_faces(), nb_comp);
113}
DoubleTab & valeurs() override
Renvoie le tableau des valeurs du champ au temps courant.
virtual DoubleTab & valeurs() override
Renvoie le tableau des valeurs du champ.
classe Cond_lim_base Classe de base pour la hierarchie des classes qui representent les differentes c...
void err_pas_compatible(const Equation_base &) const
Cette methode est appelee quand la condition aux limites n'est pas compatible avec l'equation sur laq...
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 Frontiere_dis_base & frontiere_dis()
Renvoie la frontiere discretisee a laquelle les conditions aux limites s'appliquent.
const Pb_rayo_semi_transp & pb_rayo_semi_transp() const
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....
virtual const Champ_Inc_base & inconnue() const =0
virtual const Motcle & domaine_application() const
Renvoie "indetermine" Navier_Stokes_standard par exemple surcharge cette methode.
class Front_VF
Definition Front_VF.h:36
int nb_faces() const
Definition Front_VF.h:53
int num_premiere_face() const
Definition Front_VF.h:63
const Equation_base & equation() const
Renvoie la reference sur l'equation pointe par MorEqn::mon_equation.
Definition MorEqn.h:62
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
void completer() override
NE FAIT RIEN A surcharger dans les classes derivees.
void mettre_a_jour(double temps) override
Effectue une mise a jour en temps de la condition aux limites.
const Cond_lim_base & la_cl() const override
int compatible_avec_eqn(const Equation_base &) const override
double flux_impose(int i) const override
Renvoie la valeur du flux impose sur la i-eme composante du champ representant le flux a la frontiere...
Classe Neumann_paroi Cette condition limite correspond a un flux impose pour l'equation de.
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
const Champ_front_base & flux_radiatif(const Nom &nom_bord) const
Classe de base des flux de sortie.
Definition Sortie.h:52
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469