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

sonicFoam for turbulent flow at M=3

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 1 Post By achyutan
  • 1 Post By fportela

Reply
 
LinkBack Thread Tools Display Modes
Old   June 4, 2013, 04:20
Default sonicFoam for turbulent flow at M=3
  #1
Member
 
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 64
Rep Power: 5
fportela is on a distinguished road
Hello all,

I have been trying to get a solution for a supersonic turbulent channel flow.

I managed to get sonicFoam working for a Mach number (based on wall temperature) of about 1.5 - t1.png. To achieve this I simply add a momentum source term to the UEqn and eEqn.

When I try to get to M ~ 3 - t2.png - the simulation crashes during laminar-turbulent transition with the following message:

Code:
[15] --> FOAM FATAL ERROR:
[15] Maximum number of iterations exceeded
[15]
[15]     From function specieThermo<Thermo>::T(scalar f, scalar T0, scalar (specieThermo<Thermo>::*F)(const scalar) const, scalar (specieThermo<Thermo>::*dFdT)(const scalar) const) const
I am not sure what can be going on, so if you need more information to help me sort this out, just let me know!

Cheers,
Felipe
Attached Images
File Type: jpg t1.jpg (17.9 KB, 18 views)
File Type: jpg t2.jpg (17.7 KB, 18 views)
fportela is offline   Reply With Quote

Old   June 4, 2013, 06:58
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19
immortality is on a distinguished road
hi
I didn't get what you mean exactly.
I thought sonicFoam is suitable for all Mach numbers!really its not good for supersonic flows?
If its so why you don't use rhoCentralFoam?i think its certaily appropriate for all regimes of flows.
__________________
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   June 4, 2013, 07:14
Default
  #3
Member
 
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 64
Rep Power: 5
fportela is on a distinguished road
Quote:
Originally Posted by immortality View Post
hi
I didn't get what you mean exactly.
I thought sonicFoam is suitable for all Mach numbers!really its not good for supersonic flows?
If its so why you don't use rhoCentralFoam?i think its certaily appropriate for all regimes of flows.
Hi there,

I didn't say sonicFoam doesn't work for supersonic flows, just that I can't manage to get my test case working.

I am aware my original post was a bit vague, but the problem is I don't know where the bug is hiding, though I would expect this to be an issue with the way I set up the case, rather than the solver itself!

I'll give it a go with rhoCentralFoam and see if it helps. Though I'm still curious about why this doesn't work...

UPDATE:

Hi again,

So I took the last time step from the crashed case and let it run with rhoCentralFoam (no momentum source now) and it still crashes (same error message) after some iterations.
fportela is offline   Reply With Quote

Old   June 4, 2013, 08:30
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,209
Rep Power: 19
immortality is on a distinguished road
Hi
what are your BC's?
could you attach them here?
and why you want to add a source term?and it should be frmo Mach type?
could you attach your modified solver?
__________________
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.

Last edited by immortality; June 4, 2013 at 09:51.
immortality is offline   Reply With Quote

Old   June 4, 2013, 08:44
Default
  #5
Member
 
Join Date: Sep 2012
Posts: 60
Rep Power: 6
achyutan is on a distinguished road
Hi felipe,

To know exactly what is going wrong, try to debug using gdb.
As it is, sonicFoam appears suitable for supersonic flows. I have been successful simulating mach 3 flow (laminar).

regards,
fportela likes this.
achyutan is offline   Reply With Quote

Old   June 4, 2013, 10:56
Default
  #6
Member
 
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 64
Rep Power: 5
fportela is on a distinguished road
Quote:
Originally Posted by immortality View Post
Hi
what are your BC's?
could you attach them here?
and why you want to add a source term?and it should be frmo Mach type?
could you attach your modified solver?

Hi,

I have periodic BC's in the stream- and spanwise directions. Upper and lower walls have no-slip (U = 0), constant temperature (T = 300) and zero gradient on pressure.

I have the source term to sustain the flow, otherwise it would just "fade" to rest...

Quote:
Originally Posted by achyutan View Post
Hi felipe,

To know exactly what is going wrong, try to debug using gdb.
As it is, sonicFoam appears suitable for supersonic flows. I have been successful simulating mach 3 flow (laminar).

regards,
I will try that thanks!

Yes, I wouldn't expect it to be a problem with the solver. I'll let you know if I find what's wrong!
fportela is offline   Reply With Quote

Old   June 7, 2013, 03:46
Default
  #7
Member
 
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 64
Rep Power: 5
fportela is on a distinguished road
Hi again,

I changed the scheme I was using for div(phid,p) from Gauss linear to vanLeer.

The simulation now seems to be more stable, however my temperature is reaching extremely low values.

I noticed in the tutorials that Gauss limitedLinear 1 is used to discretise this term, shouldn't this affect only the solution for pressure?


Quote:
Originally Posted by immortality View Post
Hi
could you attach your modified solver?
I sent you a message with the necessary changes
fportela is offline   Reply With Quote

Old   June 10, 2013, 10:48
Default
  #8
Member
 
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 64
Rep Power: 5
fportela is on a distinguished road
Hi,

So, I tried the Ma ~ 2 test case with rhoCentralFoam. The result is quite different from that of sonicFoam: I get a bunch of shocks that just reflect from one wall to the other - see attached snapshot.

Any ideas? What are the main differences from sonicFoam to rhoCentralFoam that could give such different solutions?!

From what I've read on this types of flows, I would not expect such shocks to develop...
Attached Images
File Type: jpg rho.jpg (19.2 KB, 27 views)
immortality likes this.

Last edited by fportela; June 10, 2013 at 18:10.
fportela is offline   Reply With Quote

Old   July 12, 2013, 10:19
Default something missing in the energy equation
  #9
Member
 
Felipe Portela
Join Date: Dec 2012
Location: London
Posts: 64
Rep Power: 5
fportela is on a distinguished road
Hi,

In case someone gets a similar issue, just wanted to give the heads up that the viscous term is missing in the energy equation of sonicFoam, in my case this was causing the crash with the temperature decreasing - isothermal wall was extracting energy from the flow, but now heat was produced due to friction

Also, I believe the term

Code:
p*fvc::div(phi/fvc::interpolate(rho))
should be

Code:
fvc::div(phi/fvc::interpolate(rho), p)
fportela is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stability Problem with sonicFoam for Nozzle Flow Julian K. OpenFOAM 3 July 11, 2016 08:14
mass flow inlet and pressure outlet with target mass flow rate Zigainer FLUENT 10 January 5, 2013 22:51
transient, impregnating flow problem fgommer FLUENT 0 February 29, 2012 17:10
Flow meter Design CD adapco Group Marketing CD-adapco 3 June 21, 2011 08:33
potential flow vs. Euler flow curious ... Main CFD Forum 23 July 21, 2006 07:40


All times are GMT -4. The time now is 16:52.