TALK=T;RUN(1,1) 274

boolean(conwiz)
conwiz=t

real(mult) 
mult=100
  PHOTON USE
  p
 
 
 
 
  msg pressure contours and velocity vectors
  msg (for case 276, pressure represents velocity potential)
  con p1 x 1 fi;0.05; con p1 y 1 fi;0.05
  set ref vec 40.0; vec x 1; vec y 1
  msg
  msg Press e to END
  ENDUSE
     ****** TO LOAD CASE: TYPE L(274) ******
    GROUP 1. Run title and other preliminaries
TEXT(3D Nav.Sto.Flow Around A Moving Van
TITLE
  DISPLAY
     This is a 3-dimensional Cartesian example in which a solid
  body immersed in an unconfined flow is represented by means of
  'porosities'.  The turbulence of the flow is crudely represented
  by a prescribed constant turbulent viscosity within the fluid,
  together with a logarithmic law of the wall for skin friction.
  The lower (south) boundary of the flow domain, representing
  the road surface, is modelled as a moving wall. The example is
  an up-to-date version of that reported in the report PDR/CHAM UK/5
      An impression of the geometry can be gained by examining
  the following sketch.                |
             ______________            |______
            |**************|           |******|
     ^    __|**************|         ^ |******|
     |   |*****************|         | |******|
    y|   |*****************|        y| |******|
     |   ~**~~~~~~~~~~~~~**~         | |~~~~**
          **             **            |    **
        -------------------------------------------
                z---->                  x--->
  ENDDIS
#pause
    GROUP 2. Transience; time-step specification
    GROUP 3. X-direction grid specification
   *  Write objects
RSET(D,VAN,5.0,6.0,20.,1,0)
RSET(M,8,12,20)
RSET(B,BODY1,0,0.5,5.,1.5,1.,5.,12,0)
RSET(B,BODY2,0,1.5,6.,1.5,1.5,4.,12,0)
RSET(B,FWHL,1.,0,5.,0.5,0.5,1.,12,0)
RSET(B,RWHL,1.,0,9.,0.5,0.5,1.,12,0)
RSET(B,UPSTR,0,0,0,5.,6.,0,7,0)
RSET(B,DWSTR,0,0,20.,5.,6.,0,5,0)
RSET(B,ROAD,0,0,0,5.,0,20.,10,0)
 
    GROUP 6. Body-fitted coordinates or grid distortion
    GROUP 7. Variables stored, solved & named
SOLVE(P1,U1,V1,W1)
  **Select whole-field solution procedure for pressure,
    and point-by-point for velocities
SOLUTN(P1,Y,Y,Y,N,N,N); SOLUTN(U1,Y,Y,N,Y,N,Y)
SOLUTN(V1,Y,Y,N,Y,N,Y); SOLUTN(W1,Y,Y,N,Y,N,Y)
 
    GROUP 8. Terms (in differential equations) & devices
    GROUP 9. Properties of the medium (or media)
ENUL=1.E-5; ENUT=1.0E-3
 
    GROUP 10. Inter-phase-transfer processes and properties
    GROUP 11. Initialization of variable or porosity fields
if(.not.conwiz) then
 FIINIT(P1)=0.0; FIINIT(W1)=14.0 * mult
endif
   ** Vehicle body
CONPOR(BODY1,0.0,VOLUME,#1,-#2,-#2,#2,-#2,-#4)
CONPOR(BODY2,0.0,VOLUME,#1,-#2,#3,-#3,-#3,-#4)
   ** Front wheel
CONPOR(FWHL,0.0,VOLUME,#2,#2,#1,#1,#2,#2)
   ** Rear wheel
CONPOR(RWHL,0.0,VOLUME,#2,#2,#1,#1,#4,#4)
 
    GROUP 13. Boundary conditions and special sources
   ** Upstream boundary
INLET(UPSTR,LOW,#1,#NREGX,#1,#NREGY,#1,#1,1,1)
VALUE(UPSTR,P1,14.0*mult); VALUE(UPSTR,W1,14.*mult)
   ** Downstream boundary
PATCH(DWSTR,HIGH,#1,#NREGX,#1,#NREGY,#NREGZ,#NREGZ,1,1);
COVAL(DWSTR,P1,FIXP,0.)
COVAL(DWSTR,U1,ONLYMS,0.0);COVAL(DWSTR,V1,ONLYMS,0.0)
COVAL(DWSTR,W1,ONLYMS,0.0)
   ** Road surface
WALL (ROAD,SOUTH,#1,#NREGX,#1,#1,#1,#NREGZ,1,1)
COVAL(ROAD,W1,LOGLAW,14.0*mult)
 
   ** Following Patches are only necessary if BODY definition
      above is set with positive limits **
 
    GROUP 15. Termination of sweeps
LSWEEP=200
    GROUP 17. Under-relaxation devices
if(.not.conwiz) then
 RELAX(U1,FALSDT,1.0e-4);RELAX(V1,FALSDT,1.0e-4)
 RELAX(W1,FALSDT,1.0e-4)
 SARAH=0.005
endif 
    GROUP 21. Print-out of variables
YZPR=T
    GROUP 22. Spot-value print-out
IXMON=5;IYMON=5;IZMON=5
    GROUP 22. Spot-value print-out
OUTPUT(VPOR,N,N,N,N,N,N)
TSTSWP=-1
    GROUP 23. Field print-out and plot control
NXPRIN=NX/2;NYPRIN=NY/5;NZPRIN=NZ/10
 PATCH(PROFILE,PROFIL,NX-1,NX-1,NY/2,NY/2,1,NZ,1,1)
PLOT(PROFILE,W1,0.0,0.0);PLOT(PROFILE,P1,0.0,0.0)
PLOT(PROFILE,U1,0.0,0.0);PLOT(PROFILE,V1,0.0,0.0)
 PATCH(XEQ1,CONTUR,1,1,1,NY,1,NZ,1,1);PLOT(XEQ1,P1,0.0,20.0)
PLOT(XEQ1,U1,0.0,20.0);PLOT(XEQ1,V1,0.0,20.0)
PLOT(XEQ1,W1,0.0,20.0)
 PATCH(XEQ5,CONTUR,5,5,1,NY,1,NZ,1,1);PLOT(XEQ5,P1,0.0,20.0)
PLOT(XEQ5,W1,0.0,20.0)
 PATCH(WAKE,CONTUR,1,NX,1,NY,NZ-5,NZ-5,1,1)
PLOT(WAKE,W1,0.0,20.0)
  
  
  
  
if(conwiz) then             ! conwiz has been defined as boolean above
                            ! when T, it loads the macro called conprom
                            ! which sets lsg=57 
 #conprom
endif
          
! the next macro causes the monitor to pause at the end, so 
          ! that PLOTFILE can be activated
#endpause
         
          ! the next macro causes the maximum absolute corrections to         
          ! be plotted in the graphical monitor
#maxabs
          
          ! the next macro ensures that figures (i.e. numerical values)
          ! of the corrections and residuals are displayed
#figures