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

[swak4Foam] how to find local nusselt with swak4Foam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By mortezanayebi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2018, 01:38
Default how to find local nusselt with swak4Foam
  #1
New Member
 
mortezanayebi
Join Date: Jan 2018
Posts: 8
Rep Power: 8
mortezanayebi is on a distinguished road
Quote:
Originally Posted by gschaider View Post
The usual behaviour of the internalField-parser (which is used by the expressionField-function object) is to only calculate the internal field (hence the name) and calculate a zeroGradient for the patches (which basically means that a face gets the value of the neighbour cell). Why that is 0 in your case ... I don't know (unless nearDist is 0 in the boundary cells)

Anyway: variation 1 is better anyway.
a) because it only has to be computed on the boundary. Not on the whole field
b) you get yPlus for the face. Not the value of the cell projected onto the face. Which might differ (think of a stretched cell in a corner: all three boundary faces of that cell will get the same value. Although they don't have the same yPlus)

There is another way to calculate that. You could use the readAndUpdateField-functionObject to load a field myYPlus. In that field you implement the expression from version 1 as a groovyBC. Then you can use the patchExpression from version 2. The only advantage of this is that afterwards you have the whole field on disc and can visualize the distribution of yPlus in paraView


Hi Bernhard
I need to find local nusselt around a cylinder. I was wondering if you could please let me know how I can obtain the local nusselt using swak4Foam.

I might need to mention that I already calculated the average nusselt by adding the following code to controlDict.

Code:
libs (
      "libOpenFOAM.so"
      "libsimpleFunctionObjects.so"
      "libsimpleSwakFunctionObjects.so"
      "libswakFunctionObjects.so"
     );
functions
{
             NusseltNumber
            {
                        type patchExpression;
                        ignore_unimplemented_simpleFunctionObject::movePoints    true;
                        outputControlMode   timeStep;
                        outputInterval    1;
                        patches
                        (
                                    cylinder
                        );
                        verbose true;
                        variables
                        (
                                    "T_inf=0;"
                                    "L=10;"
                        );
                        expression "L*snGrad(T)/(T-T_inf)";
                        accumulations
                        (
                                    average
                        );
                        log         true;
            }
}
thanks
DaveD! likes this.

Last edited by wyldckat; November 1, 2018 at 12:21. Reason: Added [CODE][/CODE] markers
mortezanayebi is offline   Reply With Quote

Old   November 1, 2018, 12:37
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: Looks like the only way to do this is to use groovyBC to do the calculation on a field. I don't remember ever doing this myself and right now I don't have enough time to come up with an example case.

That said, it might be easier if you modify the old source code applications for wallHeatFlux and modify it to your needs...

Wait, I did a bit more searching and there is already a complete example here: calculate Nusselt number - post #2
__________________
wyldckat 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
Transient simulation not converging skabilan OpenFOAM Running, Solving & CFD 14 December 16, 2019 23:12
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 5 February 22, 2018 19:50
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 03:34
Local Nusselt Number rohangulavani FLUENT 0 July 1, 2010 14:39
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


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