CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Include Timevalue in (Python) Calculator Operation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2018, 07:56
Default Include Timevalue in (Python) Calculator Operation
  #1
New Member
 
Join Date: May 2018
Posts: 1
Rep Power: 0
weidatm is on a distinguished road
Hello everyone,


I have a question creating an animation in Paraview. I computed some complex mode and included it separated in real and imaginary part as vectors 'Real' and 'Imag' in my .vtk-Paraview-File. Inside Paraview I can apply these two vectors as deformation via 'WarpByVector' by choosing 'Real' or 'Imag' in the filter. So far so good.


My goal:
Make an animation over time which uses the information of the real and imaginary parts. For the combination of real and imaginary parts I use the 'Calculator'-Filter with an expression similar to this one:
Code:
Result Array Name: Mode_compl
 Expression: (Real_X*cos(omega_X)-Imag_X*sin(omega_X))*iHat + ...*jHat + ...*kHat
I.e. I compute a new vector with the help of my deformation vectors 'Real' and 'Imag' and some value 'omega', which stems from some 'Calculator'-operation before, e.g. with the expression
Code:
Result Array Name: omega
Expression: 5*3.14*(iHat+jHat+kHat).
In this case omega would be a constant vector with all entries equal to 5*Pi.


My Question:
Is it possible to introduce some linearily increasing time-vector t in this computation and thus make omega time-dependent:
Code:
Result Array Name: omega
Expression: t*3.14*(iHat+jHat+kHat)
where t is linearily increasing? By this the phase of the complex mode would be changed and it should start oscillating.




So far I also looked in the the 'Python Calculator' and found some way of using a 'time_value'-variable. But I could not make it work as this variable would not be created or would be always zero for me, i.e. not phase change and no oscillations were present.


How would you compute this animation? Unfortunately I don't know much about Python programming. I am aware, that I could do the computations somewhere else, e.g. Matlab, create a new .vtk-File for every timestep and load all these files together in Paraview. But I figured that it could be possible with just a single .vtk-File and internal Paraview computations alone.


Thanks for the help!
weidatm is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cyclic boundary conditions for FSI kanuk OpenFOAM Programming & Development 10 April 25, 2014 02:52
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Problems in compiling paraview in Suse 10.3 platform chiven OpenFOAM Installation 3 December 1, 2009 07:21
OpenFOAM15 paraFoam bug koen OpenFOAM Bugs 19 June 30, 2009 10:46


All times are GMT -4. The time now is 19:14.