TALK=T;RUN( 1, 1)
 
 ************************************************************
   Q1 created by VDI menu, Version 2008, Date 07/08/08
 CPVNAM=VDI;SPPNAM=Core
 ************************************************************
  Echo DISPLAY / USE settings
  DISPLAY
 
  Simulation of laminar steady flow in z direction around 2 spheres
  in a uniform stream of atmospheric air, treated as incompressible.
 
  The basic grid is cartesian and rather coarse (18*18*31), but the
  flow follows the curved surface smoothly because the PARSOL (i.e.
  cut-cell) technique  is used.
 
  Provision is made for:
  1. Solving for only one quarter of the domain; this is allowed
  by reason of symmetry and desirable for economy and accuracy.
  2. Refining the grid near the spheres to increase accuracy more.
  3. Varying the Reynolds number.
 
  The variables computed are:
  * p1, the pressure,
  * u1, the x-direction velocity,
  * v1, the y-direction velocity, and
  * w1, the z-direction velocity.
 
  This file contains a macro of commands which cause the Viewer
  (when the macro button is pressed) to display contours
  automatically.
 
  [Case derived from core linrary case 805 by dbs 11.09.08]
  ENDDIS
   VRV USE
  * Start of frame
  VARIABLE  Pressure; CON ON
  msg Pressure contours
  PAUSE
  * Start of frame
  VARIABLE  Velocity; VEC ON
  msg Pressure contours superimposed by velocity vectors
  PAUSE
  * Start of frame
  * Setting object visibility and painting status
  OBJECT SHOW TYPE BLOCKAGE
  OBJECT PAINT TYPE BLOCKAGE ON
  VARIABLE  Velocity; VEC OFF
  CONTOUR OFF
  msg Velocity contours on the surface of the sphere
  PAUSE
  * Start of frame
  * Setting object visibility and painting status
  OBJECT SHOW TYPE BLOCKAGE
  OBJECT PAINT TYPE BLOCKAGE ON
  VARIABLE  Pressure; VEC OFF
  msg Pressure contours on the surface of the sphere
  PAUSE
  ENDUSE
 ************************************************************
 IRUNN   =         1 ;LIBREF =         0
 ************************************************************
  Group 1. Run Title
 TEXT(2 spheres Re=40 quarter=T finegrid=T    )
 ************************************************************
  Group 2. Transience
 STEADY  =    T
 ************************************************************
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
 RSET(M,18,18,31)
 ************************************************************
  Group 6. Body-Fitted coordinates
 ************************************************************
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
    * Non-default variable names
 NAME(149) =VLSQ ; NAME(150) =PRPS
    * Solved variables list
 SOLVE(P1  ,U1  ,V1  ,W1  )
    * Stored variables list
 STORE(PRPS,VLSQ)
    * Additional solver options
 SOLUTN(P1  ,Y,Y,Y,N,N,Y)
 SOLUTN(U1  ,Y,Y,Y,N,N,Y)
 SOLUTN(V1  ,Y,Y,Y,N,N,Y)
 SOLUTN(W1  ,Y,Y,Y,N,N,Y)
 
 ************************************************************
  Echo InForm settings for Group  7
  SAVE7BEGIN
(stored var STGP is P1+0.5*RHO1*VLSQ with SWPFIN)
  SAVE7END
 ************************************************************
  Group 8. Terms & Devices
 ************************************************************
  Group 9. Properties
 RHO1    = 1.000000E+00
 ENUL    = 5.000000E-02
 CP1     = 1.005000E+03
 ENUT    = 0.000000E+00
 ************************************************************
  Group 10.Inter-Phase Transfer Processes
 ************************************************************
  Group 11.Initialise Var/Porosity Fields
 FIINIT(W1  ) =  1.000000E+00 ;FIINIT(PRPS) = -1.000000E+00
   No PATCHes used for this Group
 
 
 INIADD  =    F
 ************************************************************
  Group 12. Convection and diffusion adjustments
   No PATCHes used for this Group
 ************************************************************
  Group 13. Boundary & Special Sources
 
 PATCH (IMBL3&2 ,VOLUME,3,16,3,16,3,29,1,1)
 COVAL (IMBL3&2 ,W1  , 0.000000E+00, 0.000000E+00)
 
 PATCH (IMBL4&3 ,VOLUME,3,16,3,16,4,28,1,1)
 COVAL (IMBL4&3 ,W1  , 0.000000E+00, 0.000000E+00)
 
 PATCH (IMBL5&4 ,VOLUME,3,16,3,16,5,27,1,1)
 COVAL (IMBL5&4 ,W1  , 0.000000E+00, 0.000000E+00)
 
 PATCH (IMBL810 ,VOLUME,3,16,3,16,8,21,1,1)
 COVAL (IMBL810 ,W1  , 0.000000E+00, 0.000000E+00)
 
 PATCH (IMBL815 ,VOLUME,5,14,5,14,8,16,1,1)
 COVAL (IMBL815 ,W1  , 0.000000E+00, 0.000000E+00)
 
 EGWF    =    T
 ************************************************************
  Group 14. Downstream Pressure For PARAB
 ************************************************************
  Group 15. Terminate Sweeps
 LSWEEP  =        30
 RESFAC  = 1.000000E-03
 ************************************************************
  Group 16. Terminate Iterations
 LITER (P1  ) =      250
 ************************************************************
  Group 17. Relaxation
 RELAX(P1  ,LINRLX, 1.000000E+00)
 ************************************************************
  Group 18. Limits
 VARMAX(U1  ) = 1.000000E+06 ;VARMIN(U1  ) =-1.000000E+06
 VARMAX(V1  ) = 1.000000E+06 ;VARMIN(V1  ) =-1.000000E+06
 VARMAX(W1  ) = 1.000000E+06 ;VARMIN(W1  ) =-1.000000E+06
 ************************************************************
  Group 19. EARTH Calls To GROUND Station
 USEGRD  =    T  ;USEGRX =    T
 ASAP    =    T
 PARSOL  =    T
 ISG50   =         1
 ISG52   =         2
 ************************************************************
  Group 20. Preliminary Printout
 ECHO    =    T
 DISTIL  =    T  ;NULLPR =    F
 NDST    =         0
 DSTTOL  = 1.000000E-02
 EX    (P1  ) =  1.298000E-01 ;EX    (U1  ) =  3.240000E-02
 EX    (V1  ) =  3.335000E-02 ;EX    (W1  ) =  1.012000E+00
 EX    (VLSQ) =  0.000000E+00 ;EX    (PRPS) =  3.354000E+00
 ************************************************************
  Group 21. Print-out of Variables
 OUTPUT(U1  ,Y,Y,Y,N,Y,Y)
 ************************************************************
  Group 22. Monitor Print-Out
 IXMON   =         9 ;IYMON  =         9 ;IZMON  =        17
 NPRMON  =    100000
 NPRMNT  =         1
 TSTSWP  =        -1
 ************************************************************
  Group 23.Field Print-Out & Plot Control
 NPRINT  =    100000
 ISWPRF  =         1 ;ISWPRL =    100000
   No PATCHes used for this Group
 ************************************************************
  Group 24. Dumps For Restarts
 
 ************************************************************
  Echo InForm settings for Group 25
  SAVE25BEGIN
    declarations and settings
boolean(quarter,finegrid)
real(reyno)
quarter = t
finegrid= t
reyno=40
    note that object 1 is the air inlet
    note that object 2 is the air outlet
    note that object 3 is first sphere
    note that object 4 is second sphere
    note that object 5 is fine-grid region around first sphere
    note that object 6 is fine-grid region around second sphere
real(diam1,diam2,gap)
real(xpos1,ypos1,zpos1,xsiz1,ysiz1,zsiz1,dist)
real(xpos2,ypos2,zpos2,xsiz2,ysiz2,zsiz2)
real(xposg1,yposg1,zposg1,xsizg1,ysizg1,zsizg1)
real(xposg2,yposg2,zposg2,xsizg2,ysizg2,zsizg2)
real(finfc5,finfc6)
real(velin)
    settings
diam1=2.0
diam2=1.0
gap=2.44
xulast=2.0*diam1; yvlast= 2.0*diam1; zwlast= 5.0*diam1
xpos1=diam1*0.5
ypos1=diam1*0.5
zpos1=1.11*diam1
xsiz1=diam1
ysiz1=diam1
zsiz1=diam1
 
xpos2=xpos1+xsiz1/4  ! postion of sph2 relative to sph1
ypos2=ypos1+xsiz1/4
zpos2=zpos1+zsiz1+gap
xsiz2=diam2        ! size of sph2
ysiz2=diam2
zsiz2=diam2
 
dist=0.4*diam2      ! distance of fine-grid-box from box of sph1
 
xposg1=xpos1-dist    ! position of fine-grid box around sph1
yposg1=ypos1-dist
zposg1=zpos1-dist
xsizg1=xsiz1+2.0*dist  ! size of fine-grid box around sph1
ysizg1=ysiz1+2.0*dist
zsizg1=zsiz1+2.0*dist
 
dist=0.2*diam2      ! distance of fine-grid-box from box of sph2
xposg2=xpos2-dist    ! position of fine-grid box around sph2
yposg2=ypos2-dist
zposg2=zpos2-dist
xsizg2=xsiz2+2.0*dist  ! size of fine-grid box around sph1
ysizg2=ysiz2+2.0*dist
zsizg2=zsiz2+2.0*dist
 
if(quarter) then      ! change sizes and positions if only one quar$
ter                                                                 
xulast=0.5*xulast     ! of domain is to be considered, for economy $
and                                                                 
yvlast=0.5*yvlast     ! accuracy
 
xpos1=-xsiz1*0.5;ypos1=-ysiz1*0.5   ! move spheres to axis
xpos2=-xsiz2*0.5;ypos2=-ysiz2*0.5
xsizg1=xsizg1*0.5;ysizg1=ysizg1*0.5     ! halve fine grid width and hei$
ght                                                                 
xsizg2=xsizg2*0.5;ysizg2=ysizg2*0.5
xposg1=0.0; yposg1=0.0                ! move fine grids to axis
xposg2=0.0; yposg2=0.0
 
endif
 
finfc5=4            ! grid-refinement factors
finfc6=4
finfc5
finfc6
velin=1.0             ! inlet velocity
enul=velin*xsiz1/reyno ! sets viscosity to fix Reynolds number
TEXT(2 spheres Re=:reyno: quarter=:quarter: finegrid=:finegrid:
 
 GVIEW(P,-9.928086E-01,0.000000E+00,-1.197123E-01)
 GVIEW(UP,0.000000E+00,1.000000E+00,0.000000E+00)
 
> DOM,    SIZE,        xulast, yvlast, zwlast
> DOM,    MONIT,       xulast/2, yvlast/2, zwlast/2
> DOM,    SCALE,       1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    SNAPSIZE,    1.000000E-02
> DOM,    RELAX,       5.000000E-01
 
> OBJ1,   NAME,        airin
> OBJ1,   POSITION,    0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ1,   SIZE,        xulast, yvlast, 0.000000E+00
> OBJ1,   CLIPART,     cube3
> OBJ1,   ROTATION24,        1
> OBJ1,   TYPE,        INLET
> OBJ1,   PRESSURE,      0.000000E+00
> OBJ1,   VELOCITY,      0.000000E+00, 0.000000E+00, velin
> OBJ1,   TEMPERATURE,   0.000000E+00
 
> OBJ2,   NAME,        airout
> OBJ2,   POSITION,    0.000000E+00, 0.000000E+00, zwlast
> OBJ2,   SIZE,        xulast, yvlast, 0.000000E+00
> OBJ2,   CLIPART,     cube12
> OBJ2,   ROTATION24,        1
> OBJ2,   TYPE,        OUTLET
> OBJ2,   PRESSURE,      0.000000E+00
> OBJ2,   TEMPERATURE,   0.000000E+00
> OBJ2,   COEFFICIENT,   1.000000E+03
 
> OBJ3,   NAME,        firstsph
> OBJ3,   POSITION,    xpos1,ypos1,zpos1
> OBJ3,   SIZE,        xsiz1,ysiz1,zsiz1
> OBJ3,   ARBORIEN,    0.000000E+00, 0.000000E+00, 0.000000E+01
> OBJ3,   CLIPART,     smoosphe
  > OBJ3,   CLIPART,     sphere1
> OBJ3,   ROTATION24,        1
> OBJ3,   TYPE,        BLOCKAGE
> OBJ3,   MATERIAL,      198
 
> OBJ3,   NAME,        secondsp
> OBJ3,   POSITION,    xpos2,ypos2,zpos2
> OBJ3,   SIZE,        xsiz2,ysiz2,zsiz2
> OBJ3,   ARBORIEN,    0.000000E+00, 0.000000E+00, 0.000000E+01
> OBJ3,   CLIPART,     smoosphe
  > OBJ3,   CLIPART,     sphere1
> OBJ3,   ROTATION24,        1
> OBJ3,   TYPE,        BLOCKAGE
> OBJ3,   MATERIAL,      198
if(finegrid) then
> OBJ,    NAME,        g1
> OBJ,    POSITION,    xposg1,yposg1,zposg1
> OBJ,    SIZE,        xsizg1,ysizg1,zsizg1
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    FINEFACTS,   :finfc5:, :finfc5:, :finfc5: ! retain colons
 
> OBJ,    NAME,        g2
> OBJ,    POSITION,    xposg2,yposg2,zposg2
> OBJ,    SIZE,        xsizg2,ysizg2,zsizg2
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    FINEFACTS,   :finfc6:, :finfc6:, :finfc6: ! retain colons
endif
  SAVE25END
STOP