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

How to determine maximum's location on patch

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 7, 2012, 11:27
Default How to determine maximum's location on patch
  #1
Member
 
Victor-S. Eberhart
Join Date: Oct 2011
Posts: 32
Rep Power: 5
vigges is on a distinguished road
Hi Foamers,

my simulation is running smoothly but now, I'm facing the next problem.
I need to find the maximum Nusselt number on my wall patch and its location, so that my further calculations can be executed.

I thought about hacking something into the patchAverage utility, in order to get the average Nusselt number and the maximum's location at the same time. Unfortunately, I have no clue how to do that.

Do you have any ideas?
Thanks in advance.
Victor
vigges is offline   Reply With Quote

Old   July 10, 2012, 03:36
Post
  #2
New Member
 
Gwenael Hauet
Join Date: Jan 2010
Location: Grenoble, France
Posts: 4
Rep Power: 7
Gwenael is on a distinguished road
Did you look into foamCalc ?
__________________
Gwen
Gwenael is offline   Reply With Quote

Old   July 10, 2012, 03:48
Default
  #3
Member
 
Victor-S. Eberhart
Join Date: Oct 2011
Posts: 32
Rep Power: 5
vigges is on a distinguished road
Yes, I did. But afaik, it's not capable of determining the maximum value on a patch or its exact location on the patch.
I'm sure there is a solution but it would most likely involve programming in C... Let's say that is not my strong suit
vigges is offline   Reply With Quote

Old   July 10, 2012, 05:53
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Everybody run: Bernhards usual answer

Quote:
Originally Posted by vigges View Post
Yes, I did. But afaik, it's not capable of determining the maximum value on a patch or its exact location on the patch.
I'm sure there is a solution but it would most likely involve programming in C... Let's say that is not my strong suit
Recent versions of swak4Foam have a function maxPosition that gives you the location of the maximum on a patch. So something like (I'm doing this from memory)
Code:
functions {
    extremeP {
       type swakExpression;
       valueType patch;
       patchName wall;
       verbose true;
       expression "p";
       accumulations (min max);
    }
    maxPPosition {
      $extremeP;
      expression "maxPosition(p)";
      accumulations (average);
    }
    minPPosition {
      $maxPPosition;
      expression "minPosition(p)";
    }      
}
would give you minimum and maximum of p as well as their positions on the patch during the simulation.

Advantage: you don't have to program C++
Disadvantage: you'll have to pollute your machine with swak4Foam
gschaider is offline   Reply With Quote

Old   July 10, 2012, 05:58
Default
  #5
Member
 
Victor-S. Eberhart
Join Date: Oct 2011
Posts: 32
Rep Power: 5
vigges is on a distinguished road
Bernhard, thanks a lot!!
I'm going to look into that.
vigges is offline   Reply With Quote

Old   July 10, 2012, 08:30
Default
  #6
Member
 
Victor-S. Eberhart
Join Date: Oct 2011
Posts: 32
Rep Power: 5
vigges is on a distinguished road
Works perfectly :-)

Let's assume that only the final time step's max location is needed. Is it feasible to only export this value/location to a file?
vigges is offline   Reply With Quote

Old   July 10, 2012, 09:20
Default
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by vigges View Post
Works perfectly :-)

Let's assume that only the final time step's max location is needed. Is it feasible to only export this value/location to a file?
funkyDoCalc can be used to specify calculations in a file and execute them on saved data.

@file: there should be some directories named swakExpression_foo there with the data (not 100% sure whether funkyDoCalc creates them)
gschaider is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
CheckMeshbs errors ivanyao OpenFOAM Running, Solving & CFD 2 March 11, 2009 03:34
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 08:34.