cfd_values
Synopsis
The User Macro cfd_values computes derived CFD field quantities from base values in the PLOT3D format (density, momentum, and stagnation).
Input Ports
| Name |
Type |
Description |
|
| &in |
Node_Data[] |
Input CFD NodeData multiblock array |
|
Parameters
The following lists all of the parameters found in the parameter block CFDValsParams, which are accessed by the module CFDValsNodeData and the UI Macro CFDValsUI.
| Name |
Type |
Description |
UI Control |
|
| gamma |
double |
gamma constant (default 1.4) |
Gamma |
| gas_constant |
double |
gas constant (default 1) |
Gas Constant |
| do_energy |
boolean |
Toggle energy calculation |
Energy |
| do_pres |
boolean |
Toggle pressure calulation |
Pressure |
| do_enthalpy |
boolean |
Toggle enthalpy calculation |
Enthalpy |
| do_mach |
boolean |
Toggle mach number calculation |
Mach Number |
| do_temp |
boolean |
Toggle temperature calculation |
Temperature |
| tot_pres |
boolean |
Toggle total pressure calculation |
Total Pressure |
| tot_temp |
boolean |
Toggle total temperature calculation |
Total Temperature |
|
Output Ports
| Name |
Type |
Description |
|
| out |
Mesh+ Node_Data [] |
Output CFD Field array |
|
Description
The 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)
- density
- x-momentum
- y-momentum
- z-momentum
- stagnation
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:
- energy
- pressure
- enthalpy
- mach number
- temperature
- total pressure
- total temp
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.
Parameters
gamma
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 Ports
out
Output field array with modified Node_Data.
Utility Macros
The 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.
Example
An example application CFDValsEg is provided.
Files
iac_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 Notes
The 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 Also
CFDValsParams, CFDValsUI, CFDVals and CFDValsNodeData.
|