2d_eulerian_shock

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Applications > Fluids >

2d_eulerian_shock

Previous pageReturn to chapter overviewNext page

{  2D_EULERIAN_SHOCK.PDE

 

  Comparison with shock tube problem of G.A. Sod

 

  See 1D_EULERIAN_SHOCK.PDE for a 1D model of the same problem.

 

  Ref: G.A. Sod, "A Survey of Several Finite Difference Methods for Systems of

  Nonlinear Hyperbolic Conservation Laws", J. Comp. Phys. 27, 1-31 (1978)

 

  See also Kershaw, Prasad and Shaw, "3D Unstructured ALE Hydrodynamics with the

  Upwind Discontinuous Finite Element Method", UCRL-JC-122104, Sept 1995.

}  

 

TITLE "Sod's Shock Tube Problem - 2D Eulerian"  

 

SELECT  

 ngrid = 100   { increase the grid density }  

 regrid = off { disable the adaptive mesh refinement }  

 errlim = 1e-4 { lower the error limit }  

 

VARIABLES  

 rho(1)  

 u(1)  

 P(1)  

 

DEFINITIONS  

 len = 1  

 wid = 0.02  

 gamma = 1.4  

 eps = 0.001 {=4*(1/63)^2}  

 

INITIAL VALUES  

 rho = 1.0 - 0.875*uramp(x-0.49, x-0.51)  

 u   = 0  

 P   = 1.0 - 0.9*uramp(x-0.49, x-0.51)  

 

EQUATIONS  

 rho:  dt(rho)+u*dx(rho) = eps*div(grad(rho)) - rho*dx(u)  

 u:    dt(u)+u*dx(u) = eps*div(grad(u)) - dx(P)/rho  

 P:    dt(P)+u*dx(P) = eps*div(grad(P)) - gamma*P*dx(u)  

 

BOUNDARIES  

REGION 1  

  START(0,0)  

  Line to (len,0)

   Value(u)=0 line to (len,wid)

   Natural(u)=0 line to (0,wid) to close  

 

TIME 0 TO 0.375  

 

MONITORS  

for cycle=5  

  elevation(rho) from(0,wid/2) to (len,wid/2)  

  elevation(u)   from(0,wid/2) to (len,wid/2)  

  elevation(P)   from(0,wid/2) to (len,wid/2)  

  history(rho) at (0.5,wid/2)  

  history(u)   at (0.48,wid/2) (0.49,wid/2) (0.5,wid/2) (0.51,wid/2) (0.52,wid/2)  

  history(p)   at (0.48,wid/2) (0.49,wid/2) (0.5,wid/2) (0.51,wid/2) (0.52,wid/2)  

  history(deltat)  

 

PLOTS  

for t=0.143, 0.375  

  elevation(rho) from(0,wid/2) to (len,wid/2)  

  elevation(u)   from(0,wid/2) to (len,wid/2)  

  elevation(P)   from(0,wid/2) to (len,wid/2)  

  history(rho) at (0.48,wid/2) (0.49,wid/2) (0.5,wid/2) (0.51,wid/2) (0.52,wid/2)  

  history(u)   at (0.48,wid/2) (0.49,wid/2) (0.5,wid/2) (0.51,wid/2) (0.52,wid/2)  

  history(p)   at (0.48,wid/2) (0.49,wid/2) (0.5,wid/2) (0.51,wid/2) (0.52,wid/2)  

 

END