# Trains and tunnels

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

 May 17, 2005, 09:19 Trains and tunnels #1 Tim Guest   Posts: n/a HI, I'm wondering if anyone can help me answer a query... I'm working on some CFD code in f95 that should simulate the movement of a train through a tunnel. I'm using the MacCormack scheme with a source term simulating the tunnel and train interaction using a variable area duct and solving the Euler eqns, applying density and velocity bc's at the inlet and atmospheric pressure at the outlet. I thought that the code was fairly simple but when it runs I get some very nonphysical pressure oscillations at the points where the train nose and tail are. I shouldn't get these as the area change is sinusoidal and not discontinuous (they shouldn't exist at all I think) but I'm not sure if I've gone wrong somewhere. I've read in Hirsch that artificial viscosity terms are needed to smooth out oscillatory behaviour but my simulation is purely subsonic so I haven't implemented them... is this the root of my evil? Help! Thanks, Tim Aplin Dept of Aeronautics, Imperial College, London

 May 18, 2005, 07:09 Re: Trains and tunnels #2 Alexey Guest   Posts: n/a MacCormack scheme is famous but prehistoric. It is in principle non-monotonic independently of sub- or supersonic regime. Of course you may applay some artificial viscosity but I would like to advise you some modern monotonic scheme such as Harten's TVD or other non-oscillatory scheme. At the worst you may use Godunov's 1-st order scheme which works like Swiss clock. Wish good luck. Alexey.

 May 18, 2005, 07:33 Re: Trains and tunnels #3 Tim Guest   Posts: n/a I can't, I'm stuck with MacCormack as the scheme to implement. I've tried modifying the flux terms in the momentum equation to remove dA/dx on the RHS and replace it with A(i)*dP/dx instead but that seems not to work at all, giving me oscillatory behaviour at both in- and outlets... Tim

 May 18, 2005, 14:02 Re: Trains and tunnels #4 Pete Guest   Posts: n/a Maybe your code is correct. The reason may be that the two points your suffered are singular points, i.e., discontinuity in mesh derivatives, and even boundary conditions (you are using slip BC at the walls, arn't you?). It's only my personal guess, maybe not correct. Maybe you can just use a smooth curve in lieu of those sharp corners. There should be some better methods to treat those special points... Good luck. Pete

 May 18, 2005, 16:00 Re: Trains and tunnels #5 Tim Guest   Posts: n/a Hi pete, Thanks for the reply... I forgot to point out that I'm using a sinusoidal nose and tail, thus eliminating the sharp area changes which would produce oscillatory/discontinuous behaviour... Thanks, Tim

 May 19, 2005, 03:01 Re: Trains and tunnels #6 Alexey Guest   Posts: n/a Tim, Many years ago I successfully used the following 4-th order artificial term for MacCormack scheme which I added to solution U_i after each time step: omega*(U_(i-2) - 4*U_(i-1) + 6*U_(i) - 4*U_(i+1) + U_(i+2)) where omega is the parameter 0.01...1. and U is the solution at time n-level (explicit term) and i is the grid index. Try. Alexey.

 May 19, 2005, 05:58 Re: Trains and tunnels #7 Jean-François Guest   Posts: n/a If I've understood you correctly, you're solving the 1-D Euler equations with additional terms that model the cross section variation. So, you are solving the 1-D Euler "nozzle" equations. You can then calculate analytically the solution of this problem and then check if the only difference is located at the beginning and at the end of the area variation. Also, as proposed by Alexey, first order scheme should do the trick. Hope this help JF

 May 27, 2005, 00:59 Re: Trains and tunnels #8 harish Guest   Posts: n/a May be you can try using the implicit formulation of mccormack. -Harish

 June 9, 2005, 09:04 Re: Trains and tunnels #9 benjam Guest   Posts: n/a show me big trains

 Thread Tools Display Modes Linear Mode

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

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