TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
CoolProp_to_TRUST.h
1/****************************************************************************
2* Copyright (c) 2024, 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 CoolProp_to_TRUST_included
17#define CoolProp_to_TRUST_included
18
19#include <coolprop++.h>
20#include <TPPI.h>
21
22#ifdef HAS_COOLPROP
23#pragma GCC diagnostic push
24#pragma GCC diagnostic ignored "-Wignored-qualifiers"
25#if __GNUC__ > 5 || __clang_major__ > 10
26#pragma GCC diagnostic ignored "-Wsuggest-override"
27#endif
28#pragma GCC diagnostic ignored "-Wpedantic"
29#pragma GCC diagnostic ignored "-Wshadow"
30#pragma GCC diagnostic ignored "-Wunused-function"
31#define SWIG
32#include <Configuration.h>
33#undef SWIG
34#include <AbstractState.h>
35#include <CoolPropTools.h>
36#include <CoolPropLib.h>
37#include <CoolProp.h>
38#pragma GCC diagnostic pop
39#endif
40
41namespace CoolProp { class AbstractState; }
42
43/*! @brief classe CoolProp_to_TRUST
44 *
45 * Interface commune pour TRUST et ses baltiks qui permet appeler les methodes de la lib CoolProp
46 * Methods disponibles en temperature et enthalpie, egalement pour la saturation
47 */
48class CoolProp_to_TRUST : public TPPI
49{
50public :
51 ~CoolProp_to_TRUST() override = default;
52
53 void verify_phase(const Motcle& ) override;
54 void set_phase(const Motcle& ) override;
55 void set_path_refprop() override;
56
57 double tppi_get_p_min() const override final;
58 double tppi_get_p_max() const override final;
59
60 double tppi_get_h_min() const override final;
61 double tppi_get_h_max() const override final;
62
63 double tppi_get_T_min() const override final;
64 double tppi_get_T_max() const override final;
65
66 double tppi_get_rho_min() const override final;
67 double tppi_get_rho_max() const override final;
68
69 double tppi_get_p_crit() const override final;
70 double tppi_get_h_crit() const override final;
71 double tppi_get_T_crit() const override final;
72 double tppi_get_rho_crit() const override final;
73
74protected:
75
76#ifdef HAS_COOLPROP
77 shared_ptr<CoolProp::AbstractState> fluide = nullptr;
78#endif
79
80};
81
82#endif /* CoolProp_to_TRUST_included */
classe CoolProp_to_TRUST
double tppi_get_h_crit() const override final
double tppi_get_h_max() const override final
double tppi_get_rho_min() const override final
void set_phase(const Motcle &) override
void set_path_refprop() override
double tppi_get_rho_crit() const override final
double tppi_get_T_crit() const override final
double tppi_get_p_min() const override final
double tppi_get_T_min() const override final
double tppi_get_rho_max() const override final
double tppi_get_h_min() const override final
double tppi_get_T_max() const override final
~CoolProp_to_TRUST() override=default
double tppi_get_p_crit() const override final
double tppi_get_p_max() const override final
void verify_phase(const Motcle &) override
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
TPPI()=default