|
[Sponsors] |
July 7, 2012, 11:27 |
How to determine maximum's location on patch
|
#1 |
Member
Join Date: Oct 2011
Posts: 36
Rep Power: 14 |
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 |
|
July 10, 2012, 03:36 |
|
#2 |
New Member
Gwenael Hauet
Join Date: Jan 2010
Location: Grenoble, France
Posts: 4
Rep Power: 16 |
Did you look into foamCalc ?
__________________
Gwen |
|
July 10, 2012, 03:48 |
|
#3 |
Member
Join Date: Oct 2011
Posts: 36
Rep Power: 14 |
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 |
|
July 10, 2012, 05:53 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Everybody run: Bernhards usual answer
Quote:
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)"; } } Advantage: you don't have to program C++ Disadvantage: you'll have to pollute your machine with swak4Foam |
||
July 10, 2012, 05:58 |
|
#5 |
Member
Join Date: Oct 2011
Posts: 36
Rep Power: 14 |
Bernhard, thanks a lot!!
I'm going to look into that. |
|
July 10, 2012, 08:30 |
|
#6 |
Member
Join Date: Oct 2011
Posts: 36
Rep Power: 14 |
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? |
|
July 10, 2012, 09:20 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
@file: there should be some directories named swakExpression_foo there with the data (not 100% sure whether funkyDoCalc creates them) |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 04:38 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 02:34 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 20:30 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 08:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 05:12 |