Basilisk CFD
Adaptive Cartesian mesh PDE framework
Loading...
Searching...
No Matches
okada.h File Reference

Go to the source code of this file.

Data Structures

struct  Fault
 

Functions

static void rectangular_source (const double U[3], double cosd, double sind, double mulambda, double d, double psi, double eta, double q, double u[3])
 
static void okada_rectangular_source (const double U[3], double L, double W, double d, double delta, double mulambda, double x, double y, double u[3])
 
static double dtheta (double theta1, double theta2)
 
void okada (scalar d, double x=0, double y=0, double depth=0, double strike=0, double dip=0, double rake=0, double length=0, double width=0, double U=0, double mu=1, double lambda=1, double R=6371220., bool flat=false, bool centroid=false, Fault *faults=NULL)
 
void fault (double x=0, double y=0, double depth=0, double strike=0, double dip=0, double rake=0, double length=0, double width=0, double U=0, double mu=1, double lambda=1, double R=6371220., int(*iterate)(void)=NULL, bool flat=false, bool centroid=false, Fault *faults=NULL)
 

Function Documentation

◆ dtheta()

static double dtheta ( double  theta1,
double  theta2 
)
static

Definition at line 107 of file okada.h.

References d, and x.

◆ fault()

void fault ( double  x = 0,
double  y = 0,
double  depth = 0,
double  strike = 0,
double  dip = 0,
double  rake = 0,
double  length = 0,
double  width = 0,
double  U = 0,
double  mu = 1,
double  lambda = 1,
double  R = 6371220.,
int(*)(void iterate = NULL,
bool  flat = false,
bool  centroid = false,
Fault faults = NULL 
)

User interface

Use function fault() to alter water depth h (where h > dry) according to the fault parameters:

x, y: coordinates of the fault centroid (see boolean flat for coordinate type). depth: depth of the top edge of the fault (see also centroid). strike, dip, rake: fault parameters in degrees. (0 <= strike < 360, -90 <= dip <= 90, -90 <= rake <= 90 where rake = 90 degs and dip > 0 is reverse faulting. NB: Okada defines normal faulting by rake = 90 deg and dip < 0 whereas the seismological convention now is generally 0 <= dip <= 90 and rake = -90 for normal faulting). mu, lambda: only the ratio is important and default is mu/lambda = 1. length, width, U: length and width of the fault plane and slip on the fault plane (generally in meters). R: is the radius of the earth (for when x, y are in longitude and latitude i.e. flat = false). iterate: is the function to use to iterate. flat: true assumes x, y cartesian, false assumes longitude and latitude (default). centroid: assumes that depth is measured to the centroid of the fault, not the top edge. faults: if non-NULL, this defines an array of several fault parameters which will be used instead of the parameters for a single fault above. This is useful to efficiently define a deformation composed of many Okada subfaults. Note that the array must be terminated by a "dummy fault" of depth smaller than or equal to zero.

Definition at line 210 of file okada.h.

References _i, depth, dry, eta, h, lambda, length(), max, mu, okada(), scalar_clone, x, y, and zb.

Here is the call graph for this function:

◆ okada()

void okada ( scalar  d,
double  x = 0,
double  y = 0,
double  depth = 0,
double  strike = 0,
double  dip = 0,
double  rake = 0,
double  length = 0,
double  width = 0,
double  U = 0,
double  mu = 1,
double  lambda = 1,
double  R = 6371220.,
bool  flat = false,
bool  centroid = false,
Fault faults = NULL 
)

Definition at line 122 of file okada.h.

References cpu, d, depth, dtheta, f, lambda, length(), mu, nodata, okada_rectangular_source(), pi, x, y, and y1.

Referenced by fault().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ okada_rectangular_source()

static void okada_rectangular_source ( const double  U[3],
double  L,
double  W,
double  d,
double  delta,
double  mulambda,
double  x,
double  y,
double  u[3] 
)
static

There seems to be a problem with dimensions here. x, p, and q should be the dimensionless coordinates, not the dimensional ones... See also tsunami.c.

Definition at line 72 of file okada.h.

References d, p, q, rectangular_source(), u, x, and y.

Referenced by okada().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rectangular_source()

static void rectangular_source ( const double  U[3],
double  cosd,
double  sind,
double  mulambda,
double  d,
double  psi,
double  eta,
double  q,
double  u[3] 
)
static

Okada fault model

This is an implementation of the formulae of Okada, 1985.

Definition at line 9 of file okada.h.

References eta, HUGE, psi, q, R1, u, x, and X.

Referenced by okada_rectangular_source().

Here is the caller graph for this function: