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
2592ceb7
Commit
2592ceb7
authored
2 years ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Last pure critical method
parent
6b59eccd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/teqp/cpp/teqpcpp.hpp
+1
-0
1 addition, 0 deletions
include/teqp/cpp/teqpcpp.hpp
interface/CPP/teqpcpp.cpp
+5
-0
5 additions, 0 deletions
interface/CPP/teqpcpp.cpp
interface/pybind11_wrapper.cpp
+1
-1
1 addition, 1 deletion
interface/pybind11_wrapper.cpp
with
7 additions
and
1 deletion
include/teqp/cpp/teqpcpp.hpp
+
1
−
0
View file @
2592ceb7
...
...
@@ -120,6 +120,7 @@ namespace teqp {
virtual
std
::
tuple
<
double
,
double
>
solve_pure_critical
(
const
double
T
,
const
double
rho
,
const
std
::
optional
<
nlohmann
::
json
>&
)
const
=
0
;
virtual
std
::
tuple
<
double
,
double
>
extrapolate_from_critical
(
const
double
Tc
,
const
double
rhoc
,
const
double
Tgiven
)
const
=
0
;
virtual
std
::
tuple
<
EArrayd
,
EMatrixd
>
get_pure_critical_conditions_Jacobian
(
const
double
T
,
const
double
rho
,
int
alternative_pure_index
=-
1
,
int
alternative_length
=
2
)
const
=
0
;
virtual
EArray2
pure_VLE_T
(
const
double
T
,
const
double
rhoL
,
const
double
rhoV
,
int
maxiter
)
const
=
0
;
virtual
std
::
tuple
<
EArrayd
,
EArrayd
>
get_drhovecdp_Tsat
(
const
double
T
,
const
REArrayd
&
rhovecL
,
const
REArrayd
&
rhovecV
)
const
=
0
;
...
...
This diff is collapsed.
Click to expand it.
interface/CPP/teqpcpp.cpp
+
5
−
0
View file @
2592ceb7
...
...
@@ -85,6 +85,11 @@ namespace teqp {
return
teqp
::
solve_pure_critical
(
model
,
T
,
rho
,
flags
.
value
());
},
m_model
);
}
std
::
tuple
<
EArrayd
,
EMatrixd
>
get_pure_critical_conditions_Jacobian
(
const
double
T
,
const
double
rho
,
int
alternative_pure_index
,
int
alternative_length
)
const
override
{
return
std
::
visit
([
&
](
const
auto
&
model
)
{
return
teqp
::
get_pure_critical_conditions_Jacobian
(
model
,
T
,
rho
,
alternative_pure_index
,
alternative_length
);
},
m_model
);
}
std
::
tuple
<
double
,
double
>
extrapolate_from_critical
(
const
double
Tc
,
const
double
rhoc
,
const
double
Tnew
)
const
override
{
return
std
::
visit
([
&
](
const
auto
&
model
)
{
auto
mat
=
teqp
::
extrapolate_from_critical
(
model
,
Tc
,
rhoc
,
Tnew
);
...
...
This diff is collapsed.
Click to expand it.
interface/pybind11_wrapper.cpp
+
1
−
1
View file @
2592ceb7
...
...
@@ -221,7 +221,7 @@ void init_teqp(py::module& m) {
.
def
(
"get_deriv_mat2"
,
&
am
::
get_deriv_mat2
,
"T"
_a
,
"rho"
_a
,
"molefrac"
_a
.
noconvert
())
// Routines related to pure fluid critical point calculation
//
.def("get_pure_critical_conditions_Jacobian", &am::get_pure_critical_conditions_Jacobian, "T"_a, "rho"_a, py::arg_v("alternative_pure_index", -1), py::arg_v("alternative_length", 2))
.
def
(
"get_pure_critical_conditions_Jacobian"
,
&
am
::
get_pure_critical_conditions_Jacobian
,
"T"
_a
,
"rho"
_a
,
py
::
arg_v
(
"alternative_pure_index"
,
-
1
),
py
::
arg_v
(
"alternative_length"
,
2
))
.
def
(
"solve_pure_critical"
,
&
am
::
solve_pure_critical
,
"T"
_a
,
"rho"
_a
,
py
::
arg_v
(
"flags"
,
std
::
nullopt
,
"None"
))
.
def
(
"extrapolate_from_critical"
,
&
am
::
extrapolate_from_critical
,
"Tc"
_a
,
"rhoc"
_a
,
"T"
_a
)
...
...
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