Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dmitri Naumov
ogs
Commits
49cecceb
Commit
49cecceb
authored
3 years ago
by
wenqing
Browse files
Options
Downloads
Patches
Plain Diff
[MPL/WVLH_CT] A little computational efficiency improvement.
parent
b89006ac
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
MaterialLib/MPL/Properties/Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp
+15
-9
15 additions, 9 deletions
...Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp
with
15 additions
and
9 deletions
MaterialLib/MPL/Properties/Enthalpy/WaterVapourLatentHeatWithCriticalTemperature.cpp
+
15
−
9
View file @
49cecceb
...
...
@@ -45,15 +45,19 @@ PropertyDataType WaterVapourLatentHeatWithCriticalTemperature::value(
}
double
const
tau
=
(
T_c
-
T
)
/
T_c
;
double
const
tau_p2
=
tau
*
tau
;
double
const
tau_p3
=
tau_p2
*
tau
;
double
const
tau_p4
=
tau_p3
*
tau
;
double
const
tau_p5
=
tau_p4
*
tau
;
std
::
array
v
=
{
std
::
pow
(
tau
,
beta
),
std
::
pow
(
tau
,
beta
+
Delta
),
std
::
pow
(
tau
,
1
-
alpha
+
beta
),
tau
,
tau
*
tau
,
tau
*
tau
*
tau
,
tau
*
tau
*
tau
*
tau
,
tau
*
tau
*
tau
*
tau
*
tau
};
tau
_p2
,
tau
_p3
,
tau
_p4
,
tau
_p5
};
// The formula gives the value in kJ/kg, and the return value is in the
// units of J/kg.
...
...
@@ -81,8 +85,6 @@ PropertyDataType WaterVapourLatentHeatWithCriticalTemperature::dValue(
return
0.0
;
}
double
const
tau
=
(
T_c
-
T
)
/
T_c
;
constexpr
std
::
array
dc
=
{
c
[
0
]
*
beta
,
c
[
1
]
*
(
beta
+
Delta
),
c
[
2
]
*
(
1
-
alpha
+
beta
),
...
...
@@ -92,14 +94,18 @@ PropertyDataType WaterVapourLatentHeatWithCriticalTemperature::dValue(
c
[
6
]
*
4
,
c
[
7
]
*
5
};
double
const
tau
=
(
T_c
-
T
)
/
T_c
;
double
const
tau_p2
=
tau
*
tau
;
double
const
tau_p3
=
tau_p2
*
tau
;
double
const
tau_p4
=
tau_p3
*
tau
;
std
::
array
v
=
{
std
::
pow
(
tau
,
beta
-
1
),
std
::
pow
(
tau
,
beta
+
Delta
-
1
),
std
::
pow
(
tau
,
-
alpha
+
beta
),
1.
,
tau
,
tau
*
tau
,
tau
*
tau
*
tau
,
tau
*
tau
*
tau
*
tau
};
tau
_p2
,
tau
_p3
,
tau
_p4
};
// The formula gives the value in kJ/kg/K, and the value is return in
// the unit of J/kg/K.
...
...
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