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

limitation of k and epsilon

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2010, 01:20
Default limitation of k and epsilon
  #1
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 15
mrshb4 is on a distinguished road
Dear Foamers
I'm modeling a centrifugal fan with MRFSimpleFoam and kEpsilon model, and I want to limit k and epsilon between 1e-10 and 30. How can I do that. I read userGuide and so I managed below fvSchemes dictionary, but it didn't work. How can I do that?!
Anybody knows?!!!!

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default cellLimited Gauss linear 1;
grad(p) cellLimited Gauss linear 1;
grad(U) cellLimited Gauss linear 1;
//grad(k) Gauss limitedVanLeer phi 1e-10 30;
//grad(epsilon) Gauss limitedVanLeer phi 1e-10 30;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV cellMDLimited Gauss linear 1;
//div(phi,k) Gauss upwind phi;
div(phi,k) Gauss limitedVanLeer 1e-10 30;
//div(phi,k) Gauss linearUpwind cellLimited Gauss linear 1;
//div(phi,epsilon) Gauss upwind phi;
div(phi,epsilon) Gauss limitedVanLeer 1e-10 30;
//div(phi,epsilon) Gauss linearUpwind cellLimited Gauss linear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss upwind phi limited 1;
laplacian((1|A(U)),p) Gauss upwind phi limited 1;
laplacian(DkEff,k) Gauss limitedVanLeer phi 1e-10 30 limited 1;
laplacian(DepsilonEff,epsilon) Gauss limitedVanLeer phi 1e-10 30 limited 1;
}

interpolationSchemes
{
default upwind phi;
interpolate(epsilon) limitedLinear 1e-10 30;
interpolate(k) limitedLinear 1e-10 30;
}

snGradSchemes
{
default bounded;
}

fluxRequired
{
default no;
p ;
}
// ************************************************** *********************** //

Best regards
Mohammadreza
mrshb4 is offline   Reply With Quote

Old   November 7, 2010, 07:28
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
i dont know any way from Dic u can limit ur k or e
but in source code you can add something like that:
k =min(max(k,scalar(0)),scalar(30))
nimasam is offline   Reply With Quote

Old   November 7, 2010, 07:58
Default min-max
  #3
Member
 
Mohammad.R.Shetab
Join Date: Jul 2010
Posts: 49
Rep Power: 15
mrshb4 is on a distinguished road
Dear Nima
Thank you for your reply.
I will test it. The only question here is I should write for term k like this?

k=max(k,scalar(0));
k=min(k,scalar(30));

or like what you wrote:

k=min(max(k,scalar(0),scalar(30)))

they have the same meaning or not?!!!

Thank you again
Mohammadreza
mrshb4 is offline   Reply With Quote

Old   November 7, 2010, 10:00
Default
  #4
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
they have the same meaning just its somehow more beautiful expression and
if you dont like to change the main variable you can define new variable for example kLimited
then :

volScalarField kLimited = min(max(k,scalar(0)),scalar(30))

then use this limited version in ur calculation
nimasam 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
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 16 March 4, 2017 08:30
Compressible epsilon blows up swahono OpenFOAM 10 November 26, 2010 05:38
MRFSimpleFOAM goes divergenced! renyun0511 OpenFOAM Running, Solving & CFD 0 November 19, 2009 02:11
SimpleFoam k and epsilon bounded nedved OpenFOAM Running, Solving & CFD 1 November 25, 2008 20:21
Epsilon Convergence Trouble Carlos FLUENT 4 August 27, 2007 11:22


All times are GMT -4. The time now is 19:59.