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

A turbulent test case for rhoCentralFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By immortality
  • 2 Post By Traib
  • 1 Post By Traib
  • 1 Post By Traib
  • 3 Post By maHein
  • 1 Post By sathya123

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 2, 2012, 18:38
Default A turbulent test case for rhoCentralFoam
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
can anyone send me the pdf file that creators of rhoCentralFoam have provided?
do you know a turbulent test case of this solver?
sathya123 likes this.
immortality is offline   Reply With Quote

Old   December 3, 2012, 02:58
Default
  #2
New Member
 
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 14
Traib is on a distinguished road
Hi,

I too was looking for turbulent test cases for various density-based solvers. I have tried creating the cases myself by modifying the cases like forwardStep and wedge15Ma5- they seem to work just fine, except for one problem with rhoCentralFoam that the standard k-e didn't work in some cases but RNG k-e worked for all. I had only recently read a paper about the comparison between realizable and RNG k-e models and they it suggested RNG k-e to be better for density based solvers and high-velocity flows. Other than that, I have been trying to learn why the case with rhoCentralFoam but I haven't found anything yet, seems very bizzare to me.

What I did was modified boundary conditions, added k, epsilon, mut, and alphat initial conditions, chose turbulence model, and made changes in fvschemes file for discretizations of turbulent terms.

The results for single-species flows seem to work well, but when I tried with multi-species equilibrium as well as non-equilibrium flows using combustion-density based solver I have been meeting lots of problems, which makes me think I could be missing something. I've studied the codes for these solvers and related functions, but can't see things that I am missing- its like searching for something without knowing what that something is...

So anyone know more about this, please help.
Traib is offline   Reply With Quote

Old   December 3, 2012, 05:21
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
hi
have you tried kOmegaSST to this solver?is this model suitable or RNG k-e is better?could you send me the article?
Im beginner in openfoam.can you send me one of your cases to me that i understand what changes i should do in fvschemes and fvsolution especially.
Thank you.
immortality is offline   Reply With Quote

Old   December 3, 2012, 07:21
Default
  #4
New Member
 
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 14
Traib is on a distinguished road
Hi,

I am new to OPenFOAM too so I am afraid my answers might not be completely helpful to you.

I haven't worked with k-omega in OpenFOAM, but its not very different from k-e while setting up. Basically, the only difference is the parameters in the turbulence equations which are by default given with the model, while in your case you can modify using omega instead of epsilon.

About setting up a case, see the below for fvschemes and fvsolution. I had once checked discretizations required for several solvers and these are from those cases. However I should mention that I did waste some time of listing these which is quite unnecessary.

If you want to know what discretizations are required you can check the source code of the solvers and find out directly; in case you miss any the error message in the terminal window will clearly mention which discretizations are undefined.

Similarly, while setting up the case if you have missed any dictionary or initial conditions then those will also appear in their respective error messages in the terminal window. So its quite simple to figure out.

===== fvschemes dictionary for rhoCentralFoam =====

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// listed all the required discretization fields required in
// rhoCentalFoam.C along with a default (or spcific) schemes for each.
// schemes were mostly arbitrarily chosen for a turbulent viscous flow case.

fluxScheme Kurganov;

ddtSchemes
{
default Euler;
//ddt(rho) Euler;
//ddt(rhoU) Euler;
//ddt(rhoE) Euler;
//ddt(rho,U) Euler;
//ddt(rho,e) Euler;
}

gradSchemes
{
default Gauss linear;

grad(U) Gauss linear;
grad(rho) Gauss linear;
grad(rhoU) Gauss linear;
grad((1|psi)) Gauss linear;
grad(e) Gauss linear;
grad(sqrt(((Cp|Cv)*(1|psi)))) Gauss linear;
grad(c) Gauss linear;
grad(T) Gauss linear;
grad(epsilon) Gauss linear;
grad(k) Gauss linear;
}

divSchemes
{
default Gauss linear;
div(tauMC) Gauss linear;

div(phi) Gauss linear;
div(phi,epsilon) Gauss linear;
div(phi,k) Gauss linear;
div(phiEp) Gauss linaer;
div(phiUp) Gauss linear;
div(sigmaDotU) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;

laplacian(muEff,U) Gauss linear corrected;
laplacian(alphaEff,e) Gauss linear corrected;
laplacian(alpha,e) Gauss linear corrected;
laplacian(k,T) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;

}

interpolationSchemes
{
default linear;
reconstruct(rho) vanLeer;
reconstruct(U) vanLeerV;
reconstruct(T) vanLeer;

interpolate(rho) linear;
interpolate(U) linear;
interpolate(T) linear;
interpolate(e) linear;
interpolate(c) linear;
interpolate(rhoU) linear;
interpolate(rPsi) linear;
interpolate(muEff) linear;
interpolate(tauMC) linear;
}

snGradSchemes
{
default corrected;

snGrad(U) corrected;

}


// ************************************************** *********************** //
immortality and Flukato like this.
Traib is offline   Reply With Quote

Old   December 3, 2012, 07:24
Default
  #5
New Member
 
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 14
Traib is on a distinguished road
=========== example fvsolution dictionary for rhoCentralFoam======

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// example solvers

solvers
{
"(rho|rhoU|rhoE)"
{
solver diagonal;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-09;
relTol 0;
}

e
{
$U;
tolerance 1e-10;
relTol 0;
}

"(k|epsilon)"
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 2;
tolerance 1e-09;
relTol 0;
}


// ************************************************** *********************** //
immortality likes this.
Traib is offline   Reply With Quote

Old   December 3, 2012, 14:42
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
thank you dear Traib.I used them and now works.but all of density terms rho,rhoUx,rhoUy are zero.seems it doesn't solve continuity equation or anything like this.whats your nice suggestion?
thank you again.
immortality is offline   Reply With Quote

Old   December 5, 2012, 05:56
Default
  #7
New Member
 
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 14
Traib is on a distinguished road
Hi ehsan,

Sorry I do now know what you mean by "terms rho,rhoUx,rhoUy are zero"- where is this, is it in the solution you mean?

About the continuity, rhoCentraLFoam does solve for continuity, see below:

00178 // --- Solve density
00179 solve(fvm::ddt(rho) + fvc::div(phi));
00180

----taken from rhoCentralFoam.C of the solver source codes directory. You should check the source codes for these info. The momentum and inviscid equations are solved differently for inviscid and viscous cases.

About rho,rhoUx and rhoUy being zero, I am not sure what you mean but if you can explain a bit I can try to check...

Regards.
immortality likes this.
Traib is offline   Reply With Quote

Old   December 5, 2012, 06:46
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
yes I mean in the solution.rho terms are zero at all the time steps.my initial condition is zero pressure and temperature because I want a channel become full during time(from empty obviously) is my approach incorrect?
and can I use rho field in my boundary conditions to define other fields in groovyBC?
immortality is offline   Reply With Quote

Old   December 5, 2012, 07:40
Default
  #9
New Member
 
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 14
Traib is on a distinguished road
You can try giving some internalField value at first and the later solution can be initialized from the actual values you give in the inlet;
Traib is offline   Reply With Quote

Old   December 5, 2012, 08:28
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
as an instance look at this time step:

Mean and max Courant Numbers = 0.140537 0.296461
deltaT = 1.31579e-07
Time = 4.86842e-06

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for Ux, Initial residual = 1.13168e-05, Final residual = 2.04904e-17, No Iterations 3
smoothSolver: Solving for Uy, Initial residual = 0.00894171, Final residual = 1.97135e-17, No Iterations 3
diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for e, Initial residual = 1.43136e-05, Final residual = 1.55745e-10, No Iterations 201
smoothSolver: Solving for omega, Initial residual = 0.000587127, Final residual = 1.92363e-11, No Iterations 2
smoothSolver: Solving for k, Initial residual = 0.00730572, Final residual = 1.34671e-10, No Iterations 2
ExecutionTime = 38.88 s ClockTime = 58 s
immortality is offline   Reply With Quote

Old   January 9, 2014, 17:24
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi dear Traib
my work have been finished since 4 months ago,I had a look into log of the solution and encountered this question again. did you find out why rho residuals are zero while in rhoCentralFoam, density should obtain from continuity equation? only because it has been written in explicit form,right?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   March 18, 2014, 08:25
Default
  #12
New Member
 
Join Date: Sep 2012
Posts: 13
Rep Power: 15
Endel is on a distinguished road
Hi!

I'm getting the exact same error as Immortality: in the log-file all rho*-residuals and number of iterations are 0.

Do you have a solution to this yet?
Endel is offline   Reply With Quote

Old   March 18, 2014, 13:56
Default
  #13
Member
 
Join Date: Jun 2012
Posts: 76
Rep Power: 14
maHein is on a distinguished road
It is not an error. The fields rho, rhoU and rhoE are solved using an explicit time marching algorithm (1st order Euler). Therefore, no iterations are needed.

See also in the source code:

Code:
solve(fvm::ddt(rho) + fvc::div(phi));
The change of density in a cell for each time step is simply the diverence of the fluxes over the cell faces.

Regards
Endel, immortality and mcshidada like this.
maHein is offline   Reply With Quote

Old   April 20, 2014, 07:32
Default
  #14
New Member
 
Karnataka
Join Date: Feb 2014
Posts: 20
Rep Power: 12
sathya123 is on a distinguished road
Quote:
Originally Posted by immortality View Post
Hi dear Traib
my work have been finished since 4 months ago,I had a look into log of the solution and encountered this question again. did you find out why rho residuals are zero while in rhoCentralFoam, density should obtain from continuity equation? only because it has been written in explicit form,right?
Hello, my name is Sathyanarayanan, I was reading your post where you were requesting turbulent test cases in rhoCentralFoam. Were you successful in creating a test case with turbulence?
I am currently working on understanding the hypersonic flow through the inlet of a scramjet at freestream velocity of mach 4. I used a kepsilon model, but did now obtain the expected shocks at the forecowl region,
Would it be possible for you to provide me a sample tutorial with turbulence in rhoCentralFoam?
zahrarashidi likes this.
sathya123 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
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 15:53
Interfoam Droplet under shear test case adona058 OpenFOAM Running, Solving & CFD 3 May 3, 2010 19:46
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 08:21
looking for a test case, DES, Supersonic flow kaarthik Main CFD Forum 0 June 7, 2007 06:49
Combustion Test Case A.S. Main CFD Forum 1 May 31, 2005 10:22


All times are GMT -4. The time now is 04:15.