2D Helmholtz decomposition on a C grid

バージョン 1.0.2 (5.56 KB) 作成者: Geoff Stanley
Given a vector field (u,v) on an Arakawa C grid, solve for the potential chi and streamfunction psi in (u,v) = grad[chi] + curl[psi]
ダウンロード: 191
更新 2022/6/15

ライセンスの表示

Perform Helmholtz decomposition of a 2D vector field (such as a velocity) whose components are staggered on the Arakawa C grid, solving for chi and psi in
(u,v) = grad[chi] + curl[psi].
The C grid variables are laid out around a central point chi_{i,j} as follows:
psi_{i,j+1}----v_{i,j+1}------psi_{i+1,j+1}
| | |
u_{i,j}-------chi_{i,j}-------u_{i+1,j}
| | |
psi_{i,j}------v_{i,j}--------psi_{i+1,j}
The domain can be periodic or not, and need not be simply connected (it can have holes).
Internally, the function will select the largest connected component. Only one connected component is handled at a time. If you wish to work on a different connected component, simply preselect it -- look at the lines involving CC2periodic(bwconncomp(...)) for how to do that.
The image shows the streamfunction psi of the horizontal velocity field in the ocean at 300m depth (data from OCCA). See the example script to reproduce this result.

引用

Geoff Stanley (2024). 2D Helmholtz decomposition on a C grid (https://www.mathworks.com/matlabcentral/fileexchange/75614-2d-helmholtz-decomposition-on-a-c-grid), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2017a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
タグ タグを追加

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.0.2

Example provided

1.0.1