(SOURCE of VAR_NAME at PATCH_NAME is FORMULA)
where:
(SOURCE of VAR_NAME at VR_OBJECT_NAME is FORMULA)
The VR_OBJECT_NAME also marks the part of the domain inside which the source will be applied; but it does so in geometry-related terms by way of lines in the Q1 file starting with >OBJ.
The object-describing lines usually appear below the source-describing lines in the Q1 file; but this is not necessary.
This is also the case when no CONDITION is supplied.
This too can have the !LINE modifier.
Some examples of the setting of sources in VR objects are presented below.
The prescribed heat flux from the pipe varies with (z-direction) distance along the pipe, which is represented as a cylinder with the properties of steel.
The Nusselt number is to be calculated, in order:
The flow is laminar. The Reynolds number equals 26 and the Prandtl Number 0.7 .
Echo InForm settings for Group 13 INFORM13BEGIN (SOURCE of TEM1 at PIPE is 1.e+5*ZG with VOLU)
** Pipe length REAL(PLEN); PLEN=0.1 ** Reynolds number REAL(REYNO,WIN,DIAM); WIN=0.01; DIAM=0.04; REYNO=WIN*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(NUS0); NUS0=0.3*REYNO**0.6*PRANDT**(1/3) NUS0
** Sum of temperatures in solid (MAKE STSL is 0.) (STORE1 of STSL is SUM(TEM1) with tstfin!if(prps.eq.111)) ** Number of solid cells (MAKE SNSL is 0.) (STORE1 of SNSL is SUM(1) with tstfin!if(prps.eq.111)) ** Average solid temperature (MAKE AVTS is 0.) (STORE1 of AVTS is STSL/SNSL with tstfin) ** The heat supplied to solid per unit volume REAL(HPUV); HPUV=1.e+5*0.5*PLEN ** Total pipe volume (MAKE VOLS is 0.) (STORE1 of VOLS is SUM(VOL) with tstfin!if(prps.eq.111)) ** Total pipe 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-18.)*:PARE:) with tstfin) ** 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) INFORM13END
The (PRINT In-Form statement dumps values of calculated Nusselt number in a special INFOROUT file as
************************************************************ SOLID_TEMP_SUM = 79515.9 SOLID_NUMBER_SU = 2000.00 AVERAG_SOL_TEMP = 39.7579 TOTAL_SOLID_VOL = 1.250001E-04 AVERAGE_Nusselt = 3.54410 ************************************************************
The calculated Nusselt number equals 3.5
As was expected the results have shown insignificant change of the temperature field in the Z direction.
The complete Q1 file is library case v146.
This example simulates heat exchange betweeen an array of hot pipes and a stream of cold air across it.
The cold air with temperature of 18 degrees moves into the domain in a direction of a X axis. The domain boundaries in Y and Z directions are opened. The pipes with a hot heat-transport medium are simulated by the cylinder shapes with properties of steel. The direction of a symmetry axis of a pipes coincides a direction of Z axis.
The flow is laminar. The Reynolds number equals 26.
The heat input on a cylinders surface is executed by the introduction of a non-uniform heat source.
The In-Form is used for the setting of a non-uniform heating source on the pipe length.
The heating source per unit volume of a pipe array increasing in Z direction can be set as
(SOURCE of TEM1 at PIPE1 is 1.e+5*ZG with VOLU)
(SOURCE of TEM1 at PIPE2 is 1.e+5*ZG with VOLU)
etc.
The formula for Nusselt number is
Nu = 0.3 Re ^{0,6} Pr ^{1/3}
where the Prandtl number equals 0.7
For a data of this problem the Nusselt number equals 1.9
Also the In-Form is used for calculation of average Nusselt number without the creation special Ground code similarly to the previous example. The results are dumped in a special INFOROUT file as
************************************************************ SOLID_TEMP_SUM = 385547. SOLID_NUMBER_SU = 9370.00 AVERAG_SOL_TEMP = 41.1470 TOTAL_SOLID_VOL = 8.886132E-04 AVERAGE_Nusselt = 3.38313 ************************************************************
Calculated average Nusselt number equals 3.38
As in the previous example the results have shown insignificant change of the temperature field in the Z direction.
The complete Q1 file is library case v147.
This case modeling a heat exchange by heat conductivity about a filament. The filament is simulated by the cylinder shape with properties of steel. It is surrounded by air. The air temperature has constant significance 18 degree at all domain boundaries.
The filament is heated up by a electrical current which occurs in the conductor at presence the filament votage. The emitted heat is calculated as the filament votage divided by thermal resistance which is function of the conductor temperature.
The VR editor can not set any form of dependence of a source from solved or stored variables. In this case it should use In-Form.
INFORM13BEGIN (SOURCE of TEM1 at HEATING is 220^2/(0.1*TEM1) with VOLU) (STORED of PRPS at HEATING is 111 with TSTSTR) INFORM13END
In-Form can be used for the setting or change of the material number of VR object. In this case in the beginning, the material of conductor is described as the steel. In other words PRPS variable assigns significance 111 in cells located inside HEATING VR object.
The Q1 file of this problem data library case v148.
In this example modeling of a heat exchange by convection is considered at a cross flow of cold air about a single hot pipe. The cold air with temperature of 18 degrees moves into the domain in a direction of a X axis.
The flow is laminar. The Reynolds number equals 26.
The pipe with a hot heat-transport medium is simulated by the cylinder shape with properties of steel. The direction of a symmetry axis of a pipe coincides a direction of Z axis.
The total heat at a cylinder object is calculated from formulas for the heat tranfer from hot air to cold air through a pipe wall as
QFlux=U Area_{Outside} (Tem_{Hot}-Tem_{Wall})
where the heat transfer coefficient from hot air to a pipe wall is
U=1./(Area_{Outside}/(Alfa*Area_{Inside})+1./(Cond_{Steel} /Thick_{Wall}))
the heat exchange coefficient from hot air to a pipe wall is
Alfa=Nu Cond_{Air}/(2 Radius_{Inside})
and Nu = 4.364 for a constant heat flux from hot air to the pipe wall.
The heating source per whole PIPE object can be set by In-Form as
(SOURCE of TEM1 at PIPE is :QFlux: with WHOLOB!LINE)
where LINE flag is used for setting a linearised source.
For calculation of Nusselt number can use the formula of which is fair for a external cross flow of a round pipe, located in depth of a pipe array:
Nu = 0.3 Re ^{0,6} Pr ^{1/3}
where the Prandtl number equals 0.7
For a data of this problem the Nusselt number equals 1.9
The diameter of a cylinder can be used the characteristic size.
Nu = Alfa Diam_{Inside} / Cond_{Air}
It is possible to calculate Nusselt number by In-Form without programming of a special Ground code by next formula:
Alfa= Q_{total} / Area_{pipe} / (T_{Wall} - T_{cold})
where Q_{total} is a total heat flux
Area_{pipe} is a total pipe area;
T_{Wall} is a average pipe temperature;
T_{cold} equals 18.
Echo InForm settings for Group 13 INFORM13BEGIN Pi: Pi number REAL(Pi); Pi=3.14159 PLEN: Pipe length REAL(PLEN); PLEN=0.1 RadOu: The outside radius of the pipe REAL(RadOu); RadOu=0.02 RadIn: The inside radius of the pipe REAL(RadIn); RadIn=0.015 ArOu: The area of outside pipe surface REAL(ArOu); ArOu=2*Pi*RadOu*PLEN ArIn: The area of inside pipe surface REAL(ArIn); ArIn=2*Pi*RadIn*PLEN Thick: The thickness of a pipe wall REAL(Thick); Thick=RadOu-RadIn CondA: The thermal conductivity of the air REAL(CondA); CondA=0.0258 CondS: The thermal conductivity of the steel REAL(CondS); CondS=43. Nu = 4.364 for a constant heat flux from hot air to the pipe wall. REAL(Nu); Nu=4.364 Alfa: The heat exchange coefficient from hot air to a pipe wall REAL(Alfa); Alfa=Nu*CondA/(2.*RadIn) U: The heat transfer coefficient from hot air to a pipe wall REAL(U); U=1./(ArOu/(Alfa*ArIn)+1./(CondS/Thick)) Thot: The average temperature of hot air inside a pipe REAL(Thot); Thot=50 QFlux: The heat flux from hot air to cold air through a pipe wall CHAR(QFlux); QFlux=:U:*:ArOu:*(:Thot:-TEM1) where TEM1 is the temperature of a pipe wall QFlux (SOURCE of TEM1 at PIPE is :QFlux: with WHOLOB!LINE) REYNO: Reynolds number REAL(REYNO,WIN,DIAM); WIN=0.01; DIAM=2*RadOu; REYNO=WIN*DIAM/ENUL REYNO PRANDT: Prandtl number REAL(PRANDT); PRANDT=CP1*ENUL*RHO1/CondA PRANDT NUSN: Nusselt number by 0.3*REYNO**0.6*PRANDT**(1/3) formula REAL(NUSN); NUSN=0.3*REYNO**0.6*PRANDT**(1/3) NUSN STSL: Summa of temperatures in solid (MAKE STSL is 0.) (STORE1 of STSL is SUM(TEM1) with tstfin!if(prps.eq.111)) SNSL: Number of solid cells (MAKE SNSL is 0.) (STORE1 of SNSL is SUM(1) with tstfin!if(prps.eq.111)) AVTS: Average solid temperature (MAKE AVTS is 0.) (STORE1 of AVTS is STSL/SNSL with tstfin) ** The heat supplied to solid per unit volume HTFL: The heat flux from hot air to cold air through a pipe wall (MAKE HTFL is 0.) (STORE1 of HTFL is :U:*:ArOu:*(:Thot:-AVTS) with tstfin) NUSS: The average Nusselt number (MAKE NUSS is 0.) (STORE1 of NUSS is HTFL*:DIAM:/(:CondA:*$ (AVTS-18.)*:ArOu:) with tstfin) ** 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_Heat_Flux is HTFL) (PRINT of Average_Nusselt is NUSS) INFORM13END
The (PRINT In-Form statement dumps values of calculated Nusselt number in a special INFOROUT file as
************************************************************ SOLID_TEMP_SUM = 7175.29 SOLID_NUMBER_SU = 200.000 AVERAG_SOL_TEMP = 35.8765 TOTAL_HEAT_FLUX = 0.499394 AVERAGE_Nusselt = 3.44671 ************************************************************
The calculated Nusselt number equals 3.4
The Q1 file is library case v149.
This example simulates laminar flow about a ledge.
The circulating zone existing for ledge essentially worsens a flow structure. For removal of this circulating zone it is possible to use a turning device which should previously change a flow direction.
The turning device is simulated by BOX shape with domain properties.
It is inclined at 35 degrees concerning a Z axis and places in directly about a ledge so that completely overlaps a inlet flow channel.
The turning device is simulated by the introduction of sources for a velocity components as
Source_{U1} = -Coeff V1
Source_{V1} = Coeff U1
The VR editor can not set a source significance of which depends from other solved or stored variables. It can be made easily using of the In-Form ability.
Echo InForm settings for Group 13 INFORM13BEGIN REAL(COEF); COEF=10. (SOURCE of U1 at TURNING is :COEF:*(-V1) with VOLU) (SOURCE of V1 at TURNING is :COEF:*U1 with VOLU) INFORM13END
Flow calculations have shown that the effect of convergence depends from values of the COEF proportionality constant.
The calculations with constants from 0.1 up to 5 do not require relaxation parameters and have steady convergence.
The calculations with 5 and 10 constants values well converge with relaxation parameters RELAX(U1,FALSDT,10.) and RELAX(V1,FALSDT,10.).
Velocity vectors for COEF=5 and COEF=10.
The calculation with 20 constant value converge with more strong relaxation parameters RELAX(U1,FALSDT,1.) and RELAX(V1,FALSDT,1.).
Velocity vectors for COEF=20.
The calculations with 50 and 100 constants values require relaxation parameters RELAX(U1,FALSDT,0.01) and RELAX(V1,FALSDT,0.01) and iteration number more 500.
Velocity vectors for COEF=50 and COEF=100.
The calculation with 500 constants value require strong relaxation parameters RELAX(U1,FALSDT,0.001) and RELAX(V1,FALSDT,0.001) and iteration number more 2000.
Velocity vectors for COEF=500.
The Q1 file is library case v150.
As previous this example simulates laminar flow about a ledge. The device a varying direction of a flow is located in a corner part of a channel.
This device is simulated by BOX shape with domain properties.
It is inclined at 45 degrees concerning a Z axis.
The turning device is simulated by the introduction of sources for a velocity components as
Source_{U1} = Coeff ( V1 / tangent(Angl) - U1 )
Source_{V1} = Coeff ( U1 * tangent(Angl) - V1 )
where Angl is a angle of new direction of flow.
The VR editor can not set a source significance of which depends from other solved or stored variables. It can be made easily using of the In-Form ability.
Echo InForm settings for Group 13 INFORM13BEGIN REAL(ANGL); ANGL=3.14/4. REAL(TANG); TANG=TAN(ANGL)+TINY REAL(COEF); COEF=10. (SOURCE of U1 at TURNING is :COEF:*(V1/:TANG:-U1) with VOLU!LINE) (SOURCE of V1 at TURNING is :COEF:*(U1*:TANG:-V1) with VOLU!LINE) INFORM13END
Flow calculations for values of the COEF proportionality constant from 1 to 1.e4 have a steady convergence. The setting of the special relaxation parameters is not required.
Velocity vectors for COEF=10.
Velocity vectors for COEF=100.
Velocity vectors for COEF=1000.
Velocity vectors for COEF=10000.
The Q1 file is library case v151.
This example illustrates the application to VR-objects of sources which vary with time, in accordance with how the temperature varies at some other location in the field.
The domain contains a heated block and fan which are represented by two box shapes. They are located parallel to one another and are rotated 45 degrees about the Z axis.
The fan cools the block by increasing the rate of flow of air.
The fan is simulated by the introduction of sources for velocity components as follows:
Source_{U1} = Rho Vel_{Inlet} Area_{Fan} Vel_{Inlet} Cos(Angl)
Source_{V1} = Rho Vel_{Inlet} Area_{Fan} Vel_{Inlet} Sin(Angl)
where Angl is a angle of fan position.
The form of the source is simple; so it could be set by the VR editor.
However there are conditions: the fan is to be switched on automatically when the temperature at a specific point exceeds a defined value and switched off when it falls below.
This can be easily effected by way of In-Form.
Echo InForm settings for Group 13 INFORM13BEGIN INTEGER(IXP,IYP); IXP=NX/2; IYP=NY/2 ! declarations and REAL(ANGL); ANGL=3.14159/4. ! settings REAL(INVEL); INVEL=0.4 REAL(AREA); AREA=0.05*0.1 REAL(PSORC); PSORC=RHO1*INVEL*AREA REAL(USORC); USORC=INVEL*COS(ANGL)*PSORC REAL(VSORC); VSORC=INVEL*SIN(ANGL)*PSORC ! define velocity sources, per whole FAN object, depending on ! SWTH being positive (SOURCE of U1 at FAN is :USORC: with WHOLOB!IF(SWTH.GT.0)) (SOURCE of V1 at FAN is :VSORC: with WHOLOB!IF(SWTH.GT.0)) ! declare and set the critical temperature REAL(TLIM); TLIM=40. ! create the variable SWTH to be used by EARTH (MAKE of SWTH is 0) ! state that SWTH is to be calculated as temperature at the ! point [ xp, yp ] minus TLIM, at the end of the time step (STORE1 SWTH is TEM1[:IXP:,:IYP:]-:TLIM: with TSTFIN) INFORM13END
The fan is switched on at the third time step. On the fourth step it is switched off. Then on the sixth step the fan is switched on again.
Velocity vectors for first time step.
Velocity vectors for second time step.
Velocity vectors for third time step.
Velocity vectors for fourth time step.
Velocity vectors for fifth time step.
Velocity vectors for sixth time step.
The Q1 file is library case v152.
nip/dbs