PHOTON USE
p;parphi
1 5 1
gr x 1
msg The grid. Z signifies time. Press RETURN for gas vol. fraction
pause;gr off;red;gr ou x 1
msg the volume fraction of gas; press RETURN for pressure
con gas x 1 fi;0.01;pause;con off;red
msg the pressure; press RETURN for gas velocity
con p1 x 1 fi;0.01;pause;con off;red
msg the gas velocity; press RETURN for liquid velocity
con av1 x 1 y 1 19 fi;0.01;pause;con off;red
msg the liquid velocity
con bv2 x 1 y 1 19 fi;0.01
enduse
GROUP 1. Run title
TEXT(WATER DISPLACED BY AIR FROM BELOW :W895
TITLE
DISPLAY
A vertical tube has a closed upper end and two nearby but
separate apertures in the base. The tube is initially filled
with water. Air is injected through one of the lower apertures,
with the result that water is forced out through the other.
The duration of the calculation is chosen so that all the water
should just be expelled.
Bubbles of air rise through the falling stream of water within
the tube. The task is to calculate the variation with time of
the profiles of pressure and other variables within the tube.
PHOTON USE commands are supplied to enable the calculated
results to be understood.
Experiments of the above kind have been reported by S.Lo, in
an Imperial College, London University PhD thesis dated 1985.
ENDDIS
GROUP 2. Transience; time-step specification
STEADY=F;GRDPWR(T,400,10.0,1.0)
GROUP 4. Y-direction grid specification
GRDPWR(Y,20,1.0,1.0)
GROUP 7. Variables stored, solved & named
ONEPHS=F;SOLVE(P1,V1,V2,R1,R2);NAME(R1)=GAS;NAME(R2)=LIQ
NAME(V1)=AV1;NAME(V2)=BV2
GROUP 8. Terms (in differential equations) & devices
TERMS(GAS,Y,Y,N,Y,Y,Y);TERMS(LIQ,Y,Y,N,Y,N,Y)
TERMS(AV1,Y,Y,N,Y,Y,Y);TERMS(BV2,Y,Y,N,Y,N,Y)
GROUP 9. Properties of the medium (or media)
RHO2=1000.0;RHO1=1.0
GROUP 10. Inter-phase-transfer processes and properties
CFIPS=1.E4
GROUP 11. Initialization of variable or porosity fields
FIINIT(LIQ)=0.999;FIINIT(GAS)=0.001
GROUP 13. Boundary conditions and special sources
Air injection
PATCH(AIRIN,NORTH,1,1,2,2,1,1,1,LSTEP);COVAL(AIRIN,P1,FIXFLU,0.1)
Escape for water, and possibly air
PATCH(OUTLET,SOUTH,1,1,1,1,1,1,1,LSTEP)
COVAL(OUTLET,P1,FIXP,0.0);COVAL(OUTLET,P2,1.E3,0.0)
COVAL(OUTLET,AV1,ONLYMS,0.0);COVAL(OUTLET,BV2,ONLYMS,0.0)
Gravity
PATCH(GRAVTY,PHASEM,1,1,1,NY,1,1,1,LSTEP)
COVAL(GRAVTY,AV1,FIXFLU,-9.81);COVAL(GRAVTY,BV2,FIXFLU,-9.81)
GROUP 15. Termination of sweeps
LSWEEP=10;SELREF=T;RESFAC=1.E-6
GROUP 17. Under-relaxation devices
RELAX(GAS,LINRLX,0.8);RELAX(LIQ,LINRLX,0.8)
SPEDAT(SET,GXMONI,TRANSIENT,L,F)
GROUP 22. Spot-value print-out
TSTSWP=LSWEEP-1;UWATCH=T;IYMON=NY/2;NYPRIN=NY/10
GROUP 23. Field print-out and plot control
NPRINT=LSWEEP;NTPRIN=LSTEP/10
PATCH(LONGPLOT,PROFIL,1,1,1,NY,1,1,1,LSTEP)
PLOT(LONGPLOT,LIQ,0.0,0.)
PATCH(TIMEPLOT,PROFIL,1,1,NY-NY/4,NY-NY/4,1,1,1,LSTEP)
PLOT(TIMEPLOT,GAS,0.0,0.0);PLOT(TIMEPLOT,AV1,-1.0,-1.0)
PLOT(TIMEPLOT,BV2,-1.0,-1.0)
IDISPA=LSTEP/20