cfd_valuesSynopsisThe User Macro cfd_values computes derived CFD field quantities from base values in the PLOT3D format (density, momentum, and stagnation). Input Ports
ParametersThe following lists all of the parameters found in the parameter block CFDValsParams, which are accessed by the module CFDValsNodeData and the UI Macro CFDValsUI.
Output Ports
DescriptionThe module CFDValsNodeData computes derived CFD field quantities from base values in the PLOT3D format. It inputs an array of Structured Fields (5-vector data at nodes)
This module takes input in the form produced by the Read PLOT3D module, with an array of fields (multiblock) with 5 scalar components. Based on the toggle parameters, this module computes numerically derived quantities, usefull for flow visualization. Two scalar parameters, Gamma and Gas Constant may be set in the user interface. The field that cfd values receives from read plot3D has the following 5 values: density, X momentum, Y momentum, Z momentum, and stagnation. From these 5 values cfd values computes 7 new values:
The gamma constant and the gas constant are user controllable parameters, and the following variables are defined:
d = density
xm = x momentum
ym = y momentum
zm = z momentum
st = stagnation
The equations used to derive the new values are as follows:
energy = stag / d
pressure = (gamma - 1)(stag - ((0.5/d)(xm^2+ym^2+zm^2))
enthalpy = (gamma/(gamma - 1))pressure/d
mach number (M) = square_root(xm^2+ym^2+zm^2)
---------------------------------------
(d * square_root(gamma * pressure /d ))
temperature(T) = pressure / (d * gas constant)
total pressure = pressure * exp(log(x) * gamma/(gamma - 1)
where x = 1 - 0.5(gamma - 1) M * M
total temperature = T(1 + (0.5*(gamma - 1) M * M
Note that, in calculating the 7 derived quantities, cfd values uses the same assumptions about the non-dimensionality, or normalization, of data that the National Aeronautics and Space Administration's PLOT3D, and the read plot3D module themselves use. The min/max range of data is set on all blocks for consistancy. The module will compile and run in the user or express process. The reader is written in an "omethod" style in C, with a multi-block (arrays of fields) output data structure. The DVswitch module can be used to select just one of the blocks for visualization with Main-Page modules, otherwise use the ARR modules for multiblock processing. The low level code module takes a parameter block with default values as input. It only operates on Node_Data, and ignores the mesh. The user interface is in a separate macro and can be removed or replaced. Input Ports&in The input Node_Data array. Parametersgamma Specifies the gamma value to be used in the equations. A floating point value between 1 and 5, which determines the value of the constant. The formulas assume an ideal gas with a constant ratio of specific heats. The default value is 1.4. gas_constant Specifies the gas constant value to be used in the equations. A floating point value between 0 and 5, which determines the value of the gas constant. The default value is 1. do_energy Toggle the calculation of the energy. do_pres Toggle the calculation of the pressure. do_enthalpy Toggle the calculation of the enthalpy. do_mach Toggle the calculation of mach number. do_temp Toggle the calculation of the temperature. do_totpres Toggle the calculation of the total pressure. do_tottemp Toggle the calculation of the total temperature. Output Portsout Output field array with modified Node_Data. Utility MacrosThe Functional Macro CFDVals and the UI Macro CFDValsUI are used in this User Macro cfd_values. The functional macro contains an instance of the low-level module CFDValsNodeData. ExampleAn example application CFDValsEg is provided. Filesiac_proj/cfdvals/cfdvmacs.v contains the cfd_values User Macro, the CFDVals Functional Macro, the CFDValsUI UI Macro, and the example application CFDValsEg V definitions. Other NotesThe CFDValsMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level CFDValsNodeData module, executes under the process specified in its library, not the process defined in the high-level library. Authors
Ian Curington, AVS Inc. (March 97) Modifications
Paul G. Lever Contact
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL See AlsoCFDValsParams, CFDValsUI, CFDVals and CFDValsNodeData. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||