140 likes | 245 Views
SETTING STORAGE USING INFORM. To get acquainted with the In-Form syntax it is introduced by means of examples. To begin with, it is shown the ways to set storage and evaluate new variables using In-Form. A sequence of workshops presents distinct features of In-Form to store auxiliary variables.
E N D
SETTING STORAGE USING INFORM • To get acquainted with the In-Form syntax it is introduced by means of examples. • To begin with, it is shown the ways to set storage and evaluate new variables using In-Form. • A sequence of workshops presents distinct features of In-Form to store auxiliary variables
SETTING STORAGE FOR AUXILIARY VARIABLES USING INFORM Auxiliary variables may be stored whole-field, and computed within the main equation-solving loop, for many purposes, including those of acting as intermediaries in the calculation of sources or fluid properties, and as references with which solved-for variables can be compared. Other auxiliary variables which In-Form can create are: • single real variables, • user-dimensioned real-variable arrays, and • real variables having values for each cell in a patch.
SETTING STORAGE FOR AUXILIARY VARIABLES USING INFORM • (STOR[ED] of Var [at PatchName] is Formula [with Options]) • sets a account of Var variable at region described by PATCH command with PatchName name by Formula calculated. Var is any 3D-stored variable. • The "with Options" element contains options which specify the action of statement:
SETTING STORAGE FOR AUXILIARY VARIABLES USING INFORM • The "with Options" element contains options which specify the action of statement: • ZSLFIN (by default) finish of z slab • ZSLSTR start of z slab • SWPSTR start of sweep • SWPFIN finish of sweep • TSTSTR start of time step • TSTFIN finish of time step • RESIDU residuals • CORREC corrections • INFOB_n associated with an object • IMAT=iprp material index • IF(condition)
WORKSHOP TO PROVIDE AUXILIARY VARIABLE EVALUATION AND STORAGE USING INFORM The ‘storage’ workshops are based on a single case: heat transfer in a cylindrical pipe whose parameters are described below: • The pipe radius and length are 0.05m and 7.5m with 30x30 grid. The fluid is air with constant properties (IMAT = 0). • The inlet velocity and temperature is 0.15m/s and 20oC. The north wall is held at constant temperature of 100oC. For a ‘rescue’ situation a q1 file of this case is available for download (wksh_if_sto)
WKSH_IF_STO(1) • The task of wksh_if_sto(1) is to evaluate the Fanno friction factor, Cf, for the pipe flow using In-Form. • It is defined as: • In terms of the grid variables, Cf is written as: North Wall • where W is the averaged inlet velocity, Ww is the near wall velocity and d is the distance from the wall d Ww
WKSH_IF_STO(1) • For laminar regime and fully developed flow , CfFD is 16/Re. • For comparison purposes is convenient compare the actual Cf against the fully developed one. • The RCf should approach unity for the fully developed region, otherwise it is greater than one for the developing flow region.
Writing command lines using In-Form In Group 7 provide storage for RCF: STORE(RCF) In Group 19 write the lines below: inform19begin REAL(WAVG);WAVG=0.15 define the averaged velocity Evaluate ReD using Make command: (MAKE 1 OF RED IS :WAVG:*2*YVLAST/:ENUL:) Evaluate the RCF only at patch PARE using formula: (STORED RCF AT PARE is (16/RED)*2*ENUL*W1/(WAVG^2*(RV[1&NY&] -RG[1&:NY:&] )) with SWPFIN) inform19end
RESULTS WKSH_IF_STO(1) • The friction coefficient ratio of wksh_if_sto(1) is on the side figure. • As z increases, the flow becomes fully developed and the ratio approaches 1, as expected. • For z < 4, is observed a sharp increase on RCf near the entrance due to the sudden deceleration experienced by the fluid. Friction Coefficient Ratio
WKSH_IF_STO(2) • The task of wksh_if_sto(2) is to evaluate the heat transfer from the wall, the pipe mixture temperature, and the pipe Nusselt number using In-Form. They are defined as: • The wall heat flux: • The mixture temperature • The convective heat transfer coefficient • The Nusselt number
WKSH_IF_STO(2) • For laminar regime and thermally developed flow , NuTD is 3.66 for constant wall temperature. • For comparison purposes is convenient compare the actual Nu against the fully developed one. • The RNu should approach unity for the fully developed region, otherwise it is greater than one for the developing flow region
Writing command lines using In-Form In Group 7 provide storage for RCF: STORE(RNU, TMIX,TEST,QWAL,HC) In Group 19 write the lines below: Inform19Begin REAL(TWALL);TWALL=100; define the wall temperature • Evaluate wall heat flux (global variable) (STORED QWAL AT PARE is :PRNDTL(TEM1):*(TEM1-TWALL)/( RV[1&NY&] - RG[1&:NY:&] ) with SWPFIN) • Evaluate mixture temperature (global variable) (STORED TMIX IS SSUM(TEST)*2/(WAVG*YVLAST^2) with SWPFIN) (STORED TEST IS (W1*TEM1*AHIGH) with SWPFIN) • Evaluate heat transfer coefficient (global variable) (STORED HC AT PARE IS QWAL/(TWALL-TMIX) WITH SWPFIN) • Evaluate Nusselt number ratio (global variable) (STORED RNU AT PARE IS (1/3.66)*HC*2*YVLAST/:-PRNDTL(TEM1): WITH SWPFIN) inform19end
RESULTS WKSH_IF_STO(2) • The sequence of figures shows the mixture temperature (oC), the wall heat flux (W/m2) and the Nusselt number ratio against the axial pipe distance. • For convenience wksh_if_sto(2)