Variables
dafoam_plot3dtransform Namespace Reference

Variables

 mode = sys.argv[1]
 
 inputFileName = sys.argv[2]
 
 outputFileName = sys.argv[3]
 
 scaleX = float(sys.argv[4])
 
 scaleY = float(sys.argv[5])
 
 scaleZ = float(sys.argv[6])
 
 ffd = pyBlock("plot3d", fileName=inputFileName, FFD=True)
 
 vals = ffd.vols[ivol].coef
 
 dX = float(sys.argv[4])
 
 dY = float(sys.argv[5])
 
 dZ = float(sys.argv[6])
 
 axis = str(sys.argv[4])
 
 deg = float(sys.argv[5])
 
float theta = deg * np.pi / 180.0
 
 yRef = vals[i, j, k, 1]
 
 zRef = vals[i, j, k, 2]
 
 xRef = vals[i, j, k, 0]
 

Detailed Description

This script transforms the coordinates in a plot3D file. We support three modes: scale, translate, or rotate

Usage: 

python dafoam_plot3dscale.py scale plot3d_file_input.xyz plot3d_file_output.xyz 2 2 2
This will scale the x, y, and z coordinates by a factor of 2

python dafoam_plot3dscale.py translate plot3d_file_input.xyz plot3d_file_output.xyz 1 2 3
This will translate the x, y, and z coordinates by 1, 2, and 3

python dafoam_plot3dscale.py rotate plot3d_file_input.xyz plot3d_file_output.xyz x 10
This will rotate the x, y, and z coordinates with respect to the x axis by 10 degree

Variable Documentation

◆ mode

mode = sys.argv[1]

◆ inputFileName

inputFileName = sys.argv[2]

Definition at line 23 of file dafoam_plot3dtransform.py.

◆ outputFileName

outputFileName = sys.argv[3]

Definition at line 24 of file dafoam_plot3dtransform.py.

◆ scaleX

scaleX = float(sys.argv[4])

Definition at line 27 of file dafoam_plot3dtransform.py.

◆ scaleY

scaleY = float(sys.argv[5])

Definition at line 28 of file dafoam_plot3dtransform.py.

◆ scaleZ

scaleZ = float(sys.argv[6])

Definition at line 29 of file dafoam_plot3dtransform.py.

◆ ffd

ffd = pyBlock("plot3d", fileName=inputFileName, FFD=True)

Definition at line 36 of file dafoam_plot3dtransform.py.

◆ vals

vals = ffd.vols[ivol].coef

◆ dX

dX = float(sys.argv[4])

Definition at line 50 of file dafoam_plot3dtransform.py.

◆ dY

dY = float(sys.argv[5])

Definition at line 51 of file dafoam_plot3dtransform.py.

◆ dZ

dZ = float(sys.argv[6])

Definition at line 52 of file dafoam_plot3dtransform.py.

◆ axis

axis = str(sys.argv[4])

Definition at line 73 of file dafoam_plot3dtransform.py.

Referenced by DASolver.calcFvSourceInternal().

◆ deg

deg = float(sys.argv[5])

Definition at line 74 of file dafoam_plot3dtransform.py.

◆ theta

float theta = deg * np.pi / 180.0

Definition at line 83 of file dafoam_plot3dtransform.py.

◆ yRef

yRef = vals[i, j, k, 1]

Definition at line 91 of file dafoam_plot3dtransform.py.

◆ zRef

zRef = vals[i, j, k, 2]

Definition at line 92 of file dafoam_plot3dtransform.py.

◆ xRef

xRef = vals[i, j, k, 0]

Definition at line 96 of file dafoam_plot3dtransform.py.