CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Computation of kinetic energy of the flow

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 9, 2011, 21:15
Default Computation of kinetic energy of the flow
  #1
Member
 
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15
feldy77 is on a distinguished road
Hi foamers,
I am really puzzled about how tocompute the overall kinetic energy of the flow, i mean I(1/2*U^2)dV, where I is an integral over the given volume.
I understand that I have to sum over all subvolumes but I do not even know how to start . Please help me
feldy77 is offline   Reply With Quote

Old   November 10, 2011, 08:16
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
volScalarField ke=0.5*(U&U);
dimensionedScalar ketotal = sum(ke*mesh.V());
nimasam is offline   Reply With Quote

Old   November 10, 2011, 16:15
Default
  #3
Member
 
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15
feldy77 is on a distinguished road
Dear nimasam,
Thank you very much for your answer it was very useful.
Just a small comment,
It is better just to compute the Ek just by

dimensionedScalar ketotal = sum(0.5*(U&U)*mesh.V());

In this way you do not need to construct an additional volScalar field
which can save alot of memory
Yuri
feldy77 is offline   Reply With Quote

Old   November 10, 2011, 16:43
Default
  #4
Member
 
Yuri Feldman
Join Date: Mar 2011
Posts: 30
Rep Power: 15
feldy77 is on a distinguished road
Thinking about the issue once agin, the last change does not reduce the
memory consumption since U&U opration still consumpts the same amount of memory as if volScalarfield is defined explicitly. I would recommend another way , which is longer but allows you to save the memory:

forAll (mesh.C().internalField(), patchI)
{

Ekin_= Ekin_+0.5*
(sqr(U.internalField()[patchI].component(vector::X))+
sqr(U.internalField()[patchI].component(vector::Y))+
sqr(U.internalField()[patchI].component(vector::Z)))
*mesh.V()[patchI];
}
This is of course right for non-slip boundary conditions.
Yuri
feldy77 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CFX-POST : gradients for turbulent kinetic energy syler3321 CFX 1 June 16, 2011 06:47
mass flow rate computation in fluent Kishore FLUENT 5 June 27, 2007 04:53
Compressible flow computation with STAR Veera Siemens 0 June 19, 2004 05:31
Turbulent Kinetic Energy Olga FLUENT 2 October 11, 2002 16:05
computation about flow around a yawed cone Tylor Xie Main CFD Forum 0 June 9, 1999 08:33


All times are GMT -4. The time now is 15:48.