Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
c1a32fa8
Commit
c1a32fa8
authored
Jan 13, 2009
by
Andrew Heather
Browse files
made gradient dimensioned
parent
e16553c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.C
View file @
c1a32fa8
...
...
@@ -76,7 +76,7 @@ Foam::pressureGradientExplicitSource::pressureGradientExplicitSource
)
),
Ubar_
(
dict_
.
lookup
(
"Ubar"
)),
gradPini_
(
readScalar
(
dict_
.
lookup
(
"gradPini"
))
)
,
gradPini_
(
dict_
.
lookup
(
"gradPini"
)),
gradP_
(
gradPini_
),
flowDir_
(
Ubar_
/
mag
(
Ubar_
)),
cellSource_
(
dict_
.
lookup
(
"cellSource"
)),
...
...
@@ -121,7 +121,7 @@ Foam::pressureGradientExplicitSource::pressureGradientExplicitSource
propsDict
.
lookup
(
"gradient"
)
>>
gradP_
;
}
Info
<<
" Initial pressure gradient = "
<<
gradP_
<<
endl
;
Info
<<
" Initial pressure gradient = "
<<
gradP_
<<
nl
<<
endl
;
}
...
...
@@ -143,7 +143,7 @@ Foam::pressureGradientExplicitSource::Su() const
IOobject
::
NO_WRITE
),
mesh_
,
dimensionedVector
(
"zero"
,
dimVelocity
/
dimTime
,
vector
::
zero
)
dimensionedVector
(
"zero"
,
gradP_
.
dimensions
()
,
vector
::
zero
)
)
);
...
...
@@ -153,7 +153,7 @@ Foam::pressureGradientExplicitSource::Su() const
{
label
cellI
=
iter
.
key
();
sourceField
[
cellI
]
=
flowDir_
*
gradP_
;
sourceField
[
cellI
]
=
flowDir_
*
gradP_
.
value
()
;
}
return
tSource
;
...
...
@@ -201,10 +201,10 @@ void Foam::pressureGradientExplicitSource::update()
}
// Update pressure gradient
gradP_
+=
gradPplus
;
gradP_
.
value
()
+=
gradPplus
;
Info
<<
"Uncorrected Ubar = "
<<
magUbarAve
<<
tab
<<
"Pressure gradient = "
<<
gradP_
<<
endl
;
<<
"Pressure gradient = "
<<
gradP_
.
value
()
<<
endl
;
writeGradP
();
}
...
...
src/finiteVolume/cfdTools/general/fieldSources/pressureGradientExplicitSource/pressureGradientExplicitSource.H
View file @
c1a32fa8
...
...
@@ -73,10 +73,10 @@ class pressureGradientExplicitSource
vector
Ubar_
;
//- Initial pressure gradient
s
calar
gradPini_
;
dimensionedS
calar
gradPini_
;
//- Pressure gradient
s
calar
gradP_
;
dimensionedS
calar
gradP_
;
//- Flow direction
vector
flowDir_
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment