第3章: ラプラス方程式とポテンシャル理論

Laplace Equation and Potential Theory

🎯 学習目標

📖 ラプラス方程式とは

ラプラス方程式の定義

ラプラス方程式(Laplace equation)は、以下の形式の楕円型偏微分方程式です:

\[ \nabla^2 u = \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2} = 0 \]

ラプラス方程式の解を調和関数(harmonic function)と呼びます。

ポアソン方程式(Poisson equation)は、右辺が非ゼロの場合です:

\[ \nabla^2 u = f(x,y,z) \]

ここで \(f\) は熱源や電荷密度を表します。

物理的意義

調和関数の性質

最大値原理(Maximum Principle): 調和関数は内部に極値を持たず、最大値・最小値は境界上で達成されます。

平均値定理(Mean Value Theorem): 点 \((x_0, y_0)\) における調和関数の値は、その点を中心とする円周上の平均値に等しい:

\[ u(x_0, y_0) = \frac{1}{2\pi} \int_0^{2\pi} u(x_0 + r\cos\theta, y_0 + r\sin\theta) d\theta \]

一意性: ディリクレ境界条件のもとで、ラプラス方程式の解は一意的です。

💻 例題3.1: 調和関数と最大値原理の検証

Python実装: 調和関数の性質確認
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # 調和関数の例: u(x,y) = x^2 - y^2 (実部 z^2 の調和関数) def harmonic_function(x, y): return x**2 - y**2 # 2次元グリッド作成 x = np.linspace(-2, 2, 100) y = np.linspace(-2, 2, 100) X, Y = np.meshgrid(x, y) U = harmonic_function(X, Y) # ラプラシアンの計算(数値微分) dx = x[1] - x[0] dy = y[1] - y[0] # 2次偏微分 d2u_dx2 = np.zeros_like(U) d2u_dy2 = np.zeros_like(U) for i in range(1, len(x)-1): for j in range(1, len(y)-1): d2u_dx2[j, i] = (U[j, i+1] - 2*U[j, i] + U[j, i-1]) / dx**2 d2u_dy2[j, i] = (U[j+1, i] - 2*U[j, i] + U[j-1, i]) / dy**2 laplacian = d2u_dx2 + d2u_dy2 # 可視化 fig = plt.figure(figsize=(15, 5)) # 調和関数 ax1 = fig.add_subplot(131, projection='3d') ax1.plot_surface(X, Y, U, cmap='viridis', alpha=0.8) ax1.set_xlabel('x') ax1.set_ylabel('y') ax1.set_zlabel('u(x,y)') ax1.set_title('調和関数: u = x² - y²') # 等高線図 ax2 = fig.add_subplot(132) contour = ax2.contour(X, Y, U, levels=20, cmap='viridis') ax2.clabel(contour, inline=True, fontsize=8) ax2.set_xlabel('x') ax2.set_ylabel('y') ax2.set_title('等高線図') ax2.axis('equal') # ラプラシアン ax3 = fig.add_subplot(133) laplacian_plot = ax3.imshow(laplacian[1:-1, 1:-1], extent=[-2, 2, -2, 2], origin='lower', cmap='RdBu', vmin=-0.1, vmax=0.1) plt.colorbar(laplacian_plot, ax=ax3, label='∇²u') ax3.set_xlabel('x') ax3.set_ylabel('y') ax3.set_title(f'ラプラシアン (max: {np.max(np.abs(laplacian[1:-1,1:-1])):.2e})') plt.tight_layout() plt.savefig('laplace_harmonic_function.png', dpi=300, bbox_inches='tight') plt.show() # 最大値原理の検証 print("=== 最大値原理の検証 ===") print(f"内部の最大値: {np.max(U[10:-10, 10:-10]):.4f}") print(f"境界の最大値: {np.max([np.max(U[0,:]), np.max(U[-1,:]), np.max(U[:,0]), np.max(U[:,-1])]):.4f}") print(f"内部の最小値: {np.min(U[10:-10, 10:-10]):.4f}") print(f"境界の最小値: {np.min([np.min(U[0,:]), np.min(U[-1,:]), np.min(U[:,0]), np.min(U[:,-1])]):.4f}")

出力解説:

📚 まとめ

💡 演習問題

  1. 調和関数の検証: \(u(x,y) = xy\) が調和関数でないことを、ラプラシアンを計算して確認せよ。
  2. 極座標での解: 半径 \(a\) の円盤上で境界条件 \(u(a,\theta) = \cos(2\theta)\) を満たすラプラス方程式の解を求め、可視化せよ。
  3. グリーン関数の応用: 矩形領域でのグリーン関数を用い、熱源 \(f(x,y) = \delta(x-0.5, y-0.5)\) に対する温度分布を求めよ。
  4. 収束の比較: SOR法の緩和係数 \(\omega\) を 1.0 から 2.0 まで変化させ、最適な \(\omega\) を求めよ。
  5. 複雑形状: 円形の穴が開いた矩形領域でのラプラス方程式を解き、穴の周りの温度分布を可視化せよ。