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-plus
Commits
9549b236
Commit
9549b236
authored
Jan 15, 2019
by
Mark Olesen
Browse files
ENH: include the selection volume in momentum output
parent
dc1446d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/functionObjects/field/momentum/momentum.C
View file @
9549b236
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018
-2019
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -249,8 +249,9 @@ void Foam::functionObjects::momentum::writeFileHeader(Ostream& os)
{
writeTabbed
(
os
,
"(momentum_r momentum_rtheta momentum_axis)"
);
}
os
<<
endl
;
writeTabbed
(
os
,
"volume"
);
os
<<
endl
;
writtenHeader_
=
true
;
}
...
...
@@ -319,7 +320,8 @@ void Foam::functionObjects::momentum::writeValues(Ostream& os)
{
os
<<
tab
<<
sumAngularMom_
;
}
os
<<
endl
;
os
<<
tab
<<
volRegion
::
V
()
<<
endl
;
}
Log
<<
endl
;
...
...
@@ -409,9 +411,6 @@ bool Foam::functionObjects::momentum::read(const dictionary& dict)
pName_
=
dict
.
lookupOrDefault
<
word
>
(
"p"
,
"p"
);
rhoName_
=
dict
.
lookupOrDefault
<
word
>
(
"rho"
,
"rho"
);
rhoRef_
=
dict
.
lookupOrDefault
<
scalar
>
(
"rhoRef"
,
1
.
0
);
rhoRef_
=
dict
.
lookupOrDefault
<
scalar
>
(
"rhoRef"
,
1
.
0
);
hasCsys_
=
dict
.
lookupOrDefault
(
"cylindrical"
,
false
);
if
(
hasCsys_
)
...
...
@@ -570,4 +569,16 @@ bool Foam::functionObjects::momentum::write()
}
void
Foam
::
functionObjects
::
momentum
::
updateMesh
(
const
mapPolyMesh
&
mpm
)
{
volRegion
::
updateMesh
(
mpm
);
}
void
Foam
::
functionObjects
::
momentum
::
movePoints
(
const
polyMesh
&
pm
)
{
volRegion
::
movePoints
(
pm
);
}
// ************************************************************************* //
src/functionObjects/field/momentum/momentum.H
View file @
9549b236
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018
-2019
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -251,6 +251,12 @@ public:
//- Write the momentum, possibly angular momentum and velocity
virtual
bool
write
();
//- Update for changes of mesh
virtual
void
updateMesh
(
const
mapPolyMesh
&
);
//- Update for mesh point-motion
virtual
void
movePoints
(
const
polyMesh
&
);
};
...
...
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