Package esys :: Package escript :: Module faultsystems :: Class FaultSystem
[hide private]
[frames] | no frames]

Class FaultSystem

The FaultSystem class defines a system of faults in the Earth's crust.

A fault system is defined by set of faults index by a tag. Each fault is defined by a starting point V0 and a list of strikes strikes and length l. The strikes and the length is used to define a polyline with points V[i] such that

So strikes defines the angle between the direction of the fault segment and the x0 axis. ls[i]==0 is allowed.

In case of a 3D model a fault plane is defined through a dip and depth.

The class provides a mechanism to parametrise each fault with the domain [0,w0_max] x [0, w1_max] (to [0,w0_max] in the 2D case).

Instance Methods [hide private]
 
__init__(self, dim=3)
Sets up the fault system
 
addFault(self, strikes, ls, V0=[0.0, 0.0, 0.0], tag=None, dips=None, depths=None, w0_offsets=None, w1_max=None)
adds a new fault to the fault system.
 
getBottomPolyline(self, tag=None)
returns the list of the vertices defining the bottom of the fault tag :param tag: the tag of the fault :type tag: float or str :return: the list of vertices.
 
getCenterOnSurface(self)
returns the center point of the fault system at the surface :rtype: numpy.ndarray
 
getDepthVectors(self, tag=None)
returns the list of the depth vector at top vertices in fault tag.
 
getDepths(self, tag=None)
returns the list of the depths of the segements in fault tag.
 
getDim(self)
returns the spatial dimension :rtype: int
 
getDips(self, tag=None)
returns the list of the dips of the segements in fault tag :param tag: the tag of the fault :type tag: float or str :return: the list of segment dips.
list of float
getLengths(self, tag=None)
Returns: the lengths of segments in fault tag
 
getMaxValue(self, f, tol=1.49011611938e-08)
returns the tag of the fault of where f takes the maximum value and a Locator object which can be used to collect values from Data class objects at the location where the minimum is taken.
 
getMediumDepth(self, tag=None)
returns the medium depth of fault tag :rtype: float
 
getMinValue(self, f, tol=1.49011611938e-08)
returns the tag of the fault of where f takes the minimum value and a Locator object which can be used to collect values from Data class objects at the location where the minimum is taken.
 
getOrientationOnSurface(self)
returns the orientation of the fault system in RAD on the surface around the fault system center :rtype: float
escript.Data object or numpy.ndarray
getParametrization(self, x, tag=None, tol=1.49011611938e-08, outsider=None)
returns the parametrization of the fault tag in the fault system.
 
getSegmentNormals(self, tag=None)
returns the list of the normals of the segments in fault tag :param tag: the tag of the fault :type tag: float or str :return: the list of vectors normal to the segments.
 
getSideAndDistance(self, x, tag=None)
returns the side and the distance at x from the fault tag.
 
getStart(self, tag=None)
returns the starting point of fault tag :rtype: numpy.ndarray.
list of numpy.ndarray.
getStrikeVectors(self, tag=None)
Returns: the strike vectors of fault tag
list of float
getStrikes(self, tag=None)
Returns: the strike of the segements in fault tag
 
getTags(self)
returns a list of the tags used by the fault system :rtype: list
 
getTopPolyline(self, tag=None)
returns the polyline used to describe fault tagged by tag
float
getTotalLength(self, tag=None)
Returns: the total unrolled length of fault tag
list of float
getW0Offsets(self, tag=None)
returns the offsets for the parametrization of fault tag.
 
getW0Range(self, tag=None)
returns the range of the parameterization in w0 :rtype: two float
 
getW1Range(self, tag=None)
returns the range of the parameterization in w1 :rtype: two float
 
transform(self, rot=0, shift=array([ 0., 0., 0.]))
applies a shift and a consecutive rotation in the x0x1 plane.
Class Variables [hide private]
  MIN_DEPTH_ANGLE = 0.1
  NOTAG = '__NOTAG__'
Method Details [hide private]

__init__(self, dim=3)
(Constructor)

 
Sets up the fault system
Parameters:
  • dim (int of value 2 or 3) - spatial dimension

addFault(self, strikes, ls, V0=[0.0, 0.0, 0.0], tag=None, dips=None, depths=None, w0_offsets=None, w1_max=None)

 

adds a new fault to the fault system. The fault is named by tag.

The fault is defined by a starting point V0 and a list of strikes and length ls. The strikes and the length is used to define a polyline with points V[i] such that

  • V[0]=V0
  • V[i]=V[i]+ls[i]*array(cos(strikes[i]),sin(strikes[i]),0)

So strikes defines the angle between the direction of the fault segment and the x0 axis. In 3D ls[i] ==0 is allowed.

In case of a 3D model a fault plane is defined through a dip dips and depth depths. From the dip and the depth the polyline bottom of the bottom of the fault is computed.

Each segment in the fault is decribed by the for vertices v0=top[i], v1==top[i+1], v2=bottom[i] and v3=bottom[i+1] The segment is parametrized by w0 and w1 with w0_offsets[i]<=w0<=w0_offsets[i+1] and -w1_max<=w1<=0. Moreover

  • (w0,w1)=(w0_offsets[i]  ,       0)->v0
  • (w0,w1)=(w0_offsets[i+1],       0)->v1
  • (w0,w1)=(w0_offsets[i]  , -w1_max)->v2
  • (w0,w1)=(w0_offsets[i+1], -w1_max)->v3

If no w0_offsets is given,

  • w0_offsets[0]=0
  • w0_offsets[i]=w0_offsets[i-1]+L[i]

where L[i] is the length of the segments on the top in 2D and in the middle of the segment in 3D.

If no w1_max is given, the average fault depth is used.

Parameters:
  • strikes (list of float) - list of strikes. This is the angle of the fault segment direction with x0 axis. Right hand rule applies.
  • ls (list of float) - list of fault lengths. In the case of a 3D fault a segment may have length 0.
  • V0 (list or numpy.ndarray' with 2 or 3 components. ``V0[2]` must be zero.) - start point of the fault
  • tag (float or str) - the tag of the fault. If fault tag already exists it is overwritten.
  • dips (list of float) - list of dip angles. Right hand rule around strike direction applies.
  • depths (list of float) - list of segment depth. Value mut be positive in the 3D case.
  • w0_offsets (list of float or None) - w0_offsets[i] defines the offset of the segment i in the fault to be used in the parametrization of the fault. If not present the cumulative length of the fault segments is used.
  • w1_max (float) - the maximum value used for parametrization of the fault in the depth direction. If not present the mean depth of the fault segments is used.

Note: In the three dimensional case the lists dip and top must have the same length.

getBottomPolyline(self, tag=None)

 
returns the list of the vertices defining the bottom of the fault tag :param tag: the tag of the fault :type tag: float or str :return: the list of vertices. In the 2D case None is returned.

getDepthVectors(self, tag=None)

 
returns the list of the depth vector at top vertices in fault tag. :param tag: the tag of the fault :type tag: float or str :return: the list of segment depths. In the 2D case None is returned.

getDepths(self, tag=None)

 
returns the list of the depths of the segements in fault tag. :param tag: the tag of the fault :type tag: float or str :return: the list of segment depths. In the 2D case None is returned.

getDips(self, tag=None)

 
returns the list of the dips of the segements in fault tag :param tag: the tag of the fault :type tag: float or str :return: the list of segment dips. In the 2D case None is returned.

getLengths(self, tag=None)

 
Returns: list of float
the lengths of segments in fault tag

getMaxValue(self, f, tol=1.49011611938e-08)

 
returns the tag of the fault of where f takes the maximum value and a Locator object which can be used to collect values from Data class objects at the location where the minimum is taken.
Parameters:
  • f (escript.Data) - a distribution of values
  • tol (tol) - relative tolerance used to decide if point is on fault
Returns:
the fault tag the maximum is taken, and a Locator object to collect the value at location of maximum value.

getMinValue(self, f, tol=1.49011611938e-08)

 
returns the tag of the fault of where f takes the minimum value and a Locator object which can be used to collect values from Data class objects at the location where the minimum is taken.
Parameters:
  • f (escript.Data) - a distribution of values
  • tol (tol) - relative tolerance used to decide if point is on fault
Returns:
the fault tag the minimum is taken, and a Locator object to collect the value at location of minimum value.

getParametrization(self, x, tag=None, tol=1.49011611938e-08, outsider=None)

 

returns the parametrization of the fault tag in the fault system. In fact the values of the parametrization for at given coordinates x is returned. In addition to the value of the parametrization a mask is returned indicating if the given location is on the fault with given tolerance tol.

Typical usage of the this method is

dom=Domain(..) x=dom.getX() fs=FaultSystem() fs.addFault(tag=3,...) p, m=fs.getParametrization(x, outsider=0,tag=3) saveDataCSV('x.csv',p=p, x=x, mask=m)

to create a file with the coordinates of the points in x which are on the fault (as mask=m) together with their location p in the fault coordinate system.

Parameters:
  • x (escript.Data object or numpy.ndarray) - location(s)
  • tag - the tag of the fault
  • tol (float) - relative tolerance to check if location is on fault.
  • outsider (float) - value used for parametrization values outside the fault. If not present an appropriate value is choosen.
Returns: escript.Data object or numpy.ndarray
the coordinates x in the coordinate system of the fault and a mask indicating coordinates in the fault by 1 (0 elsewhere)

getSegmentNormals(self, tag=None)

 
returns the list of the normals of the segments in fault tag :param tag: the tag of the fault :type tag: float or str :return: the list of vectors normal to the segments. In the 2D case None is returned.

getSideAndDistance(self, x, tag=None)

 
returns the side and the distance at x from the fault tag.
Parameters:
  • x (escript.Data object or numpy.ndarray) - location(s)
  • tag - the tag of the fault
Returns:
the side of x (positive means to the right of the fault, negative to the left) and the distance to the fault. Note that a value zero for the side means that that the side is undefined.

getStrikeVectors(self, tag=None)

 
Returns: list of numpy.ndarray.
the strike vectors of fault tag

getStrikes(self, tag=None)

 
Returns: list of float
the strike of the segements in fault tag

getTopPolyline(self, tag=None)

 
returns the polyline used to describe fault tagged by tag
Parameters:
  • tag (float or str) - the tag of the fault
Returns:
the list of vertices defining the top of the fault. The coordinates are numpy.ndarray.

getTotalLength(self, tag=None)

 
Returns: float
the total unrolled length of fault tag

getW0Offsets(self, tag=None)

 
returns the offsets for the parametrization of fault tag.
Returns: list of float
the offsets in the parametrization

transform(self, rot=0, shift=array([ 0., 0., 0.]))

 
applies a shift and a consecutive rotation in the x0x1 plane.
Parameters:
  • rot (float) - rotation angle in RAD
  • shift (numpy.ndarray of size 2 or 3) - shift vector to be applied before rotation