[CIG-SHORT] Fault-slip vector plot

Brad Aagaard baagaard at usgs.gov
Mon Apr 11 12:17:58 PDT 2011


The python script that Charles provided requires the Enthought Mayavi 
package. If you are using a Linux or Darwin system and use a package 
manager, a mayavi package may be available for easy installation. 
Building Mayavi from source can be complicated due to its dependencies, 
so it may be easier to write your own post-processing script to compute 
the principal stresses.

Brad


On 04/11/2011 12:09 PM, Charles Williams wrote:
> Attached is a simple Python script to compute principal axes, along with the
> associated .cfg file. You will need to edit the .cfg file for your particular
> problem. Let me know if this works OK for you -- I haven't really tested it. If
> I'm remembering correctly, you will end up with one vector for each principal
> axis direction, which will allow you to plot each principal axis separately as a
> glyph.
>
> Charles
>
>
>
>
>
> On 12/04/2011, at 4:47 AM, Brad Aagaard wrote:
>
>>  On 04/11/2011 09:01 AM, luigi vadacca wrote:
>>>  Dear all,
>>>
>>>  I have two questions about the plot of the fault slip vector and principal
>>>  stress axes in paraview.
>>>
>>>  In figure 7.33 of the example "step11" of the pylith manual is written:
>>>
>>>  "Note that PyLith outputs slip in the fault coordinate system, so we transform
>>>  them to the global coordinate
>>>  system using the Calculator in ParaView. A more general approach involves
>>>  outputing the fault coordinate
>>>  system information and using these fields in the Calculator"
>>>
>>>  1 - How can I do this?
>>
>>  For the fault output, request that the output include the strike, dip,
>>  and normal directions in the info file using something similar to the
>>  following (you may need to adjust the name of the fault output component
>>  if you have more than one fault or name your fault component something
>>  else; you may also want to add other info fields to the output such as
>>  final slip and slip time):
>>
>>  [pylithapp.timedependent.interfaces.fault.output]
>>  vertex_info_fields = [strike_dir,dip_dir,normal_dir]
>>
>>  In ParaView you can use the calculator to take the dot product of the
>>  slip with the three directions to get the slip vector in global
>>  coordinates. For example,
>>
>>  (slip[0]*strike_dir[0] +
>>  slip[1]*dip_dir[0] +
>>  slip[2]*normal_dir[0]) * iHat +
>>  (slip[0]*strike_dir[1] +
>>  slip[1]*dip_dir[1] +
>>  slip[2]*normal_dir[1]) * jHat +
>>  (slip[0]*strike_dir[2] +
>>  slip[1]*dip_dir[2] +
>>  slip[2]*normal_dir[2]) * kHat
>>
>>>
>>>  2 - Is possible to plot the three principal stress axes directly in paraview?
>>
>>  ParaView does not supply a filter to calculate the principal stresses,
>>  so you will need to write your own post-processing script.
>>
>>
>>  Brad
>>  _______________________________________________
>>  CIG-SHORT mailing list
>>  CIG-SHORT at geodynamics.org<mailto:CIG-SHORT at geodynamics.org>
>>  http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>
> Charles A. Williams
> Scientist
> GNS Science
> 1 Fairway Drive, Avalon
> PO Box 30368
> Lower Hutt 5040
> New Zealand
> ph (office): 0064-4570-4566
> fax (office): 0064-4570-4600
> C.Williams at gns.cri.nz<mailto:C.Williams at gns.cri.nz>
>



More information about the CIG-SHORT mailing list