kappatJayatillekeWallFunctionFvPatchScalarField changes between OpenFOAM 171 and 201
Hi everyone!
I discovered following while simulating buoyant flow with 1.7.0 and 1.7.1 versions (Ubuntu 10.04 LTS packages from apt): 1. Comparable to 1.7.0 in version 1.7.1 kappat field is introduced in TEqn for incompressible SIMPLE and PIMPLE solvers. v1.7.0: Code:
{ Code:
{ diff for kappatJayatillekeWallFunctionFvPatchScalarField.C between 1.7.1 and 2.0.1 results in Code:
210c210 log(E_*yPlusTherm) where yPlusTherm can be equal zero. You cal also notice that parenthesis around (log(E_*yPlus)/kappa_ + P)) result in different expression than Prt_/kappa_*log(E_*yPlusTherm) + P. Hope it would be helpful for someone)))) Cheers, A. 
Please can you help me with an explanation of what rhok is?


Thanks for the prompt response. I know about the boussinesque approximation. My question is because of a case I'm setting up in OpenFOAM. I am simulating stratification in a cylindrical tank. I have modified the 'hotroom' example under the bouyantBoussinesqPimpleFoam solver and changed the entries in the 'transportProperties' file to those of water. When the run the case with the original entries (which I suspect to be for air), I get realistic results  the stratification is obvious. But when I change the properties  Pr, beta, nu, to those of water the results when viewed show no signs of stratification. Could you be of help please?

Hello Howard!
It is always better when you ask detailed questions. Because for the obvious ones you can find answers yourself and it is more useful for you to learn finding answers. Would you please post you pictures which do not satisfy you and also the parameters which you used? Cheers, A. 
Do you mean simulating compressible flow? Of couse for water (almost incompressible liquid) there is no such stratification as for e.g. air.

1 Attachment(s)
Hello Dr. Alexander,
Please pardon the delay in my response. I travelled out of town without my laptop and was without access to computer facilities. The changes I made in the transportProperties file were nu : changed from 1e05 to 4.5e07 (m2sec1) beta: changed from 3e03 to 5e04 (K1) Pr: changed from 0.9 to 3.0 Prt: changed from 0.7 to 2.3. Tref was left unchanged. The RASModel keyword in the RASProperities file was changed to laminar. In the 0/p file the wall pressures were set with the $internalField entry, while the p_rgh value was set to constant 0 in the 0/p_rgh file. You'll see from the attached picture that there is no evidence of stratification. Stratification is obtainable in incompressible flows (the 'buoyantBoussinesqPimpleFoam' solver is for "Transient solver for buoyant, turbulent flow of incompressible fluids" according to the user guide.) This is the basis for stratified hot water storages which is what I'm trying to study. Howard 
kappatw instead of kappat?
Dear Dr.Alexander,
In the file "kappatJayatillekeWallFunctionFvPatchScalarField.C" kappatw shouldn't be kappat? I searched much, but didn't find any use of kappatw. With Regards, Chirag Patel 
dear all,
i wonder why the JayatillekeWallFunction is not available for the the calculation of alphat in the compressible RANS version. for now, in the compressible version alphat is evaluated as mut/Prt at the wall. i m thinking of implementing the procedure of the JayatillekeWallFunction for compressible RANS in alphatWallFunctions. does it make sens or is alphatw = mutw/Prt resonable anyway?? @Chirag Patel kappatw is taken from the expression Code:
scalarField& kappatw = *this; cheers, aram 
hi,
I though about something like this: Code:
// Populate boundary values cheers, Aram 
hi Aram!
you are right) But I found an implementation in version OF 2.10: see http://foam.sourceforge.net/docs/cpp...ce.html#l00195 Code:
00195 void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() Cheers, Alex 
hi Alex,
thanks for the hint (still using OF 1.7). I had a look on the implementation of OF 2.1. Three main differences in the why how i proposed it: 1) alphat isnt set to zero for yPlus < yPlusLam, but I couldn t find a reference so far were the equation comes from 2) The BC calculates alphaEff and updates alphat by subtracting alpha (laminar) 3) For yPlus > yPlusLam the calculation of alphaEff differs from the version I proposed by an additional term in the denominator which contains velocities (which I couldn t find out yet where it comes from): Code:
cheers, Aram 
Hi,
those additional terms are for compressible flow, thus there are none of them in incompressible BC version. Check for the full version: http://my.fit.edu/itresources/manual...pdf/flu_th.pdf, (page 124) Sorry for the wrong link to the Theory Guide) Cheers! 
That s great! Got it now!!
Thanks again!! Cheers, Aram 
help me plz
Hi every foamers.
I want to add k(kinetic turbulence energy) in one solver. for this work, added next line in the code of solver: const volScalarField &k=U_.db().lookupObject<volScalarField>("k") and wmake was Successfully . but How can I Understand that this k is the same with k(kinetic turbulence energy)???Is it true?????or not???? Because I replase another word in this : const volScalarField &M=U_.db().lookupObject<volScalarField>("M") but nothing error was not occured!!!!!!?????? 
Could the lookup method just give you a null pointer, then no error is detected

Thanks
Thanks Dr. Alexander A. Vakhrushev for your answer.
its means this work not true???this k is not kinetic turbulence energy??? if your answer yes!!!Please suggest me one way to Correction this code with k(kinetic turbulence energy)!!! 
Could you show more information, e.g.post your solver (if it is not secret) to understand your problem. Actually it should be ok what yo use to get k field.

my solver is in Appendix
1 Attachment(s)
Thanks for your answer Dr.
it is not secret!!!:) my solver is in Appendix.I want to added kinetic turbulence energy in Directory: OpenFOAM/vahid 2.0.1/run/myinterPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.c in file:SchnerrSauer.c I have add (turbulence kinetic Energy or k ) in a part of this solver. first: added: I$(LIB_SRC)/turbulenceModels \ I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \ in option. and then: added //.................................................. .....changed // Construct incompressible turbulence model autoPtr<incompressible::RASModel> turbulence ( incompressible::RASModel::New(U, phi, twoPhaseProperties()) ); //.................................................. .....changed in creatField. and then: added #include "RASModel.H" and: //.................................................. ............. volScalarField turbKinEnergy = turbulence().k(); //turbKinEnergy = turbulence().k(); volScalarField turbDisEnergy = turbulence().epsilon(); in this and turbkinEnergy=k //.................................................. ............. in myinterPhaseChangeFoam.c and wmake is ok!!! but I want in this solver in directory: /run/myinterPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.c I added #include "RASModel.H" in it and: Foam::tmp<Foam::volScalarField> Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::p Coeff ( const volScalarField& p ) const { volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); volScalarField rho ( limitedAlpha1*rho1() + (scalar(1)  limitedAlpha1)*rho2() ); return //......I want to change it( <<k>> turbulence multiple in it): (3*rho1()*rho2())*sqrt(2/(3*rho1()))*k() *rRb(limitedAlpha1)/(rho*sqrt(mag(p  pSat()) + 0.01*pSat())); //.................................................. ...... } dont successful wmake, and seen(was not declared ): I/opt/openfoam201/src/OSspecific/POSIX/lnInclude fPIC c $SOURCE o Make/linux64GccDPOpt/SchnerrSauer.o phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C: In member function â€کFoam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::p Coeff(const Foam::volScalarField&) constâ€™: phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C:113: error: k() was not declared in this scope make: *** [Make/linux64GccDPOpt/SchnerrSauer.o] Error 1 please help me. another way that I worked: Foam::tmp<Foam::volScalarField> Foam:haseChangeTwoPhaseMixtures::SchnerrSauer: Coeff ( const volScalarField& p ) const { volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); volScalarField rho ( limitedAlpha1*rho1() + (scalar(1)  limitedAlpha1)*rho2() ); return const volScalarField &k=U_.db().lookupObject<volScalarField>("k"); (3*rho1()*rho2())*sqrt(2/(3*rho1()))*k() *rRb(limitedAlpha1)/(rho*sqrt(mag(p  pSat()) + 0.01*pSat())); and wmake was Successfully . but How can I Understand that this k is the same with k(kinetic turbulence energy)???Is it true??? Because I replase another world in this : const volScalarField &M=U_.db().lookupObject<volScalarField>("M") but not error occured!!!!!!?????? please help me more about this problem????Thanks. 
Hello Everybody,
I am exhuming this thread because it is the only one were somebody talks about yPlustherm. So maybe the Pro's see their old thread poping up and somebody can give me a reply: I am working with the above mentioned wall function. What I dont understand is the calculation of yPlustherm. The docu says it is the value of yPlus at the edge of the thermal laminar sublayer. But where does the formula come from: Code:
00084 scalar f = ypt  (log(E_*ypt)/kappa_ + P)/Prat; So my question is: What is yPlustherm and whats the background for this formula? So I would be gratefull if somebody could lift the fog. Thanks! Camoesas 
All times are GMT 4. The time now is 17:05. 