PDSSFactory.cpp Source File#

Cantera: PDSSFactory.cpp Source File
PDSSFactory.cpp
Go to the documentation of this file.
1//! @file PDSSFactory.cpp
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
11
12namespace Cantera
13{
14
15PDSSFactory* PDSSFactory::s_factory = 0;
16std::mutex PDSSFactory::thermo_mutex;
17
18PDSSFactory::PDSSFactory()
19{
20 reg("constant-volume", []() { return new PDSS_ConstVol(); });
21 addDeprecatedAlias("constant-volume", "constant_incompressible");
22 addDeprecatedAlias("constant-volume", "constant-incompressible");
23 reg("liquid-water-IAPWS95", []() { return new PDSS_Water(); });
24 addDeprecatedAlias("liquid-water-IAPWS95", "waterPDSS");
25 addDeprecatedAlias("liquid-water-IAPWS95", "waterIAPWS");
26 addDeprecatedAlias("liquid-water-IAPWS95", "water");
27 reg("molar-volume-temperature-polynomial", []() { return new PDSS_SSVol(); });
28 addDeprecatedAlias("molar-volume-temperature-polynomial", "temperature_polynomial");
29 reg("density-temperature-polynomial", []() { return new PDSS_SSVol(); });
30 addDeprecatedAlias("density-temperature-polynomial", "density_temperature_polynomial");
31 reg("HKFT", []() { return new PDSS_HKFT(); });
32}
33
34PDSSFactory* PDSSFactory::factory() {
35 std::unique_lock<std::mutex> lock(thermo_mutex);
36 if (!s_factory) {
37 s_factory = new PDSSFactory;
38 }
39 return s_factory;
40}
41
42void PDSSFactory::deleteFactory() {
43 std::unique_lock<std::mutex> lock(thermo_mutex);
44 delete s_factory;
45 s_factory = 0;
46}
47
48PDSS* PDSSFactory::newPDSS(const string& model)
49{
50 return create(model);
51}
52
53PDSS* newPDSS(const string& model)
54{
55 return PDSSFactory::factory()->newPDSS(model);
56}
57
58}
Declarations for the class PDSS_ConstVol (pressure dependent standard state) which handles calculatio...
Declarations for the class PDSS_HKFT (pressure dependent standard state) which handles calculations f...
Declarations for the class PDSS_SSVol (pressure dependent standard state) which handles calculations ...
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564