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

solver for subsonic compressible turbulent flow in OF 1.7

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2010, 15:35
Default solver for subsonic compressible turbulent flow in OF 1.7
  #1
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hi all,

I want to solve a susonic, turbulent compressible flow in OF 1.7. Which solver should i use??? Please help..its argent
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 20, 2010, 03:13
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Depending upon the case (steady/unsteady), take a look at:

  • rhoSimpleFoam (steady)
  • rhoPisoFoam / rhoPimpleFoam (unsteady / pseudo-transient)
Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 20, 2010, 04:17
Default
  #3
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Thank you Alberto for the reply.

My doubt it can i use these solvers for the flow which has Mach numbers upto 1..??? Are the pressure based solvers able to handle higher subsonic mach numbers???
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 20, 2010, 04:24
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You asked about subsonic flows. Not highly supersonic. :-)

There are other solvers able to do that (see rhoCentralFoam and the various "sonic" solvers).

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 20, 2010, 09:01
Default
  #5
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
With all due respect Sir, i said "highly subsonic" means mach number arnd 0.8 or 0.9. Sorry if my statement was ambiguous.

Thanks for your quick replies. One more question, my friend suggested me that "rhoturbFoam" is the best choice for my problem but its not there in OF 1.7.. So what is the difference between "rhoturbForm" and say "rhosonicForm"??
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 20, 2010, 11:31
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by nileshjrane View Post
With all due respect Sir, i said "highly subsonic" means mach number arnd 0.8 or 0.9. Sorry if my statement was ambiguous.
I'm really sorry: I misread. Result of answering late in the evening ;-)

Quote:
Thanks for your quick replies. One more question, my friend suggested me that "rhoTurbFoam" is the best choice for my problem but its not there in OF 1.7.. So what is the difference between "rhoturbForm" and say "rhosonicForm"??
rhoTurbFoam was a RANS solver in OpenFOAM 1.5, and was merged in rhoPisoFoam in OpenFOAM 1.6 and 1.7, with RANS and LES capabilities.

rhoSonicFoam is a density-based inviscid solver.

About your original question, yes, in theory pressure-based solver should work with those values of Mach number (See for example Peric's papers and book on the topic).

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 20, 2010, 15:20
Default
  #7
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Thank you very much Sir.

Your lucid answer really helped me a lot. This lack of documentation thing really makes it a difficult task for a newbie like me to get going with OF.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 20, 2010, 16:04
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
You are welcome. If you need further help, please don't hesitate to ask. The forum is a often a quick way to get answers.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 22, 2010, 08:58
Default
  #9
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello Alberto Sir,

As you have suggested, i am using rhopisoFoam for my problem.

Brief description of my problem:

Its cold flow simulation of mixing in a secondary combustor of a rocket motor. In this air and fuel streams are getting mixed together. I am planning to use RNGkepsilon model for this using rhoPisoFoam.

BCs:

Air inlet: Mach 0.3, stgT = 840K, staticT = 825K, Vin = 172m/s, massflow = 5.19kg/s, k and eps can be calculated using formulae

Fuel Inlet : Mach = 1, staticT = 650 >>Vin 244m/s, massflow = 0.2581kg/s, k and eps can be calculated using formulae

Wall: Adiabetic

Outlet: there is a chocked nozzle at the end of combustor which i am not simulating, but from chocked condition the pressure at the inlet of nozzle can be calculated as 7.2 bar.


I saw the tut for rhoPisoFoam. It uses SST kw model..but the "0" directory contains files for alphat, p, t, u, k, eps, omega, R. I got why we need u,p,t,k,omega. but why other files are present? I know what eps is, alphat is probably diffusivity but i dont know what is R.

Also i am confused that, out of the known BC parameters which should be specified???
Also i found out some of the BCs as:

Code:
   
 movingWall
    {
        type            compressible::kqRWallFunction;
        value           uniform 0.00325;
    }
what are these types??


Can you give me any direction???
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 22, 2010, 15:10
Default
  #10
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by nileshjrane View Post
Hello Alberto Sir,


Just Alberto

Quote:
I saw the tut for rhoPisoFoam. It uses SST kw model..but the "0" directory contains files for alphat, p, t, u, k, eps, omega, R. I got why we need u,p,t,k,omega. but why other files are present? I know what eps is, alphat is probably diffusivity but i dont know what is R.
R is the Reynolds stress tensor.

alphat is the turbulent thermal diffusivity, and it is used essentially in wall-functions.

Quote:
Also i found out some of the BCs as:

Code:
   
 movingWall
    {
        type            compressible::kqRWallFunction;
        value           uniform 0.00325;
    }
what are these types??

Can you give me any direction???
The 'type' keyword specifies the type of the BC you are setting. You find a summary in section 5.2 of the user guide, while wall functions are briefly discussed in section 7.2.2.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 22, 2010, 16:05
Default
  #11
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Alberto,

Thanks for the reply.

What i am confused about is, do i really need to specify the values for omega, mut, alphat and R??? if yes how should i obtain them based on the BCs i have???

I know the formula for calculating omega. but not for the others...

A thought:

Is it like, the variables we need to depend are based on the turbulence model we use?? like for k-eps we need k, eps...for k-w we need k and omega, for RSM mode we would need k, and R..and alphat in case of heat transfer is needed to be calculated????
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 22, 2010, 16:16
Default
  #12
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by nileshjrane View Post
What i am confused about is, do i really need to specify the values for omega, mut, alphat and R??? if yes how should i obtain them based on the BCs i have???
You said you want to use the RNG k-epsilon model, as a consequence omega and R are not required. You need omega if you use for example k-omega, and you need R if you use Reynolds stress models.

You should have mut and alphat, which are specified using wall-functions at walls, and are calculated elsewhere. Take a look at this tutorial

/OpenFOAM-1.7.x/tutorials/compressible/rhoPimpleFoam/angledDuct/0/

It is for rhoPimpleFoam, however the only difference is in the iterative procedure. There you can see how alphat and mut are set up.

Quote:
Is it like, the variables we need to depend are based on the turbulence model we use?? like for k-eps we need k, eps...for k-w we need k and omega, for RSM mode we would need k, and R..and alphat in case of heat transfer is needed to be calculated????
Correct. However the energy equation is always solved in compressible codes, as consequence you need alphat :-)

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 22, 2010, 16:40
Default
  #13
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Thanks..that makes the things more clear now.

Actually i have worked on a k-eps research code for long time, and there such parameters as alpha or mut would be calculated internally, so i never had to specify them externally. So it didnt occur to me quickly..

But thank you very much for the quick replies.

I have one more doubt if i may trouble some more..

I need to have info on mixing, which means air/fuel mixture fraction distribution which obviously not gonna be there in rhoPisoFoam. So how to get this data?? One approach i could think of is to define a scaler which will have value 1 for fuel and 0 for air and thus can give the mixture fraction straightaway. But i think i will need to solve transport equation for that. Is there any better way?? If not how to do this scalar thing???
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 22, 2010, 16:45
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by nileshjrane View Post
Thanks..that makes the things more clear now.

Actually i have worked on a k-eps research code for long time, and there such parameters as alpha or mut would be calculated internally, so i never had to specify them externally. So it didnt occur to me quickly..
They are still calculated internally, but you can choose how in OpenFOAM ;-)


Quote:
I need to have info on mixing, which means air/fuel mixture fraction distribution which obviously not gonna be there in rhoPisoFoam. So how to get this data?? One approach i could think of is to define a scaler which will have value 1 for fuel and 0 for air and thus can give the mixture fraction straightaway. But i think i will need to solve transport equation for that. Is there any better way?? If not how to do this scalar thing???
Depending on you needs you can add the scalar transport equation, or use one of the solvers which include species transport (reacting/diesel solvers), which are more flexible and can use chemical databases (chemkin).

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 22, 2010, 16:59
Default
  #15
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Quote:
Depending on you needs you can add the scalar transport equation, or use one of the solvers which include species transport (reacting/diesel solvers), which are more flexible and can use chemical databases (chemkin).
Thanks, that would be all for now. i am setting up case for rhopisoFoam now.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 24, 2010, 07:47
Default
  #16
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello Alberto,

I am facing this error for rhoPisoFoam. Do you know what it means???

Quote:
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam170/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::hPsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::calculate() in "/opt/openfoam170/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#4 Foam::hPsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > >::hPsiThermo(Foam::fvMesh const&) in "/opt/openfoam170/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#5 Foam::basicPsiThermo::addfvMeshConstructorToTable< Foam::hPsiThermo<Foam:ureMixture<Foam::constTran sport<Foam::specieThermo<Foam::hConstThermo<Foam:: perfectGas> > > > > >::New(Foam::fvMesh const&) in "/opt/openfoam170/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#6 Foam::basicPsiThermo::New(Foam::fvMesh const&) in "/opt/openfoam170/lib/linux64GccDPOpt/libbasicThermophysicalModels.so"
#7
in "/opt/openfoam170/applications/bin/linux64GccDPOpt/rhoPisoFoam"
#8 __libc_start_main in "/lib/libc.so.6"
#9
in "/opt/openfoam170/applications/bin/linux64GccDPOpt/rhoPisoFoam"
Floating point exception

Thank you.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 24, 2010, 11:08
Default
  #17
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by nileshjrane View Post
Hello Alberto,

I am facing this error for rhoPisoFoam. Do you know what it means???
Let me grab my crystal ball

It means that there is some problem in your setup. Compare with a tutorial case, and start changing it step by step to adapt it to your case.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   August 31, 2010, 06:43
Default
  #18
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hi,

I somehow managed to make the solver run. But now i am facing one more problem.

The Co number keeps increasing to large numbers. I cannot make the mesh more coarser and the Co problem makes the time step so small that the simulation will take thousand years to complete.. (Thank god i have i7 processor)

Now i am using the default solver settings of rhoPisoFoam from the tut of OF1.7. I want to know how can i tackle this Co problem without changing mesh and timestep, but modifying say relaxation factors and scheme only??? For this which scheme can be better or which UR factors can be good. (This is part of experience which i dont have much. so asking here).

Any suggestions???

PFA my case files.
Attached Files
File Type: zip rhoPisoFoam_engrid.zip (9.0 KB, 22 views)
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   August 31, 2010, 07:55
Default
  #19
Senior Member
 
Christian Lucas
Join Date: Aug 2009
Location: Braunschweig, Germany
Posts: 202
Rep Power: 18
Chris Lucas is on a distinguished road
Hi,

set "adjustTimeStep" to yes and perhaps start with smaller delta T

Regards,
Christian
Chris Lucas is offline   Reply With Quote

Old   August 31, 2010, 08:06
Default
  #20
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hi chris,

I have tried that. It does not help.

My friend just told me that rhoPisoFoam does not solve 'rho' equation and thats why probably is problematic. He suggested me to use 'rhoSonicFoam' and see what happens.

Also i read somewhere on forum that rhopimpleFoam is stable for Co>1 as well. is that right?? Does that mean its an implicit solver???

BTW i have one more doubt, how would i know which solver is implicit and which is explicit?? Where to look for this ans and what to look for??

Thank you for the replies..



__________________
Imagination is more important than knowledge..
nileshjrane 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
CFX Treatment of Laminar and Turbulent Flows Jade M CFX 18 September 15, 2022 08:08
Compressible turbulent flow FVS Main CFD Forum 1 June 14, 2017 12:45
Compressible turbulent multicomponent nonreacting flow rbw OpenFOAM Running, Solving & CFD 2 March 23, 2016 22:22
compressible flow calculation error using rhoSimpleFoam solver student4326 OpenFOAM Running, Solving & CFD 7 November 2, 2015 12:34
compressible two phase flow in CFX4.4 youngan CFX 0 July 2, 2003 00:32


All times are GMT -4. The time now is 07:24.