ray/calculate1Dscalar.hで用いている計算式

(Formula used in ray/calculate1Dscalar.h)

Last Update: 2021/12/6


1. 以下の説明で用いる記号 (Notation used in the description below)

z軸を鉛直下向きに取り、深さzにおける速度をv(z)、 波線がz軸となす角をθ(z)とする。 速度の定義点の深さをz=z1,,zN、 それらの深さでの速度をv1,,vNとする。 このとき (1)vn=v(zn),n=1,,N である。znzzn+1 (n=1,,N1)における速度勾配を (2)sn=vn+1vnzn+1zn とする。またz<z1における速度勾配をs0(>0)z>zNにおける速度勾配をsN(>0)とする。 波線パラメータを (3)p=sinθ(z)v(z) とする。
We assume the z axis to lie downward, and v(z) and θ(z) be the velocity and the angle between the ray and the z axis, respectively. We assume the velocities v1,,vN to be given at depths of z=z1,,zN, suggesting eq. (1). Let sn (n=1,,N1) be the velocity slope in znzzn+1 given by eq. (2), and s0(>0) and sN(>0) be the velocity slopes in z<z1 and z>zN, respectively. We denote the ray parameter by p, which satisfies eq. (3).

以上の記号とプログラムで用いている変数との関係は 下表の通りである。
The table below represents the relation between the notation in this documentation and variables in the program code.

本マニュアルでの記号
Notation in this documentation
プログラム中の記号
Variables in the program code
Nstructure.N
zn (n=1,,N)structure.depths[n-1]
vn (n=1,,N)structure.velocities[n-1]
s0structure.slope_shallow
sNstructure.slope_deep
pp


2. 波線の最大到達深度 (The maximum depth of the ray)

波線の最大到達深度はsinθ(z)=1となるzとして定義される。 (3)式より、この条件は (4)pv(z)=1 と等価である。 s0>0, sN>0という条件を付けていることで v(z)は0からまでの全範囲の値を取るので、 どのような波線パラメータについても (4)式を満たすzが最低1つは存在することが保証される。 (4)式の解が複数存在する場合は その中の一番小さいzを波線の最大到達深度と見なす。 なぜならば、ひとたび角度が90°になったら それ以上深くは潜れないからである。
The maximum depth of the ray is defined as the solution of sinθ(z)=1, which is equivalent to eq. (4) because of eq. (3). Since s0>0 and sN>0, v(z) takes all values from 0 to , which ensure that at least one solution of eq. (4) exists for an arbitrary ray parameter. When two or more solutions of eq. (4) exists, the smallest z among these solutions is adopted as the maximum depth because once the angle becomes 90°, the ray does not go deeper.

波線の最大到達深度は関数ray_max_depth_1Dscalarにおいて 以下の3つのケースに場合分けして計算される。
The maximum depth of the ray is computed by function ray_max_depth_1Dscalar switching for the following three cases.



3. 速度が深さの1次関数で表される2つの深さの間の 波線に沿った水平距離・実距離・走時 (Horizontal distance, travel distance, and travel time along the ray from one depth to another between which the velocity is a linear function of depth)

2つの深さz=zs, z=zd (zs<zd)があり、 zs<z<zdの範囲では 速度が深さの1次関数(速度勾配s)で与えられているとする。 また、波線の最大到達深度はzzdの範囲にあるものとする。 この場合にz=zsを出発した波線が最初にz=zdに到達するまでの 波線に沿った水平距離および実距離と走時を求めることを考える。
Let z=zs and z=zd be two depths (zs<zd), between which the velocity is a linear function of depth with the slope s, We assume the maximum depth of the ray to be zzd. Then, let us calculate the horizontal and travel distances as well as the travel time along the ray as it travels from z=zs and first reaches z=zd.


3.1. 水平距離 (Horizontal distance)

一般に、深さzにおいて波線が微小距離Δzだけ深さ方向に進むときの 水平方向距離は (11)Δx=Δztanθ(z)=Δzsinθ(z)1sin2θ(z) と表される。この関係は(3)式を用いると (12)Δx=Δzpv(z)1p2v(z)2 と変形できるので、これをz=zsからz=zdまで積分することにより、 水平距離の計算式として (13)Xzszd=zszdpv(z)1p2v(z)2dz を得る。
In general, the horizontal distance along the ray as it moves a small vertical distance Δz at a depth z is given by eq. (11). Inserting eq. (3) into (11) results in (12), and integrating this equation from z=zs to z=zd gives (13) as the formula for the horizontal distance.

この積分を実行するにあたり、zs<z<zdの範囲で v(z)zの1次関数で書けることを利用する。 v(zs)=vs, v(zd)=vdとおき、 速度勾配がdv/dz=sであることを用いると Xzszd=vsvdpv1p2v2dzdvdv=1spvsvdp2v1p2v2dv=1sp[1p2v2]vsvd=1sp(1p2vd21p2vs2)(14)=1p2vs21p2vd2sp と積分を解析的に計算できる。
Now, remember that v(z) is a linear function of z in the zs<z<zd range. Using v(zs)=vs, v(zd)=vd, and the velocity slope dv/dz=s, the integral of eq. (13) can be analytically calculated as eq. (14).

(14)式はvs=vdのときに0/0の不定値になってしまう。 これを避けるため、s=(vdvs)/(zdzs)であることを用いて変形を行うと Xzszd=1p2vs21p2vd2sp1p2vs2+1p2vd21p2vs2+1p2vd2=(1p2vs2)(1p2vd2)sp(1p2vs2+1p2vd2)=p2(vd2vs2)vdvszdzsp(1p2vs2+1p2vd2)(15)=p(vd+vs)(zdzs)1p2vs2+1p2vd2 を得る。 この式ならばvs=vdの場合も適用可能であり、 (13)式でv(z)=vs=vd(定数)とおいて直接得られる式と一致する。
Eq. (14) gives 0/0 when vs=vd. This problem is avoided by arranging the equation as (15), where s=(vdvs)/(zdzs) was used. Eq. (15) is applicable to the case of vs=vd, and is consistent with the direct result from eq. (13) assuming v(z)=vs=vd (constant).

関数ray_horizontal_distance_1Dscalar_linearでは (15)式を用いて水平距離の計算を行う。
Function ray_horizontal_distance_1Dscalar_linear computes the horizontal distance using eq. (15).


3.2. 実距離 (Travel distance)

深さzにおいて波線が微小距離Δzだけ深さ方向に進むとき、 水平方向を考慮に入れた波線に沿った微小距離は (16)Δl=Δzcosθ(z)=Δz1sin2θ(z) と表される。(3)式を代入すると (17)Δl=Δz1p2v(z)2 となる。これをz=zsからz=zdまで積分すれば、 z=zsを出発した波線が最初にz=zdに到達するまでの波線に沿った実距離は (18)Lzszd=zszd11p2v(z)2dz と書ける。
The total distance along the ray as it moves a small vertical distance Δz at a depth z is given by eq. (16). Inserting (3) into (16) results in (17). Integrating this equation from z=zs to z=zd yields (18) as the formula for the travel distance of the ray that propagates from the depth z=zs to z=zd.

この積分を実行するにあたり、zs<z<zdの範囲で v(z)zの1次関数で書けることを利用する。 v(zs)=vs, v(zd)=vdとおき、 速度勾配がdv/dz=sであることを用いると Lzszd=vsvd11p2v2dzdvdv(19)=1svsvd11p2v2dv と変形できる。更にvs=sinθs/p, vd=sinθd/pとおき、 v=sinθ/pの変数変換を施すと Lzszd=1sθsθd11sin2θdvdθdθ=1sθsθd1cosθcosθpdθ=1spθsθddθ(20)=θdθssp となり、積分を解析的に計算できる。
Now, remember that v(z) is a linear function of z in the zs<z<zd range. Using v(zs)=vs, v(zd)=vd, and the velocity slope dv/dz=s, the integral of eq. (13) can be arranged as (19). Further converting the integral variable from v to θ using a relation v=sinθ/p, with defining vs=psinθs and vd=psinθd, the integral can be analytically calculated. The result is (20).

(20)式はvs=vdのときに0/0の不定値になってしまう。 これを避けるため、s=(vdvs)/(zdzs)であることを用いて変形を行うと Lzszd=θdθsvdvszdzsp=(zdzs)(θdθs)(vdvs)p=(zdzs)(θdθs)vdpvsp=(zdzs)(θdθs)sinθdsinθs=(zdzs)(θdθs)2sinθdθs2cosθd+θs2(21)=zdzscosθd+θs2θdθs2sinθdθs2 となる。vdvsとした極限では θdθsとなり、このとき (22)θdθs2sinθdθs21 よりLzszd(zdzs)/cosθsとなって 波線を直線にした場合の式と一致する。
Eq. (20) gives 0/0 when vs=vd. This problem is avoided by arranging the equation as (21). At the limit of vdvs, asymptotic behaviours θdθs and (22) hold, thus giving Lzszd(zdzs)/cosθs, which is consistent with the direct result assuming a straight ray.

関数ray_travel_distance_1Dscalar_linearでは (21)式を用いて波線に沿った実距離の計算を行う。
Function ray_travel_distance_1Dscalar_linear computes the travel distance along the ray using eq. (21).


3.3. 走時 (Travel time)

深さzにおいて波線が微小距離Δzだけ深さ方向に進むとき、 水平方向を考慮に入れた波線に沿った微小距離は(17)で表される。 この微小距離を進むのにかかる時間は (23)Δt=Δlv(z)=Δzv(z)1p2v(z)2 と書ける。これをz=zsからz=zdまで積分すれば、 z=zsを出発した波線が最初にz=zdに到達するまでの所要時間は (24)Tzszd=zszd1v(z)1p2v(z)2dz と書ける。
The total distance along the ray as it moves a small vertical distance Δz at a depth z is given by eq. (17). The time needed for the wave to propagate by this distance is given by eq. (23). Integrating this equation from z=zs to z=zd yields (24) as the formula for the travel time of the ray that propagates from the depth z=zs to z=zd.

この積分を実行するにあたり、zs<z<zdの範囲で v(z)zの1次関数で書けることを利用する。 v(zs)=vs, v(zd)=vdとおき、 速度勾配がdv/dz=sであることを用いると Tzszd=vsvd1v1p2v2dzdvdv(25)=1svsvd1v1p2v2dv と変形できる。更にvs=sinθs/p, vd=sinθd/pとおき、 v=sinθ/pの変数変換を施すと Tzszd=1sθsθd1sinθp1sin2θdvdθdθ=1sθsθdpsinθcosθcosθpdθ=1sθsθddθsinθ=1sθsθddθ2sinθ2cosθ2=1sθsθd12(cosθ2sinθ2+sinθ2cosθ2)dθ=1sθsθd(12cosθ2sinθ212sinθ2cosθ2)dθ=1s[ln(sinθ2)ln(cosθ2)]θsθd=1s[ln1cosθ2ln1+cosθ2]θsθd=1s[ln1cosθ1+cosθ]θsθd=1s[ln(1cosθ)2(1+cosθ)(1cosθ)]θsθd=1s[ln(1cosθ)21cos2θ]θsθd=1s[ln(1cosθ)2sin2θ]θsθd=1s[ln(1cosθsinθ)]θsθd=1s[ln(1cosθdsinθd)ln(1cosθdsinθd)]=1s[ln(11p2vd2pvd)ln(11p2vs2pvs)](26)=1s[ln(1pvd1p2vd21)ln(1pvs1p2vs21)] となり、積分を解析的に計算できる。
Now, remember that v(z) is a linear function of z in the zs<z<zd range. Using v(zs)=vs, v(zd)=vd, and the velocity slope dv/dz=s, the integral of eq. (13) can be arranged as (25). Further converting the integral variable from v to θ using a relation v=sinθ/p, with defining vs=psinθs and vd=psinθd, the integral can be analytically calculated. The result is (26).

(26)式はvd=vsの場合に0/0の不定値になってしまう。 また0/0が現れない形に変形するのも容易ではない。 そこで、(26)式においてvdvs とした極限での振る舞いを考える。 そのために関数 (27)f(v)ln(1pv1p2v21) を定義するのが便利である。この関数fの微分形は f(v)=11pv1p2v21[1pv2121p2v21(2p2v3)]=11pv1p2v21(1pv2+1p2v31p2v21)=11pv1p2v211pv21p2v21(1p2v21+1pv)=1pv21p2v21(28)=1v1p2v2 f(v)=(1v2)11p2v2+1v[12(1p2v2)3/2](2p2v)=1v21p2v2+p2(1p2v2)3/2=(1p2v2)+p2v2v2(1p2v2)3/2(29)=2p2v21v2(1p2v2)3/2 f(3)(v)=4p2vv2(1p2v2)3/2(2p2v21)v4(1p2v2)3[2v(1p2v2)3/2+v232(1p2v2)1/2(2p2v)]=4p2v3(1p2v2)3/2(2p2v21)v4(1p2v2)3[2v(1p2v2)3/23p2v3(1p2v2)1/2]=1v4(1p2v2)3[4p2v3(1p2v2)3/22v(2p2v21)(1p2v2)3/2+3p2v3(2p2v21)(1p2v2)1/2]=4p2v2(1p2v2)2(2p2v21)(1p2v2)+3p2v2(2p2v21)v3(1p2v2)5/2=1v3(1p2v2)5/2[(4p2v24p4v4)(4p2v24p4v42+2p2v2)+(6p4v43p2v2)](30)=25p2v2+6p4v4v3(1p2v2)5/2 と書ける。関数fを用いると(26)式は Tzszd=1s[f(vd)f(vs)]=zdzsvdvs[f(vd)f(vs)](31)=(zdzs)f(vd)f(vs)vdvs と書けるので、vdvsの極限では (32)Tzszd=(zdzs)f(vs)=zdzsvs1p2vs2 となる。これは(24)式においてv(z)zによらない定数と見なして 積分した形になっている。 ここでは速度が深さの線形関数で書ける場合を考えているのであるから vdvsの極限では速度は定数となる。 したがって(26)式でvdvsとした極限 (32)が (24)式でv(z)を定数と見なした場合の式と一致するのは 妥当な結果である。
Eq. (26) yields 0/0 when vd=vs, and arranging this equation to avoid 0/0 is difficult. Thus, let us consider an approximate form of eq. (26) at the limit of vdvs. A function f(v) defined by eq. (27) is convenient for this purpose. Differential forms of this function are given by eqs. (28), (29), and (30). Using this function, the travel time is given by (31), yielding (32) at the limit of vdvs. This equation is equivalent to the expression obtained by (24) assuming that v(z) is not dependent on z. Remember that our formulation here assumed a linear velocity change with depth. Thus the limit vdvs means a constant velocity. It is therefore reasonable that the limit of eq. (26) at vdvs, given by (32), is equivalent to the expression obtained by assuming a constant velocity in eq. (24).

ところでプログラミングでは一般に2つの実数の等号比較は不安定の原因であり、 vd=vsのときとそうでないときで場合分けするのは良いコードとは言えない。 ある幅を持たせてvdvsが十分に近い場合とそうでない場合で場合分けする方が より安定な計算ができる。 そのためにはvdvsと「完全には一致しないが十分近い」場合に成り立つ 近似式が必要になる。 そこで、f(vd)vsのまわりでテイラー展開して3次の項まで残すと (33)f(vd)f(vs)+f(vs)(vdvs)+f(vs)2(vdvs)2+f(3)(vs)6(vdvs)3 と書ける。このとき(31)式より Tzszd(zdzs)f(vs)(vdvs)+f(vs)2(vdvs)2+f(3)(vs)6(vdvs)3vdvs=f(vs)(zdzs)+f(vs)2(zdzs)(vdvs)(34)+f(3)(vs)6(zdzs)(vdvs)2 となり、(28)-(30)を代入して Tzszdzdzsvs1p2vs2+(2p2vs21)(zdzs)2vs2(1p2vs2)3/2(vdvs)(35)+(25p2vs2+6p4vs4)(zdzs)6vs3(1p2vs2)5/2(vdvs)2 を得る。この最後の項を無視できる条件は (36)|(2p2vs21)(zdzs)2vs2(1p2vs2)3/2(vdvs)||(25p2vs2+6p4vs4)(zdzs)6vs3(1p2vs2)5/2(vdvs)2| であり、共通因子を消去すると (37)|2p2vs21||25p2vs2+6p4vs43vs(1p2vs2)(vdvs)| 整理して |vdvs3vs||(1p2vs2)(2p2vs21)25p2vs2+6p4vs4|=|1+3p2vs22p4vs425p2vs2+6p4vs4|(38)=|13p2vs2+2p4vs425p2vs2+6p4vs4| を得る。この条件が成り立つとき、(35)式の 最後の項を無視した近似式 (39)Tzszdzdzsvs1p2vs2+(2p2vs21)(zdzs)2vs2(1p2vs2)3/2(vdvs) を利用できる。
In the computer programs, two real numbers should not be compared by an equal sign because it would result in a numerical instability. Thus branching based on whether vd=vs or not is not a good code. Rather, the branching should be based on whether vd and vs are sufficiently close or not. To implement this branching, an approximated equation for the travel time that is valid when vd and vs are ``sufficiently close to each other but not exactly same'' is needed. We now derive this equation. A Taylor expansion of f(vd) with respect to vs, remaining until the 3rd-order term, results in eq. (33). Using this relation, eq. (31) reduces to (34), and inserting eqs. (28)-(30) into it gives (35). The final term of this equation can be neglected when (36) holds. Removing the common factors from the both hand sides of (36) results in (37), which can further be arranged as (38). When this condition is met, it is valid to neglect the final term of (35), resulting in (39).

(26)式と(39)式の比較の例を 図1に示す。 ここでは(26)式に基づいて計算した走時を Tzszdexact、 (39)式に基づいて計算した走時を Tzszdapprox、 (38)式の左辺を右辺で割った値を Mapproxとする。 理論上はMapprox1であれば近似が成り立ち、 Mapproxの値が小さいほど理論上の近似精度が良い。 またTzszdexactTzszdapproxが近いほど 実際の近似精度が良い。 これらを比較することで、実際にMapproxがどの程度小さければ Tzszdapproxがどれくらい良い近似になるのかを評価できる。 図1cはMapproxと近似式の誤差 |TzszdapproxTzszdexact|/Tzszdexact との関係を示したものであり、Mapprox=0.01であれば 近似式の誤差は104のオーダーになることが分かる。 この誤差レベルは波線パラメータpや層厚zdzsにも依存すると思われるので、 プログラムでは安全側に余裕を見てMapprox<0.0001のときに 近似式を用いるようにしている。
Fig. 1 is a comparison of the travel times computed by eqs. (26) and (39). Here, Tzszdexact and Tzszdapprox are the travel times based on eqs. (26) and (39), respectively, and Mapprox is the ratio of left- to right-hand-side of eq. (38). The approximation is theoretically valid when Mapprox1; theoretically, the smaller the Mapprox, the better the approximation. The real precision of the approximation is evaluated by comparing Tzszdexact and Tzszdapprox. In Fig. 1c, a relation between the theoretical goodness of the approximation (Mapprox) and the real goodness of the approximation (|TzszdapproxTzszdexact|/Tzszdexact) is shown, indicating that a value of Mapprox=0.01 results in a travel time error in order of 104 by the approximation. This error level may depend on the ray parameter p and the layer thickness zdzs. To have a margin for the safety side, the program switches the exact and approximate equations at Mapprox=0.0001.


図1. zs=0 m, zd=1000 m, p=0.0001 s m1, vs=2000 m s1 のときの(26)式と(39)式の比較。 vdを1800 m s1から2200 m s1まで 0.1 m s1刻みで動かして計算した。 (a)vdTzszdの関係。 赤線は(26)式による厳密解Tzszdexact、 青線は(39)式による 近似解Tzszdapprox。 (b)vdと理論上の近似精度Mapproxとの関係。 この値が小さいほど理論上の近似精度が良い。 (c)Mapprox|TzszdapproxTzszdexact|/Tzszdexact との関係。
Fig. 1. A comparison of travel times computed by eqs. (26) and (39) for a case of zs=0 m, zd=1000 m, p=0.0001 s m1, vs=2000 m s1, and moving vd from 1800 m s1 to 2200 m s1 at an interval of 0.1 m s1. (a) A relation between vd and Tzszd. The red and blue lines represent the exact solution Tzszdexact from eq. (26) and an approximate form Tzszdapprox based on eq. (39), respectively. (b) A relation between vd and Mapprox. The value of Mapprox represents a theoretical goodness of the approximation; smaller Mapprox values correspond to better approximations. (c) A relation between Mapprox and |TzszdapproxTzszdexact|/Tzszdexact.


4. 速度定義点をまたぐ2つの深さの間の波線に沿った水平距離 (Horizontal distance along the ray between two depths over a velocity definition point)

前節ではzs<z<zdにおいて速度が深さの1次関数で表される場合を考えた。 これはzs<z<zdの範囲に速度定義点が存在しない状況に対応する。 zs<z<zdの範囲に速度定義点が含まれる場合、その地点で速度勾配が変わる。 このようなケースではzs<z<zdの範囲を速度定義点で小区間に分割し、 それらの小区間ごとに(15)式を適用すれば良い。
In the previous section, the velocity was assumed to be a linear function in the zs<z<zd range, which corresponds to a situation where there is no velocity definition point in this range. If the velocity definition points are present in zs<z<zd, the velocity slope changes at these points. In this case, eq. (15) is applicable to subsections bounded by the velocity definition points.

いま、zsよりも深部側のzsに最も近い速度定義点をz=zlzdよりも浅部側のzdに最も近い速度定義点をz=zmとする。 zs<z<zdの間に少なくとも1つの速度定義点が含まれる状況を考えれば lmとなる。 このとき、水平距離は (40)Xzszd=Xzszl+n=lm1Xznzn+1+Xzmzd となる。この式の個々の項(Xzszlなど)は (15)式によって計算できる。
Let z=zl and z=zm be the nearest velocity definition points downward from zs and upward from zd, respectively. When at least one velocity definition point exists in zs<z<zd, lm holds. In this case, the horizontal distance is calculated by eq. (40). Individual terms in this equation (Xzszl, etc.) can be calculated with eq. (15).

関数ray_horizontal_distance_1Dscalarでは (40)式と(15)式を組み合わせて 水平距離の計算を行う。
Function ray_horizontal_distance_1Dscalar computes the horizontal distance using eqs (40) and (15).