|
[Sponsors] |
August 21, 2009, 05:30 |
nutRoughWallFunction v1.6
|
#1 |
Member
Julien Schaguene
Join Date: Apr 2009
Location: France
Posts: 55
Rep Power: 17 |
Hi all,
testing some "new" features given by v1.6, I found this one quite different from previous version, and want to use it. My issue is the understanding of some pieces of code. First, these two lines in function calcNut(): tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw(); I understand it initialise a scalarField nutw, uniform 0 value, with the size of the patch I'm dealing with. But the two things I do not get are: - dummy question: what does tmp stand for? temporary? - does it initialise this scalarField at each time step? in this case, this boundary type would seem quite useless regarding the calculation of nutw that follows. It might seem dummy questions, but I have to begin to understand one day or another. Thanks for answers! Regards, Julien |
|
October 1, 2009, 06:44 |
|
#2 |
New Member
John O\'Sullivan
Join Date: Mar 2009
Location: Auckland, New Zealand
Posts: 7
Rep Power: 17 |
Hi Julien,
I'm looking at the same thing and have come to the same conclusion. I had written my own rough wall function in version 1.5 and was surprised when version 1.6 gave me different results today when I started testing it. I have 1-D simulations I use to generate profiles and they have a single cell at the ground which makes them pretty easy to debug. I've found the same thing as you, namely that nutw is set to 0 every time step. This means that scalar limitingNutw = max(nutw[faceI], nuw[faceI]); always returns limitingNutw = nuw[faceI]. This in turn means that nutw[faceI] = max ( min ( nuw[faceI] *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), 2*limitingNutw ), 0.5*limitingNutw ); always returns nutw[faceI] = 2*limitingNutw To test the rest of the code I hard coded a known value for limitingNutw and everything works fine. I admit my OpenFOAM C++ is not fantastic so I'm not really sure what nutw should be initialised to? Probably the value from the previous time step? I think it probably shouldn't be initialised to 0 initially either but should be read from the nut file? This is the first potential bug I've stumbled across and I'm not sure what the procedure is for submitting it for someone to have a look at. Advice anyone? Thanks! John |
|
October 1, 2009, 17:28 |
|
#3 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM v1.6 & OpenMPI & functionObjects | bruce | OpenFOAM Bugs | 7 | December 16, 2011 15:37 |
installing v1.6 and keeping v1.5 | Gavin | OpenFOAM | 9 | October 23, 2009 05:16 |
OpenFOAM v1.6 & OpenMPI & functionObjects | bruce | OpenFOAM Running, Solving & CFD | 1 | August 7, 2009 14:15 |
Postprocessing and uniformDensityHydrostaticPressure in v1.6 | Schag | OpenFOAM Bugs | 2 | July 28, 2009 14:41 |