TrioCFD 1.9.9_beta
TrioCFD documentation
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 * Represents a source term in the thermal equation corresponding to a
29 * volumetric power from neutronics. The power is determined by solving
30 * the differential equations governing neutron point kinetics.
31 *
32 *
33 * @sa Terme_Puissance_Thermique
34 */
35
37{
38 Declare_base(Source_Neutronique);
39
40public:
41 void set_param(Param& param) const override;
42 int lire_motcle_non_standard(const Motcle&, Entree&) override;
43
44 double rho(double, double);
45 const Nom& repartition() const;
46 const Nom& nom_ssz() const;
49 void aller_au_temps(double);
50 void mettre_a_jour(double temps) override;
51 void completer() override;
52 virtual void imprimer(double ) const;
53 virtual int limpr(double , double ) const;
54 inline double puissance_neutro() const { return Un(0); }
55 virtual double calculer_Tmoyenne() = 0;
56
57private :
58 void mul(DoubleTab& m, DoubleVect& v, DoubleVect& resu);
59 void mettre_a_jour_matA(double t);
60 int N = -1; // number of groups >= 1
61 double Tvie = -100.; // neutron lifetime
62 DoubleVect Un, Unp1;// unknowns at time n and n+1: power Un(0) and concentrations Un(i) of group i
63 DoubleVect beta; // beta(i) = number of delayed neutrons from species i
64 double beta_som = -100.; // sum of the beta(i)
65 DoubleVect lambda; //
66 DoubleTab matA; // matrix of the differential equation system
67 double dt= -100.; // time step
68 int init = 1;
69 double P0= -100.; // power at t=0
70 DoubleVect Ci0; // concentration at t=0
71 int Ci0_ok=0;
72 double dt_impr = 1e10;
73 double temps_courant= -100.;
74 void (Source_Neutronique::*faire_un_pas_de_temps)() = nullptr;
75 double Tmoy= -100.; // average temperature
76
77 Parser_U fct_tT;
78 Nom f_xyz;
79 Nom n_ssz;
80
81};
82
83
84#endif
85
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
friend class Entree
Definition Objet_U.h:71
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Parser_U Version of the Parser class, deriving from Objet_U.
Definition Parser_U.h:32
class Source_Neutronique
void completer() override
Updates internal references of the Source_base object.
const Nom & nom_ssz() const
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
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)
Source_base A Source_base object is a term appearing on the right-hand side of an.
Definition Source_base.h:42
Class Terme_Puissance_Thermique: represents a volumetric thermal power source term in the energy equa...