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

Bug in actuationDiskSource????

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mAlletto

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2018, 08:36
Default Bug in actuationDiskSource????
  #1
New Member
 
Amadeo Moran
Join Date: Jan 2012
Location: Madrid
Posts: 10
Rep Power: 14
a.morang is on a distinguished road
Dear community,

I was trying to perform a simulation of an actuator disk and reviewing the source code C++ in "actuationDiskSourceTemplates.C" there is a line with the calculation of T (total thrust).

Code:
scalar T = 2.0*upRho*diskArea_*mag(upU)*a*(1 - a);
if mag() calculates the magnitude of a field, is there is a bug? because the thrust should be:

Code:
scalar T = 2.0*upRho*diskArea_*sqr(mag(upU))*a*(1 - a);
Probably I am considering something wrong because is not a new implementation and have been tested a lot but if anybody can help I will appreciate it very much.

Thanks and regards from Spain!
amg.

Last edited by a.morang; July 9, 2018 at 05:06.
a.morang is offline   Reply With Quote

Old   July 7, 2018, 06:11
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
I think this is correct since mag calculates the magnitude and not the magnitude squared


see, e.g. http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf
mAlletto is offline   Reply With Quote

Old   July 9, 2018, 05:13
Default
  #3
New Member
 
Amadeo Moran
Join Date: Jan 2012
Location: Madrid
Posts: 10
Rep Power: 14
a.morang is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
I think this is correct since mag calculates the magnitude and not the magnitude squared


see, e.g. http://foam.sourceforge.net/docs/Gui...mmersGuide.pdf
sqr is the squared:

Code:
sqr(mag(U)) == mag(U)*mag(U)
for it my question... In the original code U is not squared and should be because if not the units are not correct unless:

Code:
mag(U) = Ux^2 + Uy^2 + Uz^2
a.morang is offline   Reply With Quote

Old   July 9, 2018, 11:28
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
The units are correct since the complete calculation of the force is:



scalar T = 2.0*upRho*diskArea_*mag(upU)*a*(1 - a);
forAll(cells, i){Usource[cells[i]] += ((Vcells[cells[i]]/V())*T*E) & upU;}
mAlletto is offline   Reply With Quote

Old   July 10, 2018, 05:07
Default
  #5
New Member
 
Amadeo Moran
Join Date: Jan 2012
Location: Madrid
Posts: 10
Rep Power: 14
a.morang is on a distinguished road
Quote:
Originally Posted by mAlletto View Post
The units are correct since the complete calculation of the force is:



scalar T = 2.0*upRho*diskArea_*mag(upU)*a*(1 - a);
forAll(cells, i){Usource[cells[i]] += ((Vcells[cells[i]]/V())*T*E) & upU;}
Do you mean that in C++:

Code:
upU & upU == upU^2
Thanks.
amg.
a.morang is offline   Reply With Quote

Old   July 10, 2018, 07:03
Default
  #6
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 616
Rep Power: 16
mAlletto will become famous soon enough
yes. The dot product of two vectors is equal to the magnitude squared:


u & u = ux*ux + uy*uy + uz*uz
a.morang likes this.
mAlletto is offline   Reply With Quote

Old   July 11, 2018, 14:14
Default
  #7
New Member
 
Amadeo Moran
Join Date: Jan 2012
Location: Madrid
Posts: 10
Rep Power: 14
a.morang is on a distinguished road
Quote:
Originally Posted by malletto View Post
yes. The dot product of two vectors is equal to the magnitude squared:


U & u = ux*ux + uy*uy + uz*uz
thanks you very much for your time!!
Regards!
a.morang is offline   Reply With Quote

Reply

Tags
actuationdisksource


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
mapFields major bug alchem OpenFOAM Bugs 14 September 15, 2023 13:48
Bug in Workbench CFX Pierre1 CFX 6 August 2, 2017 01:18
SU2_MSH: Periodic boundary conditions bug Zef SU2 1 February 18, 2015 14:28
Serious bug in LES interface fs82 OpenFOAM Bugs 21 November 16, 2009 09:15
Bug reports Mattijs Janssens (Mattijs) OpenFOAM 0 January 10, 2005 11:05


All times are GMT -4. The time now is 19:16.