TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Cond_lim_rayo_semi_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 <Cond_lim_rayo_semi_transp.h>
17#include <Pb_rayo_semi_transp.h>
18#include <Flux_radiatif_base.h>
19#include <Frontiere_dis_base.h>
20#include <Symetrie.h>
21
23{
24 pb_rayo_semi_transp_ = pb;
25}
26
28{
29 int num_cl_rayo=0;
30
32 Conds_lim& les_cl_rayo = eq_rayo.domaine_Cl_dis().les_conditions_limites();
33
34 int test_nom=0;
35 for(num_cl_rayo = 0; num_cl_rayo<les_cl_rayo.size(); num_cl_rayo++)
36 {
37 Cond_lim& la_cl_rayo = eq_rayo.domaine_Cl_dis().les_conditions_limites(num_cl_rayo);
38 Nom nom_cl_rayo = la_cl_rayo->frontiere_dis().le_nom();
39 Nom nom_cl_temp = la_cl().frontiere_dis().le_nom();
40 if(nom_cl_temp == nom_cl_rayo)
41 {
42 test_nom = 1;
43 if(sub_type(Flux_radiatif_base,la_cl_rayo.valeur()))
44 {
45 const Flux_radiatif_base& la_cl_rayon = ref_cast(Flux_radiatif_base,la_cl_rayo.valeur());
46 emissivite_ = la_cl_rayon.emissivite();
47 emissivite_->associer_fr_dis_base(la_cl_rayon.frontiere_dis());
48 A_ = la_cl_rayon.A();
49 }
50 else if (sub_type(Symetrie,la_cl_rayo.valeur()))
51 {
52 /* Do nothing */
53 }
54 else
55 {
56 Cerr<<"Error in Frontiere_ouverte_rayo_semi_transp::recherche_emissivite_et_A()"<<finl;
57 Cerr<<"The conditions to use for the radiation equation "<<finl;
58 Cerr<<"must necessarily be of type Flux_radiatif_base or symetrie"<<finl;
60 }
61 }
62 }
63 if (test_nom == 0)
64 {
65 Cerr<<"Error in Frontiere_ouverte_rayo_semi_transp::recherche_emissivite_et_A()"<<finl;
66 Cerr<<"Compatibility problem between the conditions of the radiation equation"<<finl;
67 Cerr<<"and the temperature equation"<<finl;
69 }
70}
virtual void associer_fr_dis_base(const Frontiere_dis_base &)
Associates a discretized boundary with the field.
virtual Frontiere_dis_base & frontiere_dis()
Returns the discretized boundary to which the boundary conditions apply.
const Pb_rayo_semi_transp & pb_rayo_semi_transp() const
virtual void associer_pb_rayo_semi_transp(const Pb_rayo_semi_transp &)
virtual const Cond_lim_base & la_cl() const =0
class Cond_lim Generic class used to represent any class
Definition Cond_lim.h:31
class Conds_lim This class represents a vector of boundary conditions.
Definition Conds_lim.h:32
const Cond_lim & les_conditions_limites(int) const
Returns the i-th boundary condition.
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Champ_front_base & emissivite()
const Nom & le_nom() const override
Returns the name of the geometric boundary.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Semi-transparent radiation problem. Pb_rayo_semi_transp is a Probleme_base with 4 specific features:
Eq_rayo_semi_transp & eq_rayo()
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Symetrie On symmetry faces, the following properties hold:
Definition Symetrie.h:37