esys.escriptcore.faultsystems Package

Classes

class esys.escriptcore.faultsystems.FaultSystem(dim=3)

Bases: object

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

  • 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. 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).

MIN_DEPTH_ANGLE = 0.1
NOTAG = '__NOTAG__'
addFault(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.array 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(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.

getCenterOnSurface()

returns the center point of the fault system at the surface :rtype: numpy.array

getDepthVectors(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(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.

getDim()

returns the spatial dimension :rtype: int

getDips(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(tag=None)
Returns:the lengths of segments in fault tag
Return type:list of float
getMaxValue(f, tol=1.4901161193847656e-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.

getMediumDepth(tag=None)

returns the medium depth of fault tag :rtype: float

getMinValue(f, tol=1.4901161193847656e-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.

getOrientationOnSurface()

returns the orientation of the fault system in RAD on the surface around the fault system center :rtype: float

getParametrization(x, tag=None, tol=1.4901161193847656e-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.array) – 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:

the coordinates x in the coordinate system of the fault and a mask indicating coordinates in the fault by 1 (0 elsewhere)

Return type:

escript.Data object or numpy.array

getSegmentNormals(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(x, tag=None)

returns the side and the distance at x from the fault tag.

Parameters:
  • x (escript.Data object or numpy.array) – 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.

getStart(tag=None)

returns the starting point of fault tag :rtype: numpy.array.

getStrikeVectors(tag=None)
Returns:the strike vectors of fault tag
Return type:list of numpy.array.
getStrikes(tag=None)
Returns:the strike of the segements in fault tag
Return type:list of float
getTags()

returns a list of the tags used by the fault system :rtype: list

getTopPolyline(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.array.
getTotalLength(tag=None)
Returns:the total unrolled length of fault tag
Return type:float
getW0Offsets(tag=None)

returns the offsets for the parametrization of fault tag.

Returns:the offsets in the parametrization
Return type:list of float
getW0Range(tag=None)

returns the range of the parameterization in w0 :rtype: two float

getW1Range(tag=None)

returns the range of the parameterization in w1 :rtype: two float

transform(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.array of size 2 or 3) – shift vector to be applied before rotation

Functions

Others

  • __all__
  • __builtins__
  • __copyright__
  • __doc__
  • __file__
  • __license__
  • __name__
  • __package__
  • __url__