Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
eebfda5f
Commit
eebfda5f
authored
Jul 07, 2009
by
Andrew Heather
Browse files
optimisation for diffusion calc
parent
f9e3cf3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/thermophysicalModels/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.H
View file @
eebfda5f
...
...
@@ -47,7 +47,7 @@ namespace Foam
{
/*---------------------------------------------------------------------------*\
Class APIdiffCoefFunc Declaration
Class APIdiffCoefFunc Declaration
\*---------------------------------------------------------------------------*/
class
APIdiffCoefFunc
...
...
@@ -59,6 +59,9 @@ class APIdiffCoefFunc
// API vapour mass diffusivity function coefficients
scalar
a_
,
b_
,
wf_
,
wa_
;
// Helper variables
scalar
alpha_
,
beta_
;
public:
...
...
@@ -74,7 +77,9 @@ public:
a_
(
a
),
b_
(
b
),
wf_
(
wf
),
wa_
(
wa
)
wa_
(
wa
),
alpha_
(
sqrt
(
1
/
wf_
+
1
/
wa_
)),
beta_
(
sqr
((
cbrt
(
a_
)
+
cbrt
(
b_
))))
{}
//- Construct from Istream
...
...
@@ -83,21 +88,21 @@ public:
a_
(
readScalar
(
is
)),
b_
(
readScalar
(
is
)),
wf_
(
readScalar
(
is
)),
wa_
(
readScalar
(
is
))
wa_
(
readScalar
(
is
)),
alpha_
(
sqrt
(
1
/
wf_
+
1
/
wa_
)),
beta_
(
sqr
((
cbrt
(
a_
)
+
cbrt
(
b_
))))
{}
// Member Functions
//- API vapour mass diffusivity function
//- API vapour mass diffusivity function using properties from
// construction
scalar
f
(
scalar
p
,
scalar
T
)
const
{
return
3.6059e-3
*
(
pow
(
1.8
*
T
,
1.75
))
*
sqrt
(
1
/
wf_
+
1
/
wa_
)
/
(
p
*
sqr
((
cbrt
(
a_
)
+
cbrt
(
b_
))));
return
3.6059e-3
*
(
pow
(
1.8
*
T
,
1.75
))
*
alpha_
/
(
p
*
beta_
);
}
//- Write the function coefficients
void
writeData
(
Ostream
&
os
)
const
{
...
...
Write
Preview
Markdown
is supported
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