Cantera  3.0.0
Loading...
Searching...
No Matches
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
13
14namespace Cantera
15{
16
17PDSSFactory* PDSSFactory::s_factory = 0;
18std::mutex PDSSFactory::thermo_mutex;
19
20PDSSFactory::PDSSFactory()
21{
22 reg("ideal-gas", []() { return new PDSS_IdealGas(); });
23 reg("constant-volume", []() { return new PDSS_ConstVol(); });
24 addDeprecatedAlias("constant-volume", "constant_incompressible");
25 addDeprecatedAlias("constant-volume", "constant-incompressible");
26 reg("liquid-water-IAPWS95", []() { return new PDSS_Water(); });
27 addDeprecatedAlias("liquid-water-IAPWS95", "waterPDSS");
28 addDeprecatedAlias("liquid-water-IAPWS95", "waterIAPWS");
29 addDeprecatedAlias("liquid-water-IAPWS95", "water");
30 reg("ions-from-neutral-molecule", []() { return new PDSS_IonsFromNeutral(); });
31 addDeprecatedAlias("ions-from-neutral-molecule", "IonFromNeutral");
32 addDeprecatedAlias("ions-from-neutral-molecule", "ions-from-neutral");
33 reg("molar-volume-temperature-polynomial", []() { return new PDSS_SSVol(); });
34 addDeprecatedAlias("molar-volume-temperature-polynomial", "temperature_polynomial");
35 reg("density-temperature-polynomial", []() { return new PDSS_SSVol(); });
36 addDeprecatedAlias("density-temperature-polynomial", "density_temperature_polynomial");
37 reg("HKFT", []() { return new PDSS_HKFT(); });
38}
39
40PDSSFactory* PDSSFactory::factory() {
41 std::unique_lock<std::mutex> lock(thermo_mutex);
42 if (!s_factory) {
43 s_factory = new PDSSFactory;
44 }
45 return s_factory;
46}
47
48void PDSSFactory::deleteFactory() {
49 std::unique_lock<std::mutex> lock(thermo_mutex);
50 delete s_factory;
51 s_factory = 0;
52}
53
54PDSS* PDSSFactory::newPDSS(const string& model)
55{
56 return create(model);
57}
58
59PDSS* newPDSS(const string& model)
60{
61 return PDSSFactory::factory()->newPDSS(model);
62}
63
64}
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_IdealGas (pressure dependent standard state) which handles calculatio...
Declarations for the class PDSS_IonsFromNeutral ( which handles calculations for a single ion in a fl...
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