TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Reaction.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 Reaction_included
17#define Reaction_included
18
19#include <Champ_Fonc_base.h>
20#include <TRUST_Vector.h>
21#include <TRUSTArray.h>
22#include <TRUST_List.h>
23#include <TRUST_Ref.h>
24#include <Objet_U_With_Params.h>
25
26class Champ_Inc_base;
27class Probleme_base;
28class Champ_base;
29class Motcles;
30
32{
33 Declare_instanciable_with_param(Reaction);
34public:
35 friend class Chimie;
36 void completer(const Motcles& list_var,const ArrOfDouble& masse_molaire);
37
38 void reagir(VECT(OBS_PTR(Champ_Inc_base))& liste_c,const double deltat) const;
39 double calcul_proportion_implicite(ArrOfDouble& C_temp,const ArrOfDouble& C0,double deltat, double seuil, double& poroportion_directe ) const;
40 void extract_coef(ArrOfDouble& coeff_recactifs,ArrOfDouble& coeff_produits,const Motcles& list_var,const ArrOfDouble& masse_molaire) const;
41 double calculer_pas_de_temps() const;
42 int lire_motcle_non_standard(const Motcle& motlu, Entree& is) override;
43 inline const Champ_base& get_omega() const
44 {
45 return omega_.valeur();
46 }
47 void discretiser_omega(const Probleme_base& pb,const Nom&);
48 inline const int& nb_sous_pas_de_temps_reaction() const
49 {
51 }
52protected:
53
54 void validate_params() const override;
55 Nom reactifs_; // REQUIRED
56 Nom produits_; // REQUIRED
57 Nom activite_ = "0"; // not REQUIRED, has default value
58
60 double enthalpie_reaction_ = -100.; // en J/mol
61 double contre_reaction_=-1.; // prefacteur
62 double c_r_Ea_=0.; // en J/mol
63 double Sc_t_=0.8; // Nombre de Schmidt turbulent (e.g. 0.8)
64 double Ea_=0.; // en J/mol
65 double beta_=0./*,exp_comb_,exp_oxy_*/;
67 ArrOfDouble coeff_activite_;
68 Motcles save_alias_; //pour verifier que les Yi arrivent dans le meme ordre que lors de l'interpretation de la reaction
69 mutable OWN_PTR(Champ_Fonc_base) omega_;
70
74};
75
76#endif
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Inherits from Objet_U, adds the very common method set_param for the Objet_U hierarchy.
friend class Entree
Definition Objet_U.h:76
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
void extract_coef(ArrOfDouble &coeff_recactifs, ArrOfDouble &coeff_produits, const Motcles &list_var, const ArrOfDouble &masse_molaire) const
Definition Reaction.cpp:75
void completer(const Motcles &list_var, const ArrOfDouble &masse_molaire)
Definition Reaction.cpp:82
double proportion_max_sur_delta_t_
Definition Reaction.h:71
Nom activite_
Definition Reaction.h:57
Nom reactifs_
Definition Reaction.h:55
ArrOfDouble coeff_Y_
Definition Reaction.h:66
friend class Chimie
Definition Reaction.h:35
double contre_reaction_
Definition Reaction.h:61
double Ea_
Definition Reaction.h:64
Motcles save_alias_
Definition Reaction.h:68
ArrOfDouble coeff_activite_
Definition Reaction.h:67
double enthalpie_reaction_
Definition Reaction.h:60
double Sc_t_
Definition Reaction.h:63
void discretiser_omega(const Probleme_base &pb, const Nom &)
Definition Reaction.cpp:177
const Champ_base & get_omega() const
Definition Reaction.h:43
Nom produits_
Definition Reaction.h:56
int lire_motcle_non_standard(const Motcle &motlu, Entree &is) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
Definition Reaction.cpp:142
double c_r_Ea_
Definition Reaction.h:62
double constante_taux_reaction_
Definition Reaction.h:59
double proportion_max_admissible_
Definition Reaction.h:72
int nb_sous_pas_de_temps_reaction_
Definition Reaction.h:73
double beta_
Definition Reaction.h:65
const int & nb_sous_pas_de_temps_reaction() const
Definition Reaction.h:48
double calculer_pas_de_temps() const
Definition Reaction.cpp:172
void reagir(VECT(OBS_PTR(Champ_Inc_base))&liste_c, const double deltat) const
Definition Reaction.cpp:182
OWN_PTR(Champ_Fonc_base) omega_
ArrOfDouble coeff_stoechio_
Definition Reaction.h:66
double calcul_proportion_implicite(ArrOfDouble &C_temp, const ArrOfDouble &C0, double deltat, double seuil, double &poroportion_directe) const
Definition Reaction.cpp:240
void validate_params() const override
Called in the readOn of Objet_U_With_Params, after reading the params.
Definition Reaction.cpp:133