TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Source_Neutronique.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 Source_Neutronique_included
17#define Source_Neutronique_included
18
19
20
21#include <Terme_Puissance_Thermique.h>
22#include <Source_base.h>
23#include <Parser_U.h>
24class Param;
25
26/*! @brief class Source_Neutronique
27 *
28 * Cette classe represente un terme source de l'equation de la thermique
29 * du type puissance volumique issue de la neutronique.
30 * La determination de la puissance s'effectue par resolution d'equations
31 * differentielles regissant la cinetique neutronique.
32 *
33 *
34 * @sa Terme_Puissance_Thermique
35 */
36
38{
39 Declare_base(Source_Neutronique);
40
41public:
42 void set_param(Param& param) const override;
43 int lire_motcle_non_standard(const Motcle&, Entree&) override;
44
45 double rho(double, double);
46 const Nom& repartition() const;
47 const Nom& nom_ssz() const;
50 void aller_au_temps(double);
51 void mettre_a_jour(double temps) override;
52 void completer() override;
53 virtual void imprimer(double ) const;
54 virtual int limpr(double , double ) const;
55 inline double puissance_neutro() const { return Un(0); }
56 virtual double calculer_Tmoyenne() = 0;
57
58private :
59 void mul(DoubleTab& m, DoubleVect& v, DoubleVect& resu);
60 void mettre_a_jour_matA(double t);
61 int N = -1; // Nombre de groupe >= 1
62 double Tvie = -100.; // duree de vie d'un neutron
63 DoubleVect Un, Unp1;// Inconnus a l'instant n et n+1 : Puissance Un(0) et Concentrations Un(i) du groupe i
64 DoubleVect beta; // beta(i) = nombre de neutrons retardees issue de l espece i,
65 double beta_som = -100.; // somme des beta(i)
66 DoubleVect lambda; //
67 DoubleTab matA; // matrice du systeme d'equa diff
68 double dt= -100.; // pas de temps
69 int init = 1;
70 double P0= -100.; // Puissance a t=0
71 DoubleVect Ci0; // Concentration a t=0
72 int Ci0_ok=0;
73 double dt_impr = 1e10;
74 double temps_courant= -100.;
75 void (Source_Neutronique::*faire_un_pas_de_temps)() = nullptr;
76 double Tmoy= -100.; // temperature moyenne
77
78 Parser_U fct_tT;
79 Nom f_xyz;
80 Nom n_ssz;
81
82};
83
84
85#endif
86
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
friend class Entree
Definition Objet_U.h:76
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
classe Parser_U Version de la classe Parser, derivant de Objet_U.
Definition Parser_U.h:32
class Source_Neutronique
void completer() override
Met a jour les references internes a l'objet Source_base.
const Nom & nom_ssz() const
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
double puissance_neutro() const
virtual double calculer_Tmoyenne()=0
virtual int limpr(double, double) const
void mettre_a_jour(double temps) override
DOES NOTHING - to override in derived classes.
virtual void imprimer(double) const
const Nom & repartition() const
void set_param(Param &param) const override
double rho(double, double)
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42
Classe Terme_Puissance_Thermique Cette classe represente un terme source de l'equation de la thermiqu...