On Mon, Dec 12, 2011 at 7:03 PM, Benjamin Root <ben.r...@ou.edu> wrote:

> On Sat, Dec 10, 2011 at 10:36 AM, Alex Naysmith 
> <yeoman.pyt...@gmail.com>wrote:
>
>> Hello,
>>
>> I'm trying to plot the stresses in colour of a strained isoparametric
>> element.
>>
>> I have a six noded triangle with vertice coordinates
>> [(xa1,ya1),(xa2,ya2),(xa3,ya3)] = pos_a
>>
>> This triangle deforms and the new coordinate positions are
>> [(xb1,yb1),(xa2,yb2),(xb3,yb3)] = pos_b
>>
>> The remaining nodes are mid nodes also with rest and deformed coordinate
>> positions.
>>
>> To plot the edges of the triangle I use a Jacobian transformation
>> function so that the coordinates of the triangle are in Jacobian
>> coordinates xi1 and xi2 (with xi3 = 1 - xi1 - xi2). This is required as the
>> elements are quadratic with mid-nodes.
>>
>> Each interval is hard coded so that:
>> xi1 = [1.0,0.9,0.8,0.7,0.6,0.5, etc..]
>> xi2 = [0.0,0.1,0.2,0.3,0.4,0.5, etc..]
>>
>> I would like to plot the strains in colour so that the interior of the
>> triangle is filled but I don't want to hard code the Jacobian intervals as
>> this seems an awkward way of doing it.
>>
>> With strain as a function of xi1 and xi2, How can matplotlib provide a
>> continuous interior strain plot of the triangle for all the xi1 and xi2
>> values from 0 to 1?
>>
>> Regards
>>
>> Alex Naysmith
>>
>>
> Alex,
>
> Perhaps if you can provide an example figure, we might be able to better
> help you.  Right now, I am having trouble envisioning what you describe.
>
> Ben Root
>
> Ben,

I have created a script that uses one isoparametric triangle as an example.
The triangle nodes undergo a displacement, resulting in strains inside the
triangle. The new script calculates the strains inside the triangle for a
range of xi1 and xi2 barycentric coordinates and returns the global
coordinates with the corresponding strain.

I would like matplotlib to give me a nice interpolated colour plot of the
strains inside the triangle, but as the output global coordinates are not
aligned in neat rows and columns, I cannot do a straightforward meshgrid
plot with imshow.

http://bazaar.launchpad.net/~eckeroo/misc/mpl_scripts/files

There are further comments in the script that may explain things better.

I want a figure like this:
http://matplotlib.sourceforge.net/examples/pylab_examples/animation_demo.html
But for a 6 noded quadratic triangle instead of square. The intention is to
have all the triangles in the mesh display their strains with interpolated
colours.

Regards

Alex
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and 
improve service delivery. Take 5 minutes to use this Systems Optimization 
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to