CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Trains and tunnels (https://www.cfd-online.com/Forums/main/9183-trains-tunnels.html)

Tim May 17, 2005 10:19

Trains and tunnels
 
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

Alexey May 18, 2005 08:09

Re: Trains and tunnels
 
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.


Tim May 18, 2005 08:33

Re: Trains and tunnels
 
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

Pete May 18, 2005 15:02

Re: Trains and tunnels
 
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

Tim May 18, 2005 17:00

Re: Trains and tunnels
 
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

Alexey May 19, 2005 04:01

Re: Trains and tunnels
 
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.


Jean-François May 19, 2005 06:58

Re: Trains and tunnels
 
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

harish May 27, 2005 01:59

Re: Trains and tunnels
 
May be you can try using the implicit formulation of mccormack.

-Harish

benjam June 9, 2005 10:04

Re: Trains and tunnels
 
show me big trains


All times are GMT -4. The time now is 13:33.