Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
4eda84b7
Commit
4eda84b7
authored
Sep 08, 2016
by
Christoph Grüninger
Browse files
[h2oair] Use sqrt instead of pow to speedup viscosity evaluation
test_stokes2c with refined grid speeds up by 2.7%.
parent
c0494c0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/material/fluidsystems/h2oair.hh
View file @
4eda84b7
...
...
@@ -493,11 +493,9 @@ public:
Scalar
divisor
=
0
;
for
(
int
j
=
0
;
j
<
numComponents
;
++
j
)
{
Scalar
phiIJ
=
1
+
sqrt
(
mu
[
i
]
/
mu
[
j
])
*
// 1 + (mu[i]/mu[j]^1/2
pow
(
M
[
j
]
/
M
[
i
],
1.
/
4.0
);
// (M[i]/M[j])^1/4
phiIJ
*=
phiIJ
;
phiIJ
/=
sqrt
(
8
*
(
1
+
M
[
i
]
/
M
[
j
]));
// 1 + (mu[i]/mu[j]^1/2 * (M[i]/M[j])^1/4)
Scalar
phiIJ
=
1
+
sqrt
(
mu
[
i
]
/
mu
[
j
]
*
sqrt
(
M
[
j
]
/
M
[
i
]));
phiIJ
=
phiIJ
*
phiIJ
/
sqrt
(
8
*
(
1
+
M
[
i
]
/
M
[
j
]));
divisor
+=
fluidState
.
moleFraction
(
phaseIdx
,
j
)
*
phiIJ
;
}
muResult
+=
fluidState
.
moleFraction
(
phaseIdx
,
i
)
*
mu
[
i
]
/
divisor
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment