Good afternoon,
I'm looking for an example on how to use the calculator filter in a
python script.
With the calculator, I want to :
1) Extract each component of a vector array (x, y, z);
2) Apply a scalar factor on each array (for unit conversion).
Best regards,
PO
_
Here's something I did recently
calc = servermanager.filters.Calculator(Input=pderiv)
calc.ResultArrayName = 'w'
calc.AddVectorVariable = ['Vorticity', 'Vorticity', '0', '1', '2']
calc.Function = '(Vorticity).(kHat)'
calc.UpdatePipeline() # w is now element 16
This gave the vorticity in the khat
Thanks Peter, very useful !
PO
On 2-Dec-08, at 4:53 PM, Peter Brady wrote:
Here's something I did recently
calc = servermanager.filters.Calculator(Input=pderiv)
calc.ResultArrayName = 'w'
calc.AddVectorVariable = ['Vorticity', 'Vorticity', '0', '1', '2']
calc.Function = '(Vorticity).(kHat)'
c