[Paraview] common calculations module

Berk Geveci berk.geveci at gmail.com
Fri Jan 27 10:43:57 EST 2006


Save the following to a .pvs file, change the equation, create your
source, load the .pvs file. Of course, make sure that the names in the
equation match the array names.

set EQUATION {RTData*7}

set kw(vtkTemp1) [$Application GetMainWindow]

set calc [$kw(vtkTemp1) CreatePVSource Calculator]
set calcWidget [$calc GetPVWidget {Equation}]
$calcWidget SetFunctionLabel $EQUATION


On 1/27/06, Daniel Goldstein <Daniel.E.Goldstein at colorado.edu> wrote:
> Simone Crippa wrote:
>
> >Hi All,
> >
> >I am wondering what is the best way to implement in Paraview often
> >recurring calculations ... maybe an example is better:
> >
> >I have to postprocess CFD data. My solver gives out pressure,
> >density, ... for each point of an unstructured grid, which I import in
> >Paraview. If I want to calculate e.g. the entropy production in the
> >whole field I open the calculator and calculate it out of the field
> >values, e.g. density, pressure and with the constant undisturbed
> >(free-stream) values.
> >
> >I feel a bit dumb to type down the equation(s) every time (in this case
> >relative easy, but sometimes it can be pretty complicated to get all the
> >braces right), so I thought that maybe I could use the "import modules"
> >functionality to first write a module (.xml and .pvsm) which
> >incorporates my equation(s) and then "filter" my dataset with this
> >module.
> >
> >Is this the recommended way? How should I do it then? ... use the
> >vtkCalculator class, somehow?
> >The problem is that I am not very good at coding xml ... actually as an
> >engineer I seldom need to code with anything more complex than Fortran
> >or Matlab. So if someone out there has solved this type of "problem"
> >before, it would be nice to know how. (In a way I can emulate :-)
> >
> >
> >Thanks, Simone
> >
> >
> >
>  Hi Simone
>     I have been looking at how to do this also.  I do CFD and also would
> like to setup some startdard post processing in Paraview.
> I do not yet have any good solution though. Perhaps a TCL script that
> calls the calculator tool with different equations?
> Has anyone come up with a way to set this up?  If anyone has some TCL
> scripts that they use to do standard post processing could
> you post some examples for us?
>
>
> Thanks
>
> Dan
>
> -----------------------------------------
> Dan Goldstein
> Research Scientist
> NorthWest Research Associates, Inc.
> Colorado Research Associates Division
> Colorado, U.S.A.
> -----------------------------------------
>
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list