TALK=F;RUN( 1, 1)
 ************************************************************
   Q1 created by VDI menu, Version 3.6, Date 01/04/04
 CPVNAM=VDI;SPPNAM=Core
 ************************************************************
  Echo DISPLAY / USE settings
  DISPLAY
  
  A volumetric heat source which varies with axial position, z, is 
  applied by In-Form to a poorly-conducting long rod held at right 
  angles to a cold air stream.

  Inspection of the temperature and velocity fields shows that
  the former is independent of z but the latter depends on z
  strongly as a result of the heat-source distribution

  In-Form is also used to calculate the average Nusselt number and 
  to print it in a special INFOROUT file.
 
  The air flow is laminar. The Reynolds number equals 26.
  The Prandtl number equals 0.71
 
  Nusselt number calculated by the formula for flow  at right angles
  to a cylinder according to the textbook formula:
         Nu = 0.3*Re^0.6*Pr^1/3
  equals 1.9.
  ENDDIS

  PHOTON USE   
  p;;;

  vi 1 2 2
  msg x-direction-velocity contours at low and high z
  con u1 z 1 fi;0.001
  con u1 z m fi;0.001
  pause
  msg temperature contours at low and high z
  con tem1 z 1 fi;0.001
  con tem1 z m fi;0.001
  pause
  ENDUSE
 ************************************************************
 IRUNN   =         1 ;LIBREF =       146
  Group 1. Run Title
 TEXT(Non-uniform heat source in vr-object
   INFORM1BEGIN
  Declarations and settings
 REAL(INVEL,INTEM,DIAM,DOMPRPS)
 INVEL=0.01          ! inlet velocity
 INTEM=18.0          ! inlet temperature
 DIAM=0.04           ! rod diameter
 DOMPRPS=0.0         ! domain material index, constant-property air
   INFORM1END
  Group 2. Transience
 STEADY  =    T
  Groups 3, 4, 5  Grid Information
    * Overall number of cells, RSET(M,NX,NY,NZ,tolerance)
 RSET(M,80,40,5)
  Group 7. Variables: STOREd,SOLVEd,NAMEd
 ONEPHS  =    T
    * Non-default variable names
 NAME(149) =PRPS ; NAME(150) =TEM1
    * Solved variables list
 SOLVE(P1  ,U1  ,V1  ,W1  ,TEM1)
    * Stored variables list
 STORE(PRPS,PRAN)
    * Additional solver options
 SOLUTN(P1  ,Y,Y,Y,N,N,Y)
 SOLUTN(TEM1,Y,Y,Y,N,N,Y)
  Group 9. Properties
 PRESS0  = 1.000000E+05 ;TEMP0  = 2.730000E+02
    * Domain material is: 0   Air at 20 deg C, 1 atm
 SETPRPS(1,DOMPRPS) ! set pil properties as those of material 
                    ! with index DOMPRPS
 ENUT    = 0.000000E+00
  Group 11.Initialise Var/Porosity Fields
 FIINIT(PRPS) = -1.000000E+00
 FIINIT(TEM1) = INTEM
  Group 13. Boundary & Special Sources
  Echo InForm settings for Group 13
  INFORM13BEGIN
    
    !!!! note that the following source and init statements are
         inactive because they do not start in the  first or
         second column.
         Their effects are provided by the infsrc_ and infini_  
         lines in the VR-Object-related settings below.
         
       Heat source
    (SOURCE of TEM1 at ROD is 1.e+5*ZG with VOLU)
    (INIT of TEM1 at ROD is :INTEM:)

       Inlet sources of mass, momentum and energy
    (SOURCE of P1 at INLET is RHO1*:INVEL: with AREA)
    (SOURCE of U1 at INLET is :INVEL: with ONLYMS!AREA)
    (SOURCE of TEM1 at INLET is :INTEM: with ONLYMS!AREA)

       Next In-Form statements are used for calculation
       average Nusselt number
  ** Rod length
REAL(PLEN); PLEN=0.1
  ** Reynolds number
REAL(REYNO); REYNO=INVEL*DIAM/ENUL
REYNO
  ** Prandtl number
REAL(PRANDT,COND); COND=2.58E-02; PRANDT=CP1*ENUL*RHO1/COND
PRANDT
  ** Nusselt number by 0.3*REYNO**0.6*PRANDT**(1/3) formula
REAL(NUSN); NUSN=0.3*REYNO**0.6*PRANDT**(1/3)
NUSN
  ** Summa of temperatures in solid
(MAKE STSL is 0.)
(STORE1 of STSL is SUM(TEM1) with swpfin!if(prps.eq.109))
  ** Number of solid cells
(MAKE SNSL is 0.)
(STORE1 of SNSL is SUM(1) with swpfin!if(prps.eq.109))
  ** Average solid temperature
(MAKE AVTS is 0.)
(STORE1 of AVTS is STSL/SNSL with swpfin)
  ** The heat supplied to solid per unit volume.
     This is linear function of Z coordinate: 1.e+5*Z
     The average value of heat per unit volume is 0.5*(1.e+5*PLEN)
     where PLEN is the rod length (maximum of Z coor.)
REAL(HPUV); HPUV=0.5*1.e+5*PLEN
  ** Total rod volume
(MAKE VOLS is 0.)
(STORE1 of VOLS is SUM(VOL) with swpfin!if(prps.eq.109))
  ** Total rod surface
REAL(PARE,PI); PI=3.1415927; PARE=PI*DIAM*PLEN
  ** Nusselt number for average temteratures
(MAKE NUSS is 0.)
(STORE1 of NUSS is :HPUV:*VOLS*:DIAM:/(:COND:*$
(AVTS-:INTEM:)*:PARE:) with swpfin)

  ** Print-out into INFOROUT file
(PRINT of Solid_Temp_Sum is STSL)
(PRINT of Solid_Number_Sum is SNSL)
(PRINT of Averag_Sol_Temp is AVTS)
(PRINT of Total_Solid_Vol is VOLS)
(PRINT of Average_Nusselt is NUSS)

STORE(CP1,KOND,ENUL,DEN1) ! provision for printing Prandtl
(STORED VAR PRAN IS CP1*DEN1*ENUL/KOND WITH IMAT<100)
  INFORM13END
  Group 15. Terminate Sweeps
 LSWEEP  =       200
 RESFAC  = 1.000000E-03
  Group 17. Relaxation
 CONWIZ  = T
  Group 20. Preliminary Printout
 DISTIL  =    T
 EX(P1  ) =  4.223E-05 ;EX(U1  ) =  1.004E-02
 EX(V1  ) =  1.250E-03 ;EX(W1  ) =  5.888E-07
 EX(PRPS) =  6.535E+00 ;EX(TEM1) =  2.431E+01
 EX(PRAN) =  6.784E-01 ;EX(DEN1) =  5.531E+01
 EX(ENUL) =  2.051E-02 ;EX(KOND) =  3.217E-02
 EX(CP1 ) =  1.022E+03
  Group 22. Monitor Print-Out
 IXMON   =        29 ;IYMON  =        20 ;IZMON  =         6
 TSTSWP  =        -1
 
 GVIEW(P,0.000000E+00,0.000000E+00,1.000000E+00)
 GVIEW(UP,0.000000E+00,1.000000E+00,0.000000E+00)
 
> DOM,    SIZE,        2.000000E-01, 1.000000E-01, 1.000000E-01
> DOM,    MONIT,       7.125000E-02, 4.875000E-02, 5.500000E-02
> DOM,    SCALE,       1.000000E+00, 1.000000E+00, 1.000000E+00
> DOM,    SNAPSIZE,    1.000000E-02
 
> OBJ,    NAME,        INLET
> OBJ,    POSITION,    0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.000000E+00, 1.000000E-01, 1.000000E-01
> OBJ,    GEOMETRY,    cube3t
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        INLET
> OBJ,    PRESSURE,      0.000000E+00

     ! note the use of In-Form statements
> OBJ,    infsrc_p1,   RHO1*INVEL with AREA    
> OBJ,    infsrc_u1,   invel with ONLYMS       
> OBJ,    infsrc_tem1, intem with ONLYMS
   > OBJ,    VELOCITY,      1.000000E-02, 0.000000E+00, 0.000000E+00
   > OBJ,    TEMPERATURE,   INTEM
 
> OBJ,    NAME,        OUTLET
> OBJ,    POSITION,    2.000000E-01, 0.000000E+00, 0.000000E+00
> OBJ,    SIZE,        0.000000E+00, 1.000000E-01, 1.000000E-01
> OBJ,    GEOMETRY,    cube12t
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        OUTLET
> OBJ,    PRESSURE,      0.000000E+00
> OBJ,    TEMPERATURE,   SAME
> OBJ,    COEFFICIENT,   1.000000E+03
  
> OBJ,    NAME,        ROD
> OBJ,    POSITION,    3.000000E-02, 3.000000E-02, 0.000000E+00
> OBJ,    SIZE,        4.000000E-02, 4.000000E-02, 1.000000E-01
> OBJ,    GEOMETRY,    cylinder
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        BLOCKAGE
> OBJ,    MATERIAL,    109,POLYSTYRENE at 27 deg C
     ! note the use of In-Form statements
> OBJ,    infsrc_tem1, 1.e+5*ZG with VOLU  
> OBJ,    infini_tem1, INTEM    

STOP