TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Frontiere_ouverte_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 <Frontiere_ouverte_rayo_transp.h>
17#include <Pb_Fluide_base.h>
18#include <Front_VF.h>
19
20Implemente_instanciable(Frontiere_ouverte_rayo_transp, "Frontiere_ouverte_rayo_transp", Neumann_sortie_libre);
21
22// XD frontiere_ouverte_rayo_transp frontiere_ouverte frontiere_ouverte_rayo_transp INHERITS_BRACE Radiation boundary
23// XD_CONT outlet condition on the boundary called bord (edge) (diffusion flux zero). This condition must be associated
24// XD_CONT with a boundary outlet hydraulic condition.
25
27
29
31{
32 assert(!le_modele_rayo_);
33
34 // retrieve the radiation model ... !
35 const Probleme_base& this_pb = domaine_Cl_dis().equation().probleme();
36 if (sub_type(Pb_Fluide_base, this_pb))
37 {
38 if (this_pb.milieu().is_rayo_transp())
39 {
40 le_modele_rayo_ = ref_cast(Pb_Fluide_base, this_pb).get_mod_rayo_transp();
41
42 if (le_modele_rayo_->nom_pb_rayonnant() != this_pb.le_nom())
43 error_pb_name(que_suis_je(), this_pb.le_nom(), le_modele_rayo_->nom_pb_rayonnant());
44 }
45 else
46 error_non_rad_bc(que_suis_je(), this_pb.le_nom(), frontiere_dis().frontiere().le_nom(), "frontiere_ouverte");
47 }
48 else
49 {
50 Cerr << "The BC " << que_suis_je() << " should be associated to a fluid problem and not a a one of type " << this_pb.que_suis_je() << " !!!" << finl;
52 }
53
54
56}
57
63
69
71{
72 const Front_VF& front_vf = ref_cast(Front_VF, frontiere_dis());
73 for (int numfa = 0; numfa < front_vf.nb_faces(); numfa++)
74 teta_i_[numfa] = val_ext(numfa);
75}
Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the domain of discretized boundary conditions to which the object belongs.
virtual void completer()
DOES NOTHING must be overridden in derived classes.
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
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)
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Probleme_base & probleme()
Returns the problem associated with the equation.
class Front_VF
Definition Front_VF.h:36
int nb_faces() const
Definition Front_VF.h:53
void mettre_a_jour(double) override
Performs a time update of the boundary condition.
int initialiser(double temps) override
Initialization at the beginning of the calculation.
virtual bool is_rayo_transp() const
Definition Milieu_base.h:83
const Equation_base & equation() const
Returns the reference to the equation pointed to by MorEqn::mon_equation.
Definition MorEqn.h:62
Neumann_sortie_libre This class represents an open boundary without imposed velocity.
void mettre_a_jour(double temps) override
Performs a time update of the boundary condition.
const DoubleTab & val_ext() const
int initialiser(double temps) override
Initialization at the beginning of the calculation.
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual const Nom & le_nom() const
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition Objet_U.cpp:317
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
Pb_Fluide_base This class provides a base class for.
const Nom & le_nom() const override
Returns the name of the Objet_U. Virtual method to override: returns "neant" in this implementation.
Definition Probleme_U.h:109
class Probleme_base It is a Probleme_U that is not a coupling.
virtual const Milieu_base & milieu() const
Returns the physical medium associated with the problem (const version).
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52