[CIG-SHORT] Principle stress

Ma, Xiao xiaoma5 at illinois.edu
Wed Dec 4 22:11:07 PST 2013


Hi,
I am still trying to output the priciple stress in pylith, now when I am using the pylith_genxdmf --file=stress.h5
I get this error:
_____________________________________
assertion "0" failed: file "topology/FieldBase.cc", line 87, function: static py
lith::topology::FieldBase::VectorFieldEnum pylith::topology::FieldBase::parseVec
torFieldString(const char*)
Aborted (core dumped)
_______________________________________
What I am doing is like the following:
________________________________________
import numpy
import h5py
import matplotlib.pyplot as plt
# Load in change in tractions from coseismic simulation
h5 = h5py.File("output/stress.h5", 'r', driver="sec2")

vertices = h5['geometry/vertices'][:]
#tractions_change = h5['vertex_fields/traction_change'][0,:,:]
stress=h5['cell_fields/stress'][:]
h5.close()
pstress=(stress[:,:,0]+stress[:,:,1])/2+numpy.sqrt(((stress[:,:,0]-stress[:,:,1])/2)**2+(stress[:,:,2])**2)
h5 = h5py.File("output/stress.h5", 'a', driver="sec2")
field=h5.create_dataset('cell_fields/pstress',data=pstress[:,:])
field.attrs['vector_field_type']='other'
h5.close()
__________________________________________
I can see that in the .h5 file the pstress is already add into the cell fields.
Also for example the principle stress pstress  dimension is 500,10000, which is good , because the 500 time steps, and 10000 elments, however the vertices number is 10302, because there is a fault interface in the model, there are extra nodes.
What I want to do is that I want plot contours of pricple stress all over the mesh, using python, but the vertrices have repeated coordinates , because the fault interface.
How can I implement that ?
Best,
Xiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geodynamics.org/pipermail/cig-short/attachments/20131205/3ae89b2f/attachment.html>


More information about the CIG-SHORT mailing list