CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   YPlusRAS and interFoam (http://www.cfd-online.com/Forums/openfoam-bugs/62396-yplusras-interfoam.html)

dkingsley October 23, 2008 12:43

yPlusRas does not currently wo
 
yPlusRas does not currently work with interFoam/rasInterFoma etc. The issue is that the transportProperties dictionary contains data for 2 phases.

Has anyone modified yPlusRas to work for this case, I tried to quickly swap in:

//#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"
#include "incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H"

and calling

//singlePhaseTransportModel laminarTransport(U, phi);
twoPhaseMixture laminarTransport(U, phi);

however, it crashes with the following message:

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian



request for volScalarField alpha1 from objectRegistry region0 failed
available objects of type volScalarField are

3
(
nu2
nu1
yPlus
)

Can anyone point me in the right direction, I would like the tool to ultimately give me the yPlus values for each phase just like it does for a single phase based on the initial definition of gamma.

jcriner October 23, 2008 14:23

Dennis, The source of your
 
Dennis,

The source of your error is likely the lack of the gamma field (i.e. you need to read in the gamma field and create the twoPhaseMixture properties for mu() and nu()). Have a look at

src/turbulenceModels/RAS/incompressible/RASModel/RASModel.C
src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture .C

to see what is going on. Then you could follow the source in createFields.H of rasInterFoam for how to create (read in) the gamma field and create the twoPhaseMixture properties.

James

dkingsley October 23, 2008 20:32

James, Thanks for the advic
 
James,

Thanks for the advice, I have it working now.

Dennis

dkingsley October 23, 2008 22:25

Next question, I would like to
 
Next question, I would like to override the RASModel::YPlus method in the SpalartAllmaras class to add the alternative yPlus formulation that I found in this older post http://www.cfd-online.com/cgi-bin/Op...c=1&post=18488.

Is this a reasonable approach? Is there a more suitable formulation?

tmp<scalarfield> tYp =
sqrt(mag(turbulence->nuEff()().boundaryField()[patchI]*
U.boundaryField()[patchI].snGrad()))/
nu.value()*nearWallDist(mesh).y()[patchI];

scalarField& Yp = tYp();

idrama April 28, 2010 09:08

Hello dkingsley,

I read your post! I just want to know what have you change in yPlusRAS.C, i.e. have you only made that change:

//singlePhaseTransportModel laminarTransport(U, phi);
twoPhaseMixture laminarTransport(U, phi);

or have you done a couple of things more?

Cheers


All times are GMT -4. The time now is 06:11.