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

problem interrogating min/max face velocity

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2010, 17:27
Default problem interrogating min/max face velocity
  #1
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
In CourantNo.H, the max magnitude of the velocity at a face is reported as

Code:
velMag = max(mag(phi)/mesh.magSf()).value();
I'd like to interrogate the result in detail, so I add the following:

Code:
Info << "max phi/magSf = " << max(phi/mesh.magSf()).value() << endl;
Info << "min phi/magSf = " << min(phi/mesh.magSf()).value() << endl;
forAll(phi,i)
{
  Info << i << " " << phi[i]
            << " " << mesh.magSf()[i]
            << " " << phi[i]/mesh.magSf()[i]
            << endl;
}
With this bit of code, and using 1.6.x, I am able to find agreement with the max operator (i.e. the loop reports a max value of 5410 which is the same value reported by the max operator), but I am not able to find agreement with the min operator. The min operator reports a value of -12472 while the loop reports a min value of "only" -2710.

This is serial execution -- all faces belong to a single mesh on a single processor. The number of values reported in the loop, phi.size(), and magSf().size() are all equal.

Any ideas how I might be getting this wrong?

Thanks,
David
__________________
David A. Boger

Last edited by boger; March 13, 2010 at 18:10.
boger is offline   Reply With Quote

Old   March 13, 2010, 18:11
Default
  #2
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
Sorry -- I realize now that the extreme value is in the boundaryField.
__________________
David A. Boger
boger 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
Velocity field problem feizaghaee CFX 20 February 24, 2010 05:23
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
unsteady state velocity problem Vedavyasa M FLUENT 0 June 28, 2007 07:33
problem defining inlet velocity direction salman FLUENT 3 January 3, 2007 12:34
problem for UDF velocity Geremi FLUENT 0 April 19, 2005 03:13


All times are GMT -4. The time now is 01:35.