140 likes | 228 Views
SETTING PROPERTIES USING INFORM. The use of In-Form is introduced by means of examples to the user get acquainted with the syntax. A sequence of workshops present two ways of setting materials properties This first way explores the VR Editor capabilities and the use of PROPS file
E N D
SETTING PROPERTIES USING INFORM • The use of In-Form is introduced by means of examples to the user get acquainted with the syntax. • A sequence of workshops present two ways of setting materials properties • This first way explores the VR Editor capabilities and the use of PROPS file • The second way uses the In Form. • There are other ways, usually employed in the past, but are still useful –> go to Properties-old
PROPERTY LIST PIL variable SI units nature RHO1 kg/m**3 first - phase density DRH1DP m**2/Newton proportionate change with pressure RHO2 kg/m**3 second - phase density DRH2DP m**2/Newton proportionate change with pressure kinematic turbulent contribution to effective ENUT m**2/s viscosity ENUL m**2/s kinematic laminar (reference) viscosity PRNDTL(indvar) > 0 dimensionless the Prandtl or Schmidt number dimensionless or PRNDTL( indvar) < 0 if indvar is enthalpy or temperature joules*degC/m PRNDTL(indvar) < 0 m**/s if indvar represents another scalar according to PHINT(indvar) equilibrium interface value for the first phase indvar according to PHINT(indvar) equilibrium interface value for the second phase indvar temperature when first - phase enthalpy is solved TMP1 degCelsius for temperature when second - phase enthalpy is TMP2 degCelsius solved for EL1 m first - phase turbulence length EL2 m second - phase turbulence length CP1 joule/(kg*degC) constant - pressure specific heat of phase 1 CP2 joule/(kg*degC) constant - pressure specific heat of phase 2 proportionate change of first - phase specific volume (i.e. reciprocal of density) with DVO1DT 1/degC tempe rature proportionate change of second - phase specific volume (i.e. reciprocal of density) with DVO2DT 1/degC temperature absorptivity = proportion of radiation which is EMISS 1/m absorbed per unit length proportion of radiation which is scat tered per unit SCATT 1/m length
WORKSHOP ON SETTING MATERIAL PROPERTIES USING INFORM Two workshops are based on the 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 using Ideal Gas Law (IMAT = 2). Consider the reference pressure and temperature of 105Pa, 273K. • The inlet velocity and temperature is 0.15m/s and 20C. The north wall is held at constant temperature of 100C. The q1 file of this case is available for download (wksh_if_prps1)
WORKSHOP ON SETTING MATERIAL PROPERTIES USING PROPS file The PROPS file (stored at phoenics\d_earth directory) is where phoenics stores its properties lybrary. Lets inspect the PROPS file… One can edit the PROPS file as well as add new materials. If one adds a new material the IMAT range has to be obeyed: 0 – 59 – Gases 60-99 – Liquids 100 – 197 – Solids The inconvenient is the fact that if you change computers you also have to move the edited PROPS file to the new computer
SETting PRoPertieS by selecting materials When one material fills the whole domain the following statement in the Q1-file suffices: SETPRPS (argument1, argument2) where: • argument1 = 1 or 2, according to the phase in question, and • argument2 is the reference index of the material in the PROPSfile, IMAT, which appears between < and >: brackets at the left-hand border of the file.
EXAMPLE: SETPRPS For example: SETPRPS(1,0) dictates that the properties will be those of atmospheric air, because that is the significance of IMAT=0 . Likewise, SETPRPS(2,67) would set the second-phase fluid to be water with the properties pertaining to 20 degrees Celsius.
Setting properties which vary in accordance with formulae coded in GXname files The workshop problem is set up within VR by selecting material (2): “air as an Ideal Gas”. If the user inspect the PRPS file for IMAT =2 he will find for RHO1 and ENUL the entries GRND5 and GRND2. They set the properties in accordance with GREX files, i.e. , fortran coded lines which perform as indicated below: RHO1=GRND5 selects density= RHO1B*(p1+PRESS0)/(t1+TEMP0) The gas constant is, 1/RHO1B ENUL= GRND2 set ENUL= ENULA + ENULB * t1 + ENULC * t1 ** 2 . Inspect RESULT file and check the constants rho1a&b, enula,b&c. The whole problem could be set within q1 file declaring the constants rhoa&b as well as enula,b&c, also setting rho1=grnd5 and enul=grnd2. This is the so called ‘old fashion’ way to set up properties.
RESULTS WKSH_IF_PRPS(1) TEMPERATURE Contour plots of temperature, density and kinematic viscosity for future comparison purposes. The results come from a q1 file selecting material (2), no property formulae were inserted so far, just built in formulas. Go to slide (6). DENSITY ENUL
INFORM SETTINGS Properties are set by In-Form with the command PROPERTY: (PROPERTY of VAR at Patchname is Formula [with Optional] ) With is a limitation by IMAT, TIM, or other PIL variables. Also the IF conditional may be applied Example1: (PROPERTY of RHO1 at BLOCK1 is 5.2*TEM1 + 1000 with IF(TIM >100)) Means that rho1 at patch name BLOCK1 is set by the formula above only for time greater than 100 Example2: (PROPERTY of RHO1 is 5.2*TEM1 + 1000 with IMAT >100) Means that rho1 is set by the formula at the cells where imat >100, i.e., only for solid materials)
INFORM SETTINGS FOR WKSH_IF_PRPS(2) At group 9 insert the lines below: Inform9Begin REAL(EA,EB,EC)! Declares three real constants EA=-4.946790E-06 EB=4.58394E-08 EC=8.097400E-11 evaluate rho1 using Ideal Gas Law (PROPERTY RHO1 IS (P1+PRESS0)/(287*(TEM1+TEMP0))) evaluate enul as a function of the temperature (PROPERTY ENUL IS EA+EB*(TEM1+TEMP0)+EC*(TEM1+TEMP0)^2) (PROPERTY CP1 IS 1004)! Sets specific heat thermal conductivity is transmitted thru PRNDTL(TEM1) in G9 Inform9End The statements Inform_Begin and Inform_End always start at the 3rd column. You are asked to compare your results against the results on slide(4) If you don’t succeed writing these lines, download wksh_if_prps(2)
2nd WORKSHOP ON SETTING MATERIAL PROPERTIES USING INFORM The proposition now is to insert inside the pipe an obstruction like an orifice of material 198 (solid&friction). In order to do so, it will be used the command INITIAL to set the material aluminum at the correct position. (INIT[IAL] of Var [at PatchName] is Formula [with Options] ) sets a initialization 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: INFOB_n IMAT=iprp IF(condition)
INFORM SETTINGS FOR WKSH_IF_PRPS(4) At group 7 insert STORE(PRPS) At group 11 insert the lines below: Inform11Begin define the patch where material 198 will be set in: PATCH(BLCK,VOLUME,1,1,NY/2,NY,NZ/6, NZ/6,1,1) set prps to material 198 (INITIAL OF PRPS AT BLCK IS 198) Inform11End Note: PATCH command allow definitions like fractions of the NZ, NY and NX. Their advantage lies on the independence of the number of cells in each direction. For this case, the patch will be always at half of NY cells and at 1/6 of NZ cells, no matter how large or small NY and NZ are.
RESULTS FOR WKSH_IF_PRPS(4) • Compare your results against the velocity field after orifice. The relaxation setting must be adjusted from previous wksh. • If you don’t succeed writing these lines, download wksh_if_prps(3) • As an alternative to , one could insert object directly from VR, download wksh_if_prps(4) to check it out.