77 |
The following statements define a fault system \var{fs} and add the fault \var{1} |
The following statements define a fault system \var{fs} and add the fault \var{1} |
78 |
to the system. |
to the system. |
79 |
\begin{python} |
\begin{python} |
|
fault_start=[0.5,0.25] |
|
|
fault_end=[0.5,0.75] |
|
80 |
fs=FaultSystem(dim=2) |
fs=FaultSystem(dim=2) |
81 |
fs.addFault(top=[fault_start, fault_end], tag=1) |
fs.addFault(fs.addFault(V0=[0.5,0.25], strikes=90*DEG, ls=0.5, tag=1) |
82 |
\end{python} |
\end{python} |
83 |
|
The fault added starts at point $(0.5,0.25)$ has length $0.5$ and is pointing north. |
84 |
The main purpose of the \class{FaultSystem} class is to define a parameterization |
The main purpose of the \class{FaultSystem} class is to define a parameterization |
85 |
of the fault using a local coordinate system. One can enquire the class |
of the fault using a local coordinate system. One can enquire the class |
86 |
to get the range used to parameterize a fault. |
to get the range used to parameterize a fault. |
118 |
from esys.escript.linearPDEs import LinearPDE |
from esys.escript.linearPDEs import LinearPDE |
119 |
from esys.escript.models import FaultSystem |
from esys.escript.models import FaultSystem |
120 |
from esys.finley import Rectangle |
from esys.finley import Rectangle |
121 |
|
from esys.escript.unitsSI import DEG |
122 |
|
|
123 |
#... set some parameters ... |
#... set some parameters ... |
124 |
lam=1. |
lam=1. |
125 |
mu=1 |
mu=1 |
126 |
slip_max=1. |
slip_max=1. |
|
fault_start=[0.5,0.25] |
|
|
fault_end=[0.5,0.75] |
|
|
|
|
127 |
mydomain = Rectangle(l0=1.,l1=1.,n0=16, n1=16) # n1 need to be multiple of 4!!! |
mydomain = Rectangle(l0=1.,l1=1.,n0=16, n1=16) # n1 need to be multiple of 4!!! |
128 |
# .. create the fault system |
# .. create the fault system |
129 |
fs=FaultSystem(dim=2) |
fs=FaultSystem(dim=2) |
130 |
fs.addFault(top=[fault_start, fault_end], tag=1) |
fs.addFault(V0=[0.5,0.25], strikes=90*DEG, ls=0.5, tag=1) |
131 |
# ... create a slip distribution on the fault: |
# ... create a slip distribution on the fault: |
132 |
p, m=fs.getParametrization(mydomain.getX(),tag=1) |
p, m=fs.getParametrization(mydomain.getX(),tag=1) |
133 |
p0,p1= fs.getW0Range(tag=1) |
p0,p1= fs.getW0Range(tag=1) |