
[Sponsors] 
December 2, 2012, 18:38 
A turbulent test case for rhoCentralFoam

#1 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
can anyone send me the pdf file that creators of rhoCentralFoam have provided?
do you know a turbulent test case of this solver? 

December 3, 2012, 02:58 

#2 
New Member
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 6 
Hi,
I too was looking for turbulent test cases for various densitybased 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 ke didn't work in some cases but RNG ke worked for all. I had only recently read a paper about the comparison between realizable and RNG ke models and they it suggested RNG ke to be better for density based solvers and highvelocity 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 singlespecies flows seem to work well, but when I tried with multispecies equilibrium as well as nonequilibrium flows using combustiondensity 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. 

December 3, 2012, 05:21 

#3 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
hi
have you tried kOmegaSST to this solver?is this model suitable or RNG ke 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. 

December 3, 2012, 07:21 

#4 
New Member
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 6 
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 komega in OpenFOAM, but its not very different from ke 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((1psi)) Gauss linear; grad(e) Gauss linear; grad(sqrt(((CpCv)*(1psi)))) 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; } // ************************************************** *********************** // 

December 3, 2012, 07:24 

#5 
New Member
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 6 
=========== 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 { "(rhorhoUrhoE)" { solver diagonal; } U { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e09; relTol 0; } e { $U; tolerance 1e10; relTol 0; } "(kepsilon)" { solver smoothSolver; smoother GaussSeidel; nSweeps 2; tolerance 1e09; relTol 0; } // ************************************************** *********************** // 

December 3, 2012, 14:42 

#6 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
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. 

December 5, 2012, 05:56 

#7 
New Member
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 6 
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. 

December 5, 2012, 06:46 

#8 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
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? 

December 5, 2012, 07:40 

#9 
New Member
Traib
Join Date: Sep 2012
Posts: 27
Rep Power: 6 
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;


December 5, 2012, 08:28 

#10 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
as an instance look at this time step:
Mean and max Courant Numbers = 0.140537 0.296461 deltaT = 1.31579e07 Time = 4.86842e06 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.13168e05, Final residual = 2.04904e17, No Iterations 3 smoothSolver: Solving for Uy, Initial residual = 0.00894171, Final residual = 1.97135e17, No Iterations 3 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for e, Initial residual = 1.43136e05, Final residual = 1.55745e10, No Iterations 201 smoothSolver: Solving for omega, Initial residual = 0.000587127, Final residual = 1.92363e11, No Iterations 2 smoothSolver: Solving for k, Initial residual = 0.00730572, Final residual = 1.34671e10, No Iterations 2 ExecutionTime = 38.88 s ClockTime = 58 s 

January 9, 2014, 17:24 

#11 
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19 
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. 

March 18, 2014, 08:25 

#12 
New Member
Join Date: Sep 2012
Posts: 13
Rep Power: 7 
Hi!
I'm getting the exact same error as Immortality: in the logfile all rho*residuals and number of iterations are 0. Do you have a solution to this yet? 

March 18, 2014, 13:56 

#13 
Member
Join Date: Jun 2012
Posts: 73
Rep Power: 6 
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)); Regards 

April 20, 2014, 06:32 

#14  
New Member
Karnataka
Join Date: Feb 2014
Posts: 20
Rep Power: 5 
Quote:
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? 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Is Playstation 3 cluster suitable for CFD work  hsieh  OpenFOAM  9  August 16, 2015 14:53 
Interfoam Droplet under shear test case  adona058  OpenFOAM Running, Solving & CFD  3  May 3, 2010 18: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 05:49 
Combustion Test Case  A.S.  Main CFD Forum  1  May 31, 2005 09:22 