2.3. Setting CFD-Post Operation Through Environment Variables

There are a number of environment variables that can be used to change how CFD-Post behaves:

Environment Variable

Description/Usage

CFXPOST_USER_MACROS

Allows user-defined macros to load at start-up.

CFXPOST_USER_MACROS='macro1, macro2, '

If the macros contain user interface commands, the appropriate panels will be added to the Macro Evaluator user interface.

Example:

CFXPOST_USER_MACROS='myMacro1.cse, /home/bob/macros/myMacro3.cse'

CFXPOST_ZERO_THETA

Enables adjusting the zero-theta location in single-domain cases.

Linux: CFXPOST_ZERO_THETA='x,y,z'

Windows: CFXPOST_ZERO_THETA=x,y,z

(where x,y,z is a point not on the rotation axis)

This will be used in turbo cases to determine at which position the Theta variable will be equal to zero. By default, CFD-Post will set Theta such that the Theta values in the first encountered domain range from zero to some positive value.

Example for Linux:

CFXPOST_ZERO_THETA='1,0,0.5'

Example for Windows (no quotes):

CFXPOST_ZERO_THETA=1,0,0.5

CFX_USER_IMAGE_DATA

Enables you to display a custom logo image in the viewer.

CFX_USER_IMAGE_DATA='filepath 
xLoc yLoc xAttach yAttach scale 
alphaR alphaG alphaB transparency'

filepath: path to the image file

Only ppm, png, and jpeg files are currently supported.

xLoc, yLoc: horizontal and vertical location of the image in the viewer (0-1)

xAttach: left, center, right or none.

If set to none, xLoc is used.

yAttach: top, center, bottom or none.

If set to none, yLoc is used.

scale: image size relative to viewer size (0-1)

If set to 0, original pixels are shown regardless of the viewer size.

alphaR, alphaG, alphaB: red/green/blue components (normalized to 0-255) of alpha (the color that will represent 100% transparency)

transparency: overall bitmap transparency (0-1)

Example:

To display image myImage.ppm in the right-bottom corner, occupying 12% of the viewer size, making the pure green color represent 100% transparent, and setting the overall transparency to 60%, use:

CFX_USER_IMAGE_DATA=
'/logos/myImage.ppm 0 0 right bottom 0.12 0 255 0 0.6' 

VIEWER_EYE_POINT

Allows placing the viewer camera to left/right eye position.

It can be used for composing stereo images and movies

VIEWER_EYE_POINT='cameraZ eyeDist mode'

cameraZ: Z location of the camera (must be less than –1.0; –5.0 is optimum)

Smaller numbers bring the camera closer to the scene (and also widen the camera angle), larger numbers move it further.

eyeDist: distance between the eyes (0.1 is optimum)

mode: 0 = normal, 1 = left eye, 2 = right eye, 3 = left/right eye (two viewports), 4 = right/left (two viewports), 5 = stereo

Example:

VIEWER_EYE_POINT='–5.0 0.1 0'

CFX_BACKGROUND_ROTATE

Applicable to spherical backgrounds only.

CFX_BACKGROUND_ROTATE='x y z angle'

x,y,z: specifies a direction vector (in the global coordinate system) about which to apply a rotation to the background image

angle: specifies the rotation angle, in degrees, of the background image

The rotation angle is clockwise looking in the direction of the specified direction vector.

Example:

If you start CFD-Post with the mountain scenery background, the background will appear upright when the Y axis is "up". You may find that the geometry of your CFD mesh has its "top" side pointing in the X axis direction. You can rotate the background image so that it appears upright when the X axis is "up" by rotating the image about the Z axis by -90 degrees, as follows:

CFX_BACKGROUND_ROTATE='0 0 1 -90'