TEXT(Wave Propagation - 1D Scalar      
TITLE
 
  DISPLAY
    Example to show the differences between implicit
    and explicit formulation of a transient problem.
    (The boolean variable IMPLICIT may be used to
    switch between the two cases)
  ENDDIS
 
    Run 2. Y direction
REAL(VEL);BOOLEAN(IMPLICIT);IMPLICIT=F;VEL=1.0
    GROUP 2,3,4,5. Transience and grid specification
STEADY=F;LSTEP=1;NY=20;YVLAST=1.0
TLAST=(YVLAST*LSTEP)/(NY*VEL)
GRDPWR(T,LSTEP,TLAST,1.0);GRDPWR(Y,NY,XULAST,1.0)
    GROUP 7. Variables stored, solved and named
STORE(P1,V1);SOLVE(SCAL)
IF(IMPLICIT) THEN
+ SOLUTN(SCAL,P,P,Y,P,N,P)
ELSE
+ SOLUTN(SCAL,P,P,Y,P,Y,P)
ENDIF
    GROUP 8. Terms (in differential equations) & devices
TERMS(SCAL,P,P,N,P,P,P)
    GROUP 11. Initialization of variable or porosity fields
FIINIT(SCAL)=0.0;FIINIT(P1)=0.0;FIINIT(V1)=VEL
PATCH(INI1,INIVAL,1,NX,5,10,1,NZ,1,LSTEP);INIT(INI1,SCAL,ZERO,1.0)
    GROUP 15. Termination of sweeps
LSWEEP=5
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
    GROUP 21. Spot-value print-out
TSTSWP=1
    GROUP 23. Field print-out and plot control
NTPRIN=1
PATCH(OUTP,PROFIL,1,1,1,NY,1,1,1,LSTEP);PLOT(OUTP,SCAL,0.0,0.0)