Encyclopaedia Index

Setting of sources and sinks for VR objects by In-Form

Contents

  1. Introduction
  2. Examples of use
    1. Simulation of a non-uniform heat source
    2. Simulation of a non-uniform heat source about pipes array
    3. Simulation of a heat exchange by heat conductivity about filament
    4. Simulation of a heat exchange about hot pipe
    5. Simulation of a device for turning of a flow
    6. Simulation of a device for change of a flow direction
    7. Simulation of a automatically switched-on fan


1. Introduction

1.1 Sources for (1) patches and (2) objects

1.2 Conditions


2. Examples of use

Some examples of the setting of sources in VR objects are presented below.

2.1 The simulation of a non-uniform heat source.

Purpose

The In-Form features illustrated by this case are:
  1. creation of a source which depends on position within an object;
  2. deduction of an average-for-the-object quantity;
  3. print-out of selected information to a special file.

Description of flow

It concerns heat transfer from a long heated pipe to a cold air stream in (x-direction) cross-flow.

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:

  1. to determine whether it varies with distance along the pipe, and
  2. to compare its value with that which would be computed from a text-book formula, namely:
    Nu = 0.3 Re 0.6 Pr 1/3

The flow is laminar. The Reynolds number equals 26 and the Prandtl Number 0.7 .

In-Form statements in the Q1 file

The complete Q1 file is library case v146.


2.2 The simulation of a non-uniform heat source about pipes array.

Description

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.

In-Form statements in the Q1 file

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

Graphical display of results

The temperature field on the XY plane is here.

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.


2.3 The simulation of a heat exchange by heat conductivity about filament.

Description

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.

In-Form statements in the Q1 file

The heating source per unit volume of the HEATING VR object can be set as



  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.

Graphical display of results

The temperature field is here.

The Q1 file of this problem data library case v148.


2.4 The simulation of a heat exchange about hot pipe.

Description

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 AreaOutside (TemHot-TemWall)

where the heat transfer coefficient from hot air to a pipe wall is

U=1./(AreaOutside/(Alfa*AreaInside)+1./(CondSteel /ThickWall))

the heat exchange coefficient from hot air to a pipe wall is

Alfa=Nu CondAir/(2 RadiusInside)

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 DiamInside / CondAir

It is possible to calculate Nusselt number by In-Form without programming of a special Ground code by next formula:

Alfa= Qtotal / Areapipe / (TWall - Tcold)

where Qtotal is a total heat flux

Areapipe is a total pipe area;

TWall is a average pipe temperature;

Tcold equals 18.

In-Form statements in the Q1 file

The appropriate In-Form statements are as follows:



  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

Graphical display of results

The temperature field is here.

The Q1 file is library case v149.


2.5 The simulation of a device for turning of a flow.

Description

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

SourceU1 = -Coeff V1

SourceV1 = 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.

In-Form statements in the Q1 file

The sources for a velocity components at TURNING object can be set by In-Form as per unit volume



  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.

Graphical display of results

Velocity vectors for COEF=0.1 and COEF=1.

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.


2.6 Simulation of a device for change of a flow direction.

Description

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

SourceU1 = Coeff ( V1 / tangent(Angl) - U1 )

SourceV1 = 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.

In-Form statements in the Q1 file

The sources for a velocity components at TURNING object can be set by In-Form as per unit volume



  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.

Graphical display of results

Velocity vectors for COEF=1.

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.


Simulation of a automatically switched-on fan

Description

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:

SourceU1 = Rho VelInlet AreaFan VelInlet Cos(Angl)

SourceV1 = Rho VelInlet AreaFan VelInlet 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.

In-Form statements in the Q1 file

The sources are set as follows:



  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.

Graphical display of results

Results of calculation are:

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