CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Shock tube simulation in Fluent

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

Like Tree4Likes
  • 4 Post By moein_joon27

Reply
 
LinkBack Thread Tools Display Modes
Old   March 4, 2010, 01:55
Red face Shock tube simulation in Fluent
  #1
New Member
 
SV
Join Date: Mar 2010
Location: malaysia
Posts: 2
Rep Power: 0
Vinoo_P is on a distinguished road
Hi everyone i want to run a shock tube simulation case to verify if the data can match experimental data from our lab. What boundary condition do i assign to the diaphragm of the shock tube in Fluent? Ive tried interior, symmetry and internal but they dont work. Please help. Thx.
Vinoo_P is offline   Reply With Quote

Old   March 4, 2010, 11:27
Default
  #2
agd
Senior Member
 
Join Date: Jul 2009
Posts: 191
Rep Power: 8
agd is on a distinguished road
Don't use a BC - set the initial distributions of density, temperature, and pressure as if the diaphragm is there (i.e. step in pressure and density with constant temp across the diaphragm is the normal setup). Then let the simulation run. You are simulating the situation where the diaphragm is instantly removed from the system, so no BC for the diaphragm.
agd is offline   Reply With Quote

Old   March 5, 2010, 04:32
Default
  #3
New Member
 
SV
Join Date: Mar 2010
Location: malaysia
Posts: 2
Rep Power: 0
Vinoo_P is on a distinguished road
Ok I will try that right away
Vinoo_P is offline   Reply With Quote

Old   March 5, 2010, 06:12
Default shock tube
  #4
Member
 
ali
Join Date: May 2009
Posts: 58
Rep Power: 8
alikami is on a distinguished road
can u mail me ur case file....a1k1s1@yahoo.com
thanks
regards
alikami is offline   Reply With Quote

Old   March 8, 2010, 15:23
Post Same issue
  #5
New Member
 
Vivek Chhabra
Join Date: Mar 2010
Posts: 3
Rep Power: 7
vchhabra18 is on a distinguished road
Hi everyone here,

I just this post after searching for the same question for such a long. Even I am doing an MSc project on a shock tube and not too sure how to go about the diaphragm.

'agd' Your suggestion sounds very promising but to be honest, I am not too clever in fluent so would you mind just expalining the same thing a little more. It'll be of great help if you can please.

And Vinoo if you understood what agd was explaining and you tried that method too, than again it'll be very helpful if you could send me your case file to have a better idea.

Many thanks in advance

I will be waiting for the replies
Best Regards
vchhabra18 is offline   Reply With Quote

Old   March 8, 2010, 21:35
Default
  #6
agd
Senior Member
 
Join Date: Jul 2009
Posts: 191
Rep Power: 8
agd is on a distinguished road
Let your tube be length L. From 0 to L/2 initialize your field as (p1,T1,rho1,u1=0). From L/2 to L, initialize the field as (p2,T2,rho2,u2=0). Run simulation for some time length, post-process results.
agd is offline   Reply With Quote

Old   March 8, 2010, 22:00
Post Thanks
  #7
New Member
 
Vivek Chhabra
Join Date: Mar 2010
Posts: 3
Rep Power: 7
vchhabra18 is on a distinguished road
Thanks a lot AGD for your prompt reply. I guess I know what you mean now. I will try this out tmrw or day after and will get back if any more issues will come up.

I hope you would not mind helping me out than as well.

Many thanks once again
Best Regards
Vivek Chhabra
vchhabra18 is offline   Reply With Quote

Old   November 27, 2011, 07:54
Default shock tube modelling using ansys design modeller, ansys meshing and ansys fluent
  #8
New Member
 
Praveen
Join Date: Nov 2011
Posts: 3
Rep Power: 5
praveen2008 is on a distinguished road
Hi,

can anyone tell me if i could model a shock tube simulation using ansys design modeller, ansys meshing and ansys fluent??? and if someone could send me a case file to praveen2008@gmail.com just to get a glimpse of the problem as I am new to ansys. It would be a great help if someone could help with how to define the diaphram and how to give the boundary conditions.

Please Help

Thankyou
praveen2008 is offline   Reply With Quote

Old   February 18, 2012, 09:51
Default shock tube
  #9
New Member
 
kaka
Join Date: Feb 2011
Posts: 11
Rep Power: 6
esikhatar is on a distinguished road
Dear agd,
How we can do this initialize in the Fluent?
I cann't do that! :-(
Can you please send me a case file?
Thanks
zztnshn_2@yahoo.com

Quote:
Originally Posted by agd View Post
Let your tube be length L. From 0 to L/2 initialize your field as (p1,T1,rho1,u1=0). From L/2 to L, initialize the field as (p2,T2,rho2,u2=0). Run simulation for some time length, post-process results.
esikhatar is offline   Reply With Quote

Old   February 19, 2012, 19:33
Default
  #10
agd
Senior Member
 
Join Date: Jul 2009
Posts: 191
Rep Power: 8
agd is on a distinguished road
I'm sorry, but I do not use Fluent. Perhaps someone else can supply the case file you are looking for.
agd is offline   Reply With Quote

Old   June 15, 2014, 15:56
Default initialization of separate cells with different values in fluent
  #11
New Member
 
m p
Join Date: Nov 2010
Posts: 15
Rep Power: 6
moein_joon27 is on a distinguished road
Hi Everyone

Here's my solution to your problem in initializing fluent with separate values and simulating a shock tube. I have tested it, I have got the results and I am sure it works properly.
you need a very simple grid which should be like a 2D rectangle. you don't need to separate it or create 2 zones. A simple 1-zone grid will work just fine. we will try to initialize that zone with different values.

suppose the problem says the parameters ( as an example ) are as the case in Hirsch's book:

length of tube=10 m.
width of tube is not important ( because the problem is actually one dimensional when considered inviscid ) i.e. give the width as you wish!


Left:
Pressure=100,000
density=1.
velocity = 0

Right:
Pressure=10,000
density=0.125
velocity = 0

you should introduce the UDF mentioned below to fluent. Save it to a text file:


#include "udf.h"

DEFINE_INIT(moein_shock_tube_init,d)
{
cell_t c;
Thread *t;
real xc[ND_ND];

/* loop over all cell threads in the domain */
thread_loop_c(t,d)
{

/* loop over all cells */
begin_c_loop_all(c,t)
{

C_CENTROID(xc,c,t);

if (xc[0] < 5. )

{

C_U(c,t) = 0.;
C_V(c,t) = 0.;
C_P(c,t) = 100000.;
C_T(c,t) = 348.362;
C_R(c,t) = 1.;
}

else

{

C_U(c,t) = 0.;
C_V(c,t) = 0.;
C_P(c,t) = 10000.;
C_T(c,t) = 278.689;
C_R(c,t) = 0.125;



}

}
end_c_loop_all(c,t)
}
}


then go to Define> User Defined > Functions > interpreted and browse to the text file ( you must save it as *.c first) then again go to Define> User Defined > Function Hooks > initialization > Edit > select the name "moein_shock_tube_init" and then click on Add and then Ok.

then go to Solve > Initialiaze > press Init.
Dont' worry. the numbers like 300 kelvin in initialization dialog box will not influence your simulation and the udf will override them.
now you can plot contours or XY Diagrams and see the result.

Some more tips:
Is giving the temperature values like 348.362 necessary?
I don't think so, because you define your material as an ideal gas, since there is an ideal gas relation P = density * R * T. but I haven't tried eliminating that. you can try!
Also make sure to go to Operating Conditions and set the pressure to 0, since you must work with Absolute Pressures.
if you don't understand the commands in the UDF, search them in internet.

Define_init was the the key to this solution, but I'm happy I turned that key to open a door to salvation. I am now tired of typing, but I have a good sensation...

Last edited by moein_joon27; June 17, 2014 at 07:09.
moein_joon27 is offline   Reply With Quote

Old   July 15, 2015, 07:15
Default
  #12
New Member
 
B. F
Join Date: Feb 2014
Posts: 3
Rep Power: 3
troymcfont is on a distinguished road
Hi! Thanks for the UDF Moein.
Just a couple of question. Which BCs do you use at the left and the right of the tube? And also in my case the density is not patched correctly. After initializing I can only see the same value (1.62 kg/m3) everywhere even though I specified 2 different values for the left and the right states of the shock tube. I am using the density based solver with the ideal gas option for the density of the material.
Thank you so much.
troymcfont is offline   Reply With Quote

Reply

Tags
shock tube, simulation

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
HELP - Moving car simulation in fluent Brad Wells FLUENT 6 February 27, 2012 03:14
shock absorber simulation dik FloEFD, FloWorks & FloTHERM 3 May 7, 2010 08:36
[ask] shock absorber simulation dik Main CFD Forum 1 December 17, 2009 02:32
Fluent Remote Simulation Facility Service (RSF) di Rami FLUENT 2 June 4, 2008 05:38
Shock Tube Test queram Main CFD Forum 0 July 8, 2006 04:24


All times are GMT -4. The time now is 09:45.