直交曲線座標(円筒座標・球座標)でのベクトル解析

デカルト座標(直交座標)は最も基本的ですが、問題の対称性に合わせた座標系を使うと計算が大幅に簡略化されます。円筒対称な問題には円筒座標、球対称な問題には球座標が自然です。

本記事では、一般の直交曲線座標におけるベクトル解析の公式を導出し、円筒座標・球座標での具体的な形を示します。

本記事の内容

  • 直交曲線座標とスケール因子
  • 円筒座標 $(r, \theta, z)$ でのgrad/div/rot/∇²
  • 球座標 $(r, \theta, \varphi)$ でのgrad/div/rot/∇²
  • Pythonでの座標変換と可視化

前提知識

直交曲線座標とスケール因子

一般の直交曲線座標 $(q_1, q_2, q_3)$ では、線素の長さが

$$ ds^2 = h_1^2 dq_1^2 + h_2^2 dq_2^2 + h_3^2 dq_3^2 $$

と表されます。$h_i$ をスケール因子(計量係数)と呼びます。

座標系 $(q_1, q_2, q_3)$ $(h_1, h_2, h_3)$
デカルト $(x, y, z)$ $(1, 1, 1)$
円筒 $(r, \theta, z)$ $(1, r, 1)$
$(r, \theta, \varphi)$ $(1, r, r\sin\theta)$

一般公式

勾配

$$ \nabla \phi = \frac{1}{h_1}\frac{\partial \phi}{\partial q_1}\hat{\bm{e}}_1 + \frac{1}{h_2}\frac{\partial \phi}{\partial q_2}\hat{\bm{e}}_2 + \frac{1}{h_3}\frac{\partial \phi}{\partial q_3}\hat{\bm{e}}_3 $$

発散

$$ \nabla \cdot \bm{F} = \frac{1}{h_1 h_2 h_3}\left[\frac{\partial(h_2 h_3 F_1)}{\partial q_1} + \frac{\partial(h_1 h_3 F_2)}{\partial q_2} + \frac{\partial(h_1 h_2 F_3)}{\partial q_3}\right] $$

ラプラシアン

$$ \nabla^2\phi = \frac{1}{h_1 h_2 h_3}\left[\frac{\partial}{\partial q_1}\left(\frac{h_2 h_3}{h_1}\frac{\partial\phi}{\partial q_1}\right) + \frac{\partial}{\partial q_2}\left(\frac{h_1 h_3}{h_2}\frac{\partial\phi}{\partial q_2}\right) + \frac{\partial}{\partial q_3}\left(\frac{h_1 h_2}{h_3}\frac{\partial\phi}{\partial q_3}\right)\right] $$

円筒座標 $(r, \theta, z)$

座標変換: $x = r\cos\theta$, $y = r\sin\theta$, $z = z$

スケール因子: $h_r = 1$, $h_\theta = r$, $h_z = 1$

$$ \nabla\phi = \frac{\partial\phi}{\partial r}\hat{\bm{e}}_r + \frac{1}{r}\frac{\partial\phi}{\partial\theta}\hat{\bm{e}}_\theta + \frac{\partial\phi}{\partial z}\hat{\bm{e}}_z $$

$$ \nabla \cdot \bm{F} = \frac{1}{r}\frac{\partial(rF_r)}{\partial r} + \frac{1}{r}\frac{\partial F_\theta}{\partial\theta} + \frac{\partial F_z}{\partial z} $$

$$ \nabla^2\phi = \frac{1}{r}\frac{\partial}{\partial r}\left(r\frac{\partial\phi}{\partial r}\right) + \frac{1}{r^2}\frac{\partial^2\phi}{\partial\theta^2} + \frac{\partial^2\phi}{\partial z^2} $$

球座標 $(r, \theta, \varphi)$

座標変換: $x = r\sin\theta\cos\varphi$, $y = r\sin\theta\sin\varphi$, $z = r\cos\theta$

スケール因子: $h_r = 1$, $h_\theta = r$, $h_\varphi = r\sin\theta$

$$ \nabla\phi = \frac{\partial\phi}{\partial r}\hat{\bm{e}}_r + \frac{1}{r}\frac{\partial\phi}{\partial\theta}\hat{\bm{e}}_\theta + \frac{1}{r\sin\theta}\frac{\partial\phi}{\partial\varphi}\hat{\bm{e}}_\varphi $$

$$ \nabla \cdot \bm{F} = \frac{1}{r^2}\frac{\partial(r^2 F_r)}{\partial r} + \frac{1}{r\sin\theta}\frac{\partial(\sin\theta \, F_\theta)}{\partial\theta} + \frac{1}{r\sin\theta}\frac{\partial F_\varphi}{\partial\varphi} $$

$$ \nabla^2\phi = \frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial\phi}{\partial r}\right) + \frac{1}{r^2\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial\phi}{\partial\theta}\right) + \frac{1}{r^2\sin^2\theta}\frac{\partial^2\phi}{\partial\varphi^2} $$

Pythonでの実装

import numpy as np
import matplotlib.pyplot as plt

fig, axes = plt.subplots(1, 2, figsize=(12, 5))

# 円筒座標の可視化
theta = np.linspace(0, 2*np.pi, 100)
r_vals = [0.5, 1.0, 1.5, 2.0]
for r in r_vals:
    axes[0].plot(r*np.cos(theta), r*np.sin(theta), 'b-', alpha=0.5)
theta_vals = np.linspace(0, 2*np.pi, 13)[:-1]
for th in theta_vals:
    axes[0].plot([0, 2.2*np.cos(th)], [0, 2.2*np.sin(th)], 'r-', alpha=0.3)
axes[0].set_title('円筒座標 $(r, \\theta, z)$\n$r=$一定(青), $\\theta=$一定(赤)')
axes[0].set_aspect('equal')
axes[0].set_xlabel('x')
axes[0].set_ylabel('y')
axes[0].grid(True, alpha=0.3)

# 球座標の可視化(r-θ平面)
r = np.linspace(0, 2, 100)
theta = np.linspace(0, np.pi, 100)
R, TH = np.meshgrid(r, theta)
X = R * np.sin(TH)
Z = R * np.cos(TH)

# r = 一定
for r_val in [0.5, 1.0, 1.5, 2.0]:
    th_range = np.linspace(0, np.pi, 100)
    axes[1].plot(r_val*np.sin(th_range), r_val*np.cos(th_range), 'b-', alpha=0.5)
# theta = 一定
for th_val in np.linspace(0, np.pi, 7):
    r_range = np.linspace(0, 2.2, 100)
    axes[1].plot(r_range*np.sin(th_val), r_range*np.cos(th_val), 'r-', alpha=0.3)

axes[1].set_title('球座標 $(r, \\theta, \\varphi)$\n$r=$一定(青), $\\theta=$一定(赤)')
axes[1].set_xlabel('$\\rho = r\\sin\\theta$')
axes[1].set_ylabel('$z = r\\cos\\theta$')
axes[1].set_aspect('equal')
axes[1].grid(True, alpha=0.3)

plt.tight_layout()
plt.savefig('curvilinear_coordinates.png', dpi=150, bbox_inches='tight')
plt.show()

まとめ

  • 直交曲線座標ではスケール因子 $h_i$ が微分演算子の形を決める
  • 円筒座標: 軸対称問題に最適。$h = (1, r, 1)$
  • 球座標: 球対称問題に最適。$h = (1, r, r\sin\theta)$
  • grad/div/rot/∇² の各公式は一般公式から導出できる

次のステップとして、以下の記事も参考にしてください。