pie title 语言分比
"Python":90
"C/C++":10
pie title 内容分比
"算法模型":90
"物理、水平衡、压力、对流、放电":80
"热力学":20
"数学、偏微分方程、线性方程、扩散方程":70
"化学":20
浅水方程是一组双曲偏微分方程,用于描述流体中压力面以下的流动(有时但不一定是自由表面)。浅水方程是从质量守恒定律和线性动量守恒定律(纳维-斯托克斯方程)推导出来的,即使浅水假设不成立(例如跨越水跃),该方程仍然成立。在水平床的情况下,科里奥利力、摩擦力和粘性力可以忽略不计,浅水方程为:
$$ \begin{aligned} & \frac{\partial(\rho \eta)}{\partial t}+\frac{\partial(\rho \eta u)}{\partial x}+\frac{\partial(\rho \eta v)}{\partial y}=0 \\ & \frac{\partial(\rho \eta u)}{\partial t}+\frac{\partial}{\partial x}\left(\rho \eta u^2+\frac{1}{2} \rho g \eta^2\right)+\frac{\partial(\rho \eta u v)}{\partial y}=0 \\ & \frac{\partial(\rho \eta v)}{\partial t}+\frac{\partial}{\partial y}\left(\rho \eta v^2+\frac{1}{2} \rho g \eta^2\right)+\frac{\partial(\rho \eta u v)}{\partial x}=0 . \end{aligned} $$
使用乘积法则展开上面的导数,得到浅水方程的非保守形式。由于速度不受基本守恒方程的影响,非保守形式在冲击或水跃中不成立。还包括科里奥利力、摩擦力和粘性力的适当项,以获得(对于恒定流体密度):
$$ \begin{aligned} & \frac{\partial h}{\partial t}+\frac{\partial}{\partial x}((H+h) u)+\frac{\partial}{\partial y}((H+h) v)=0 \\ & \frac{\partial u}{\partial t}+u \frac{\partial u}{\partial x}+v \frac{\partial u}{\partial y}-f v=-g \frac{\partial h}{\partial x}-k u+\nu\left(\frac{\partial^2 u}{\partial x^2}+\frac{\partial^2 u}{\partial y^2}\right) \\ & \frac{\partial v}{\partial t}+u \frac{\partial v}{\partial x}+v \frac{\partial v}{\partial y}+f u=-g \frac{\partial h}{\partial y}-k v+\nu\left(\frac{\partial^2 v}{\partial x^2}+\frac{\partial^2 v}{\partial y^2}\right) \end{aligned} $$
通常情况下,u 和 v 的二次项(表示整体平流的影响)与其他项相比较小。这称为地转平衡,相当于说罗斯贝数很小。假设波高与平均高度相比非常小(h ≪ H),我们有(没有侧向粘性力):
$$ \begin{aligned} & \frac{\partial h}{\partial t}+H\left(\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}\right)=0 \\ & \frac{\partial u}{\partial t}-f v=-g \frac{\partial h}{\partial x}-k u \\ & \frac{\partial v}{\partial t}+f u=-g \frac{\partial h}{\partial y}-k v \end{aligned} $$
Python示例计算
import time
import numpy as np
import matplotlib.pyplot as plt