PHOTON USE
  p;;;;;
 
  vi z
  con temp z 5 fi;0.0001
  pause; cl;  con cp1 z 5 fi;0.0001
  msg                         specific heat formulae
  pause; cl;  con s5cp z 5 fi;0.0001
  msg                         specific heat formulae
  pause; cl;  con l3cp z 5 fi;0.0001
  msg                         specific heat formulae
  pause; cl;  con lfcp z 5 fi;0.0001
  msg                         specific heat formulae
  pause; cl;  con enul z 5 fi;0.0001
  msg                       kinematic viscosity formulae
  pause; cl;  con s5en z 5 fi;0.0001
  msg                       kinematic viscosity formulae
  pause; cl;  con l3en z 5 fi;0.0001
  msg                       kinematic viscosity formulae
  pause; cl;  con lfen z 5 fi;0.0001
  msg                       kinematic viscosity formulae
  pause; cl;  cl; con rho1 z 5 fi;0.0001 
  msg                           density formulae
  pause; cl;  con s5rh z 5 fi;0.0001
  msg                           density formulae
  pause; cl;  con l3rh z 5 fi;0.0001
  msg                           density formulae
  pause; cl;  con lfrh z 5 fi;0.0001
  msg                           density formulae
  pause; cl;  con cond z 5 fi;0.0001
  msg                       thermal conductity formulae
  pause; cl;  con s5cn z 5 fi;0.0001
  msg                       thermal conductity formulae
  pause; cl;  con l3cn z 5 fi;0.0001
  msg                       thermal conductity formulae
  pause; cl;  con lfcn z 5 fi;0.0001
  msg                       thermal conductity formulae
  pause; cl;  con ent1 z 5 fi;0.0001
  msg              enthalpy
  ENDUSE  
  
text(Set Props Using POL3, PWL3, PWLF And SPL5)
title
  Load case 277. 
LOAD($277)
  Clear the screen, so that only the following display is seen
#CLS
  Switch off expert which would distract attention
EXPERT=F
    GROUP 1. Run title and other preliminaries
TEXT(3D SQUARE CAVITY; various fluids: 763
TITLE
libref=763
  DISPLAY
  Here the configuration of case 277 is used, for the purpose of
  showing the various ways in which In-Form allows fluid properties
  to be set.
  The fluid is ethylene glycol.
  
  Specifically illustrated are:
  * properties from the polynomials in case 089
    (these are the properties used in the solution for velocity 
     and temperature)
  * a 3-part piece-wise linear function
  * a spline function
  * a multi-part piece-wise linear function from files, here called:
      DENPRP,  ENUPRP,  CPPRP and  CNDPRP,
      
  These files are provided in /phoenics/d_earth/d_core/inplib, and 
  should be copied int the working directory.   
  The print-out has been arranged to make comparison easy.

  The Q1 contains PHOTON USE commands    
  ENDDIS

REAL(THOT,TCOLD); THOT=420; TCOLD=280
    GROUP 7. Variables stored, solved & named
  Arange the variables in such an order as aids comparison  
STORE(RHO1,L3RH,S5RH,LFRH)
STORE(ENUL,L3EN,S5EN,LFEN)
STORE(CP1 ,L3CP,S5CP,LFCP)
STORE(COND,L3CN,S5CN,LFCN)
STORE(ENT1)

NAME(H1)=temp
  
  INFORM7BEGIN
  The LONGNAME feature provides reminders at RESULT-reading time  
(LONGNAME of L3RH print as 3-Piece-Wise_Linear_Density)
(LONGNAME of L3EN print as 3-Piece-Wise_Linear_Viscosity)
(LONGNAME of L3CP print as 3-Piece-Wise_Linear_Specific_Heat)
(LONGNAME of L3CN print as 3-Piece-Wise_Linear_Conductivity)

(LONGNAME of S5RH print as Spline_Curve_Density)
(LONGNAME of S5EN print as Spline_Curve_Viscosity)
(LONGNAME of S5CP print as Spline_Curve_Specific_Heat)
(LONGNAME of S5CN print as Spline_Curve_Conductivity)

(LONGNAME of LFRH print as Piece-Wise_Linear_Density_From_File)
(LONGNAME of LFEN print as Piece-Wise_Linear_Viscosity_From_File)
(LONGNAME of LFCP print as Piece-Wise_Linear_Specific_Heat_From_File)
(LONGNAME of LFCN print as Piece-Wise_Linear_Conductivity_From_File)

(LONGNAME of temp print as The_H1_Store_Is_Used_For_This)
(LONGNAME of ENT1 print as The_Enthalpy_I.E._CP*temp)
(LONGNAME of ENUL print as The_Viscosity_Actually_Used)
(LONGNAME of RHO1 print as The_Density_Actually_Used)
(LONGNAME of CP1 print as The_Specific_Heat_Actually_Used)
(LONGNAME of COND print as The_Conductivity_Actually_Used)
  INFORM7END
    GROUP 11. Initialization of variable or porosity fields
FIINIT(temp)=0.5*(THOT+TCOLD)
    GROUP 13. Boundary conditions and special sources
  ** South wall, at rest
COVAL(SOUTH,temp,1.0,TCOLD)
  ** North wall, moving
COVAL(MOVING,temp,1.0,THOT)
  Use a smaller wall velocity so as to allow larger temperature 
  variations within the cavity
COVAL(MOVING,U1,1.0,0.01)
  ** West wall, at rest
COVAL(WEST,temp,1.0,TCOLD)
  ** East wall, at rest
COVAL(EAST,temp,1.0,TCOLD)
  INFORM13BEGIN
(STORED var ENT1 is temp*CP1)
  
char(vn); vn = temp
   --------------------------------------------
   Ethylene Glycol [C2H4(OH)2] saturated liquid
   --------------------------------------------
 
  In-Form statemnts
     
    ***  polynomial ***

(property rho1 is POL3(:VN:,1082.22,1.34031,-5.63885e-3,4.97135E-6))
(property enul is 10.^(POL3(:VN:,21.5824,-.149,3.40615e-4,-2.71336E$
-7)-2)/(RHO1))
(property cp1 is POL3(:VN:,889.59,5.27817,-9.16533e-4,8.80859E-7))
(stored cond is .001*POL3(:VN:,526.92,-.88347,3.1519E-4,-2.42873E-7$
))
(property prndtl(temp) is cond/CP1)
    
  
    ***  piece-wise linear ***
(stored L3RH is PWL3(:VN:,280.,1125.,320.,1096.,370.,1060.,420.,101$
9.))
(stored L3EN is PWL3(:VN:,280.,.0409,320.,.00781,370.,.00268,420.,.$
00097)/(RHO1))
(stored L3CP is PWL3(:VN:,280.,2315.,320.,2514.,370.,2762.,420.,301$
0.))
(stored L3CN is PWL3(:VN:,280.,.2989,320.,.2685,370.,.2309,420.,.19$
35))
     
    ***  spline curve  ***
(stored S5RH is SPL5(:VN:,280.,1125.,310.,1104.,340.,1082.,380.,105$
1.,420.,1019.))
(stored S5EN is SPL5(:VN:,280.,.0409,310.,.0107,340.,.00428,380.,.0$
0182,420.,.00097)/(RHO1))
(stored S5CP is SPL5(:VN:,280.,2315.,310.,2464.,340.,2613.,380.,281$
1.,420.,3010.))
(stored S5CN is SPL5(:VN:,280.,.2989,310.,.2761,340.,.2534,380.,.22$
34,420.,.1935))
   
    ***  piece-wise linear from files  ***
 
(stored LFRH is PWLF(/phoenics/d_earth/d_core/inplib/DENPRP,:VN:))
(stored LFEN is PWLF(/phoenics/d_earth/d_core/inplib/ENUPRP,:VN:)/$
 (rho1))
(stored LFCP is PWLF(/phoenics/d_earth/d_core/inplib/CPPRP,:VN:))
(stored LFCN is PWLF(/phoenics/d_earth/d_core/inplib/CNDPRP,:VN:))
  INFORM13END
LSWEEP=250;resfac=1.e-6;ISWC1=1
RELAX(U1,FALSDT,0.1);RELAX(V1,FALSDT,0.1);RELAX(W1,LINRLX,0.1)
TSTSWP=-1;LIBREF  =     763
libref
XZPR=F;IZPRF=NZ/2;IZPRL=NZ/2;NZPRIN=1
DISTIL=T
EX(P1)=4.443E-03; EX(U1)=7.017E-04; EX(V1)=2.140E-04
EX(W1)=5.346E-05; EX(TEMP)=3.046E+02; EX(ENT1)=7.498E+05
EX(LFCN)=2.803E-01; EX(S5CN)=2.803E-01; EX(L3CN)=2.803E-01
EX(COND)=2.803E-01; EX(LFCP)=2.437E+03; EX(S5CP)=2.437E+03
EX(L3CP)=2.437E+03; EX(CP1)=2.437E+03; EX(LFEN)=2.410E-05
EX(S5EN)=2.421E-05; EX(L3EN)=2.575E-05; EX(ENUL)=2.378E-05
EX(LFRH)=1.107E+03; EX(S5RH)=1.107E+03; EX(L3RH)=1.107E+03
EX(RHO1)=1.107E+03
STOP