photon use
p
parphi
1 1 1000
0.20443E+04 0.15633E+04 CR
msg The Grid. type return to see Pressure contours.
gr y 1;pause;cl
msg Pressure contours in the X-T plane. Type return
con p1 y 1 fi;1;pause;cl
msg Axial velocity in the X-T plane. Type return
con u1 y 1 fi;1;pause;cl
msg Temperature contours in the X-T plane.
con tmp1 y 1 fi;1
enduse
GROUP 1. Run title and other preliminaries
TEXT(1D Transient Shock Tube
DISPLAY
The case considered is 1d transient compressible flow in a
shock tube. The flow is generated by the rupture of a diaphragm
separating a driver gas at high pressure (region 4) from a
gas at low pressure (region 1). This rupture results in the
movement of a shock wave into the low-pressure gas, and the
movement of an expansion wave into the high-pressure gas.
The tube length and time period are chosen so that the
computation ends before the two waves reflect from the ends of
the shock tube.
------------------------|------------------------
P4=1.E6 Pa, T4=20 C | P1=1.E5 Pa, T1=20 C
------------------------|------------------------
Provision is made for the use of the Van Leer higher-order scheme
(when HOS = T) and for use of stagnation enthalpy as a variable
(when HSTAG = T), but both are defaulted = F.
ENDDIS
REAL(TIN,HIN)
TIN=20.+273.; HIN=CP1*TIN
GROUPs 2, 3, 4
STEADY=F
NX=181; XULAST=1.8; ny=1; yvlast=0.1; lstep=50; tlast=12.5e-4
l(unigrid
GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,H1)
STORE(DEN1,TMP1,MACH)
mesg(Use Van Leer scheme? (y/N)
readvdu(ans,char,n)
IF(:ans:.eq.y) THEN
+ SCHEME(VANLH,ALL)
ENDIF
GROUP 8. Terms (in differential equations) & devices
UCONV=T; DENPCO=T
GROUP 9. Properties of the medium (or media)
PRESS0=1.E5
#fluidmat
setprps(1,airideal)
boolean(hstag)
mesg(solve for stagnation enthalpy? (y/N)
readvdu(ans,char,n)
if(:ans:.eq.y) then
+ tmp1=varstagh;tmp1b=cp1
+ hstag=t
else
+ tmp1=linh;tmp1b=1./cp1
endif
IF(HSTAG) THEN
+ TERMS(H1,N,Y,Y,Y,Y,Y)
+ PATCH(DPDT,VOLUME,1,NX,1,NY,1,NZ,1,LSTEP)
+ COVAL(DPDT,H1,FIXFLU,GRND)
ENDIF
GROUP 11. Initialization of variable or porosity fields
FIINIT(H1)=HIN
PATCH(INIHIGH,INIVAL,1,NX/2,1,1,1,1,1,1)
INIT(INIHIGH,P1,0.,1.E6-1.E5)
GROUP 13. Boundary conditions and special sources
PATCH(LOWP,HIGH,NX,NX,1,1,1,1,1,LSTEP)
COVAL(LOWP,P1,1.E3,0.0); COVAL(LOWP,H1,0.,SAME)
PATCH(HIGHP,LOW,1,1,1,1,1,1,1,LSTEP)
COVAL(HIGHP,P1,FIXP,1.E6-1.E5); COVAL(HIGHP,H1,0.,SAME)
GROUP 15. Termination of sweeps
LSWEEP=100; RESFAC=1.E-4
GROUP 16. Termination of iterations
LITER(U1)=5
ENDIT(U1)=1.E-6; ENDIT(H1)=1.E-6
GROUP 17. Under-relaxation devices
RELAX(U1,FALSDT,0.1); RELAX(H1,FALSDT,0.1)
GROUP 19. Data communicated by satellite to GROUND
NAMGRD=CONV
IDISPA=1
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
GROUP 21. Print-out of variables
INIFLD=T
GROUP 22. Spot-value print-out
IXMON=110; TSTSWP=-1
GROUP 23. Field print-out and plot control
NXPRIN=20; NTPRIN=5; NPLT=2
FIINIT(H1) = 2.944650E+05