TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Saturation_generique_TPPI_base.h
1/****************************************************************************
2* Copyright (c) 2023, 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 Saturation_generique_TPPI_base_included
17#define Saturation_generique_TPPI_base_included
18
19#include <Saturation_base.h>
20#include <TPPI.h>
21
23{
24 Declare_base( Saturation_generique_TPPI_base );
25public:
26 void Tsat_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
27 {
28 TPPI_->tppi_get_T_sat_p(P, res, ncomp, ind);
29 Tc_(res); // return res en kelvin => on corrige
30 }
31
32 void dP_Tsat_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
33 {
34 TPPI_->tppi_get_T_sat_d_p_p(P, res, ncomp, ind);
35 }
36
37 void Psat_(const SpanD T, SpanD res, int ncomp = 1, int ind = 0) const override
38 {
39 TPPI_->tppi_get_p_sat_T(Tk_(T), res, ncomp, ind);
40 Tc_(T); /* put back T in C */
41 }
42
43 void dT_Psat_(const SpanD T, SpanD res, int ncomp = 1, int ind = 0) const override
44 {
45 TPPI_->tppi_get_p_sat_d_T_T(Tk_(T), res, ncomp, ind);
46 Tc_(T); /* put back T in C */
47 }
48
49 void Lvap_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
50 {
51 TPPI_->tppi_get_lvap_p(P, res, ncomp, ind);
52 }
53
54 void dP_Lvap_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
55 {
56 TPPI_->tppi_get_lvap_d_p_p(P, res, ncomp, ind);
57 }
58
59 void Hls_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
60 {
61 TPPI_->tppi_get_h_l_sat_p(P, res, ncomp, ind);
62 }
63
64 void dP_Hls_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
65 {
66 TPPI_->tppi_get_h_l_sat_d_p_p(P, res, ncomp, ind);
67 }
68
69 void Hvs_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
70 {
71 TPPI_->tppi_get_h_v_sat_p(P, res, ncomp, ind);
72 }
73
74 void dP_Hvs_(const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
75 {
76 TPPI_->tppi_get_h_v_sat_d_p_p(P, res, ncomp, ind);
77 }
78
79 void sigma_(const SpanD T, const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
80 {
81 TPPI_->tppi_get_sigma_pT(P, Tk_(T), res, ncomp, ind);
82 Tc_(T); /* put back T in C */
83 }
84
85 void sigma_h_(const SpanD H, const SpanD P, SpanD res, int ncomp = 1, int ind = 0) const override
86 {
87 TPPI_->tppi_get_sigma_ph(P, H, res, ncomp, ind);
88 }
89
90 void compute_all_flux_interfacial_pb_multiphase(const SpanD P, MSatSpanD sats, int ncomp = 1, int ind = 0) const override
91 {
92 TPPI_->tppi_get_all_flux_interfacial_pb_multiphase(P, sats, ncomp, ind);
93 }
94
95protected:
96 std::shared_ptr<TPPI> TPPI_ = nullptr;
98};
99
100#endif /* Saturation_generique_TPPI_base_included */
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
void dP_Hls_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void Hls_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void Tsat_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void dP_Hvs_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void dT_Psat_(const SpanD T, SpanD res, int ncomp=1, int ind=0) const override
void Psat_(const SpanD T, SpanD res, int ncomp=1, int ind=0) const override
void Lvap_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void dP_Lvap_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void dP_Tsat_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void sigma_(const SpanD T, const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void sigma_h_(const SpanD H, const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void Hvs_(const SpanD P, SpanD res, int ncomp=1, int ind=0) const override
void compute_all_flux_interfacial_pb_multiphase(const SpanD P, MSatSpanD sats, int ncomp=1, int ind=0) const override