In this example it is assumed that some of the fluid properties, including the dynamic viscosity, are not known. However the Reynolds number, inlet velocity and a length scale are known. The flow is compressible and therefore the density is variable.
Given this information it is possible to calculate the fluid dynamic viscosity based on the Reynolds number. The Reynolds number is given by:
where is density, U a velocity scale, L a length scale and the dynamic viscosity. The velocity scale is taken as the inlet velocity, the length scale as the inlet width and the density is calculated as the average density over the inlet area.
The LIBRARY section of the CCL (CFX Command Language) file appears as follows:
LIBRARY : CEL : EXPRESSIONS : Re = 4.29E6 [ ] Vel = 60 [m s^-1] L=1.044[m] Visc=areaAve(density)@in*Vel*L/Re END END MATERIAL : Air Ideal Gas Option = Pure Substance PROPERTIES : Option = Ideal Gas Molar Mass = 2.896E1 [kg kmol^-1] Dynamic Viscosity = Visc Specific Heat Capacity = 1.E3 [J kg^-1 K^-1] Thermal Conductivity = 2.52E-2 [W m^-1 K^-1] END END END
This shows that four CEL expressions have been created. The
first three expressions define constant values that are used in the Visc
expression. The Visc
expression
calculates the dynamic viscosity based on the equation for Reynolds
number given above. Within the expression the function areaAve(density)@in
is used to evaluate the average density at the inlet.
The Visc
expression can now be used to
replace the value of Dynamic Viscosity
in the MATERIAL
> PROPERTIES
section.