[Paraview] Script to save avg value in an array

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Aug 9 13:24:10 EDT 2013


Here are the steps:

+ Open Data file, hit apply
+ Create calculator with the reader selected. set the StressXX expression,
hit apply
+ Create another calculator with the first calculator selected (this is
different from your state file). Set the StrainXX expression; hit apply
+ Create "Integrate Variables" filter with the second calculator selected.
Hit Apply. A spreadsheet view will be created with 1 row.
+ Select that 1 row my clicking on it. Now create "Plot Selection Over
Time" filter. Hit apply. That will show the plot over time. You can change
the variables plotted by using the Properties panel.

The attached video demonstrates the same.

Utkarsh

 plotting_stress_strain.ogv<https://docs.google.com/a/kitware.com/file/d/0B26kKqqTZSgGQTB4NzFTME9vdkE/edit?usp=drive_web>



On Fri, Aug 9, 2013 at 9:53 AM, Rakesh Dhote <rpd.toastmasters at gmail.com>wrote:

> Hi Utkarsh,
>
> Please find the sample results file in the zip folder for the first 3 time
> steps. You can load the state to find the expression for stressxx
>  (calculator1) and strainxx (calculator2).
>
> I would like to integrate the stress and strain separately over the whole
> domain at each time step and save it in an arrays to plot the average
> stress and avg. strain over time.
> Later I would like to plot the stress-strain relationship.
>
> Please let me know how  to do it in Paraview.
>
>
> On Wed, Aug 7, 2013 at 10:22 AM, Utkarsh Ayachit <
> utkarsh.ayachit at kitware.com> wrote:
>
>> Do you have  sample dataset that you can share and the expression you
>> want to use? That'll make it easier.
>>
>> On Wed, Aug 7, 2013 at 4:11 AM, Rakesh Dhote <rpd.toastmasters at gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I need a small favor in writing a small python script. I calculate
>> average
>> > stress in the domain based on the strain values using an analytical
>> > expression. The avg. stress value is calculated at one time instant.
>> >
>> > I need to save the average stress at every time instant  in an array ,
>> which
>> > will later be plotted to obtain the avg. stress value with time.
>> >
>> > I am not conversant with the Paraview scripting. Please let me know how
>> to
>> > write a script to acheive above task.
>> >
>> > The results are plotted in paraview in the ensight case format.
>> >
>> > Warm regards,
>> > Rakesh
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130809/18eae2f9/attachment.htm>


More information about the ParaView mailing list