Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
teqp_fork_old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Michael Pohl
teqp_fork_old
Commits
e63fe68d
Commit
e63fe68d
authored
2 years ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Added new models to the variant
parent
3eec89ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/teqp/json_builder.hpp
+9
-0
9 additions, 0 deletions
include/teqp/json_builder.hpp
include/teqp/models/fwd.hpp
+9
-1
9 additions, 1 deletion
include/teqp/models/fwd.hpp
with
18 additions
and
1 deletion
include/teqp/json_builder.hpp
+
9
−
0
View file @
e63fe68d
...
@@ -36,6 +36,9 @@ namespace teqp {
...
@@ -36,6 +36,9 @@ namespace teqp {
if
(
kind
==
"vdW1"
)
{
if
(
kind
==
"vdW1"
)
{
return
vdWEOS1
(
spec
.
at
(
"a"
),
spec
.
at
(
"b"
));
return
vdWEOS1
(
spec
.
at
(
"a"
),
spec
.
at
(
"b"
));
}
}
else
if
(
kind
==
"vdW"
)
{
return
vdWEOS
<
double
>
(
spec
.
at
(
"Tcrit / K"
),
spec
.
at
(
"pcrit / Pa"
));
}
else
if
(
kind
==
"PR"
)
{
else
if
(
kind
==
"PR"
)
{
std
::
valarray
<
double
>
Tc_K
=
spec
.
at
(
"Tcrit / K"
),
pc_Pa
=
spec
.
at
(
"pcrit / Pa"
),
acentric
=
spec
.
at
(
"acentric"
);
std
::
valarray
<
double
>
Tc_K
=
spec
.
at
(
"Tcrit / K"
),
pc_Pa
=
spec
.
at
(
"pcrit / Pa"
),
acentric
=
spec
.
at
(
"acentric"
);
Eigen
::
ArrayXXd
kmat
(
0
,
0
);
Eigen
::
ArrayXXd
kmat
(
0
,
0
);
...
@@ -61,6 +64,12 @@ namespace teqp {
...
@@ -61,6 +64,12 @@ namespace teqp {
else
if
(
kind
==
"multifluid"
)
{
else
if
(
kind
==
"multifluid"
)
{
return
multifluidfactory
(
spec
);
return
multifluidfactory
(
spec
);
}
}
else
if
(
kind
==
"SW_EspindolaHeredia2009"
){
return
squarewell
::
EspindolaHeredia2009
(
spec
.
at
(
"lambda"
));
}
else
if
(
kind
==
"EXP6_Kataoka1992"
){
return
exp6
::
Kataoka1992
(
spec
.
at
(
"alpha"
));
}
else
{
else
{
throw
teqpcException
(
30
,
"Unknown kind:"
+
kind
);
throw
teqpcException
(
30
,
"Unknown kind:"
+
kind
);
}
}
...
...
This diff is collapsed.
Click to expand it.
include/teqp/models/fwd.hpp
+
9
−
1
View file @
e63fe68d
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
#include
"teqp/models/multifluid_mutant.hpp"
#include
"teqp/models/multifluid_mutant.hpp"
#include
"teqp/ideal_eosterms.hpp"
#include
"teqp/ideal_eosterms.hpp"
#include
"teqp/models/ammonia_water.hpp"
#include
"teqp/models/ammonia_water.hpp"
#include
"teqp/models/model_potentials/squarewell.hpp"
#include
"teqp/models/model_potentials/exp6.hpp"
namespace
teqp
{
namespace
teqp
{
...
@@ -31,18 +33,24 @@ namespace teqp {
...
@@ -31,18 +33,24 @@ namespace teqp {
using
multifluid_t
=
decltype
(
multifluidfactory
(
nlohmann
::
json
{}));
using
multifluid_t
=
decltype
(
multifluidfactory
(
nlohmann
::
json
{}));
//using multifluidmutant_t = decltype(build_multifluid_mutant(multifluid_t{}, nlohmann::json{})); // need to figure out how to get this to work
//using multifluidmutant_t = decltype(build_multifluid_mutant(multifluid_t{}, nlohmann::json{})); // need to figure out how to get this to work
using
ammonia_water_TillnerRoth_t
=
AmmoniaWaterTillnerRoth
;
using
ammonia_water_TillnerRoth_t
=
AmmoniaWaterTillnerRoth
;
using
SW_EspindolaHeredia2009_t
=
squarewell
::
EspindolaHeredia2009
;
using
EXP6_Kataoka1992_t
=
exp6
::
Kataoka1992
;
using
vdWEOS_t
=
vdWEOS
<
double
>
;
using
idealgas_t
=
IdealHelmholtz
;
using
idealgas_t
=
IdealHelmholtz
;
// The set of these models is exposed in the variant
// The set of these models is exposed in the variant
using
AllowedModels
=
std
::
variant
<
using
AllowedModels
=
std
::
variant
<
vdWEOS1
,
vdWEOS1
,
vdWEOS_t
,
canonical_cubic_t
,
canonical_cubic_t
,
PCSAFT_t
,
PCSAFT_t
,
CPA_t
,
CPA_t
,
multifluid_t
,
multifluid_t
,
idealgas_t
,
idealgas_t
,
ammonia_water_TillnerRoth_t
ammonia_water_TillnerRoth_t
,
SW_EspindolaHeredia2009_t
,
EXP6_Kataoka1992_t
//multifluidmutant_t
//multifluidmutant_t
>
;
>
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment