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

rhoCentralFoam not reflecting shock in Shock Tube?

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

Like Tree1Likes
  • 1 Post By Astaria

Reply
 
LinkBack Thread Tools Display Modes
Old   October 23, 2011, 17:02
Default rhoCentralFoam not reflecting shock in Shock Tube?
  #1
New Member
 
Astaria's Avatar
 
Sean
Join Date: Oct 2011
Posts: 3
Rep Power: 5
Astaria is on a distinguished road
Disclaimer: I am brand new to OpenFoam and a fairly poor Ubuntu user.

I've been playing around with OpenFoam while taking a class in compressible flow theory. I've been taking a look at the shock tube tutorials because we covered that topic in class and they seemed rather simple to set up.

When I ran the shock tube found in the sonicFoam folder, everything looked good qualitatively. A shock formed, proceeded down the tube, reflected off of the wall. An expansion wave did the same in the other direction. HOWEVER, when I looked at the velocity profile, I saw that the velocity behind the reflected shock was not zero (like our textbook says it should be). Looking into this further, I saw several posts describing sonicFoam as unreliable for subsonic flows.

So then I tried rhoCentralFoam in the rhoCentralFoam folder. I get the shock and expansion waves, but they don't reflect off of the walls at the end of the tube. It's almost as if there are no walls there?

Unfortunately I still haven't learned how to read most of the setup files. I know only enough to be dangerous and screw things up . If anyone has the patience to deal with a beginner such as myself, I would be incredibly grateful as this looks like an awesome tool, and I look forward to using it in my mischief making ways.
Astaria is offline   Reply With Quote

Old   October 24, 2011, 09:47
Default
  #2
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 178
Blog Entries: 1
Rep Power: 7
Linse is on a distinguished road
Hi Sean,

I don't know the shockTube-tutorial by heart, but sometime ago I did some simulations which reflected nicely. So I guess it really is the setup of the tutorial case. Let's analyse it for the basic conditions:

- Check the output of your blockMesh: Does it tell anything about undefined patches being added to an "empty" patch? If these are your tube-ends among these undefined patches? If yes, go to the next step.
- Look into the constant/polyMesh/blockMeshDict: Are the ends contained in a patch that is called walls or something similar? If this is not the case, try to find the definitions of these patches within the blockMeshDict and add them to the walls-patch that is there.
- If the endings are contained in the walls-patch, check the files in the 0-folder. See if they are described with a wall-condition or if they are something like inlet, outlet, zeroGradient,...

I guess, these should be the steps that most probably cause the problem - and moreover are correctable even without too nerdy knowledge about the intestines of OpenFOAM. ;-)

Let us know if it works or where the problems are situated!

PS: If there is a correct way to start OpenFOAM, I guess you chose one of them! ;-)
Linse is offline   Reply With Quote

Old   October 27, 2011, 01:12
Default
  #3
New Member
 
Astaria's Avatar
 
Sean
Join Date: Oct 2011
Posts: 3
Rep Power: 5
Astaria is on a distinguished road
Well I've checked the blockMeshDict files in both of the shock tube cases...nothing different that I can tell. Since I've last posted, I tried moving ALL of the sonicFoam files into the rhoCentralFoam/shockTube folder...with the result that I've now destroyed my rhoCentral/shockTube case . I'll try to rebuild it from another case, but so far things aren't looking good for my shock tube.
Astaria is offline   Reply With Quote

Old   October 27, 2011, 04:21
Default
  #4
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Magdeburg/Geneva
Posts: 178
Blog Entries: 1
Rep Power: 7
Linse is on a distinguished road
Well, there should be a shocktube-case in the tutorials for rhoCentralFoam. Unfortunately it did not work out of the box the last time I tried, but surely it is a good starting point...

But how strong was the shock? Are the reflections strong enough to be seen via the used postprocessing?
How about trying a stronger shock?

In case problems stay, maybe you could post your basic case within a .tar.gz-archive here? Then people here could check for problems as well.

Don't forget to remove all but the blockMeshDict from constant/polyMesh before uploading it. The other files are big but easily produced by a simple blockMesh-run.
(As you are new to linux: "tar czf newfilename.tar.gz file-to-be-compressed" is the command for getting the socalled tarball, which you can attach via the attachment-menu in this forum.)
Linse is offline   Reply With Quote

Old   March 3, 2012, 22:13
Default Solved!
  #5
New Member
 
Astaria's Avatar
 
Sean
Join Date: Oct 2011
Posts: 3
Rep Power: 5
Astaria is on a distinguished road
Ok,

I solved my problem and I'm resurrecting this thread so others can fix their tutorials as well.

The problem lies in the velocity boundary conditions at the walls. The shocktube tutorials for both sonicFoam and rhoCentralFoam have zeroGradient as the velocity (U) boundary condition at the walls.

THIS IS WRONG!

The boundary condition should be set to fixedValue with the value being "uniform (0 0 0)"

The boundary condition for magU needs to be set the same as U (uniform 0, since it's a scalar)

Making these changes should result in a shocktube result that looks closer to the analytical solutions. I've only looked at the results qualitatively.

Regards,
Astaria
Alexee likes this.
Astaria is offline   Reply With Quote

Old   March 4, 2012, 04:07
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
There is no error in the tutorial, which is a case of Sod's shock tube, in which there are no walls.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Reply

Tags
openfoam 2.0.1, reflection, rhocentralfoam, shock tube

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
Shock tube simulation harish FLUENT 5 January 25, 2014 03:20
HLL Riemann Shock Tube Matlab Problem Luke F Main CFD Forum 1 July 7, 2009 13:44
shock tube validation AB Main CFD Forum 3 December 10, 2004 08:31
shock tube validation AB CD-adapco 0 November 21, 2004 19:43
Shock tube problem AB CD-adapco 1 November 9, 2004 01:25


All times are GMT -4. The time now is 10:56.