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
46804292
Commit
46804292
authored
1 year ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Fix the treatment for the 334,445 term
parent
de8b80a4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/teqp/models/saft/polar_terms.hpp
+9
-2
9 additions, 2 deletions
include/teqp/models/saft/polar_terms.hpp
with
9 additions
and
2 deletions
include/teqp/models/saft/polar_terms.hpp
+
9
−
2
View file @
46804292
...
...
@@ -441,7 +441,14 @@ public:
auto
leadingijk
=
x
[
i
]
*
x
[
j
]
*
x
[
k
]
/
(
Tstari
*
Tstarj
*
Tstark
);
auto
get_Kijk
=
[
&
](
const
auto
&
Kint
){
return
pow
(
Kint
.
get_K
(
Tstarij
,
rhostar
)
*
Kint
.
get_K
(
Tstarik
,
rhostar
)
*
Kint
.
get_K
(
Tstarjk
,
rhostar
),
1.0
/
3.0
);
return
forceeval
(
pow
(
Kint
.
get_K
(
Tstarij
,
rhostar
)
*
Kint
.
get_K
(
Tstarik
,
rhostar
)
*
Kint
.
get_K
(
Tstarjk
,
rhostar
),
1.0
/
3.0
));
};
// Special treatment needed here because the 334,445 term is negative, so negative*negative*negative is negative, and negative^{1/3} is undefined
// First flip the sign on the triple product, do the evaluation, the flip it back. Not documented in Gubbins&Twu, but this seem reasonable,
// in the spirit of the others.
auto
get_Kijk_334445
=
[
&
](
const
auto
&
Kint
){
return
forceeval
(
-
pow
(
-
Kint
.
get_K
(
Tstarij
,
rhostar
)
*
Kint
.
get_K
(
Tstarik
,
rhostar
)
*
Kint
.
get_K
(
Tstarjk
,
rhostar
),
1.0
/
3.0
));
};
if
(
std
::
abs
(
mubar2
[
i
]
*
mubar2
[
j
]
*
mubar2
[
k
])
>
0
){
...
...
@@ -453,7 +460,7 @@ public:
summerB_112_123_123
+=
leadingijk
*
POW3
(
sigma
[
i
]
*
sigma
[
j
])
*
POW5
(
sigma
[
k
])
/
(
sigmaij
*
POW2
(
sigmaik
*
sigmajk
))
*
mubar2
[
i
]
*
mubar2
[
j
]
*
Qbar2
[
k
]
*
K233344
;
}
if
(
std
::
abs
(
mubar2
[
i
]
*
Qbar2
[
j
]
*
Qbar2
[
k
])
>
0
){
auto
K334445
=
get_Kijk
(
K334_445
);
auto
K334445
=
get_Kijk
_334445
(
K334_445
);
summerB_123_123_224
+=
leadingijk
*
POW3
(
sigma
[
i
])
*
POW5
(
sigma
[
j
]
*
sigma
[
k
])
/
(
POW2
(
sigmaij
*
sigmaik
)
*
POW3
(
sigmajk
))
*
mubar2
[
i
]
*
Qbar2
[
j
]
*
Qbar2
[
k
]
*
K334445
;
}
if
(
std
::
abs
(
Qbar2
[
i
]
*
Qbar2
[
j
]
*
Qbar2
[
k
])
>
0
){
...
...
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