|August 21, 2009, 04:30||
Join Date: Apr 2009
Posts: 55Rep Power: 9
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!
|October 1, 2009, 05:44||
Join Date: Mar 2009
Location: Auckland, New Zealand
Posts: 7Rep Power: 9
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
*(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1),
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?
|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 04:16|
|OpenFOAM v1.6 & OpenMPI & functionObjects||bruce||OpenFOAM Running, Solving & CFD||1||August 7, 2009 13:15|
|Postprocessing and uniformDensityHydrostaticPressure in v1.6||Schag||OpenFOAM Bugs||2||July 28, 2009 13:41|