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
b05c30dc
Commit
b05c30dc
authored
1 year ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Check water evaluation at critical point
parent
a479f07d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tests/catch_test_multifluid.cxx
+21
-0
21 additions, 0 deletions
src/tests/catch_test_multifluid.cxx
with
21 additions
and
0 deletions
src/tests/catch_test_multifluid.cxx
+
21
−
0
View file @
b05c30dc
...
@@ -324,6 +324,27 @@ TEST_CASE("Trace a VLE isotherm for acetone + water", "[isothermacetonebenzene]"
...
@@ -324,6 +324,27 @@ TEST_CASE("Trace a VLE isotherm for acetone + water", "[isothermacetonebenzene]"
auto
o
=
trace_VLE_isotherm_binary
(
model
,
T
,
rhovecL
,
rhovecV
);
auto
o
=
trace_VLE_isotherm_binary
(
model
,
T
,
rhovecL
,
rhovecV
);
}
}
TEST_CASE
(
"Calculate water at critical point"
,
"[WATERcrit]"
)
{
std
::
string
root
=
"../mycp"
;
const
auto
model
=
build_multifluid_model
({
"Water"
},
root
);
using
tdx
=
TDXDerivatives
<
decltype
(
model
)
>
;
auto
Tc
=
model
.
redfunc
.
Tc
[
0
];
auto
rhoc
=
1
/
model
.
redfunc
.
vc
[
0
];
auto
z
=
(
Eigen
::
ArrayXd
(
1
)
<<
1.0
).
finished
();
auto
a1
=
tdx
::
get_Ar0n
<
1
>
(
model
,
Tc
,
rhoc
,
z
);
CHECK
(
std
::
isfinite
(
a1
[
1
]));
auto
a2
=
tdx
::
get_Ar0n
<
2
>
(
model
,
Tc
,
rhoc
,
z
);
auto
a3
=
tdx
::
get_Ar0n
<
3
>
(
model
,
Tc
,
rhoc
,
z
);
auto
a4
=
tdx
::
get_Ar0n
<
3
>
(
model
,
Tc
,
rhoc
,
z
);
CHECK
(
a3
[
1
]
==
a1
[
1
]);
auto
R
=
model
.
R
(
z
);
auto
dpdrho
=
R
*
Tc
*
(
1
+
2
*
a4
[
1
]
+
a4
[
2
]);
auto
d2pdrho2
=
R
*
Tc
/
(
rhoc
)
*
(
2
*
a4
[
1
]
+
4
*
a4
[
2
]
+
a4
[
3
]);
CHECK
(
dpdrho
==
Approx
(
0
).
margin
(
1e-9
));
CHECK
(
d2pdrho2
==
Approx
(
0
).
margin
(
1e-9
));
}
TEST_CASE
(
"Calculate partial molar volume for a CO2 containing mixture"
,
"[partial_molar_volume]"
)
{
TEST_CASE
(
"Calculate partial molar volume for a CO2 containing mixture"
,
"[partial_molar_volume]"
)
{
std
::
string
root
=
"../mycp"
;
std
::
string
root
=
"../mycp"
;
const
auto
model
=
build_multifluid_model
({
"CarbonDioxide"
,
"Heptane"
},
root
);
const
auto
model
=
build_multifluid_model
({
"CarbonDioxide"
,
"Heptane"
},
root
);
...
...
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