Following many two-dimensional turbulence animations, it is time to share computer code! Implementation of a vorticity-streamfunction method with a pseudo-spectral discretization + third-order Runge-Kutta for time integration (our CFD class semester project). The
@MATLAB
code:
M
時間がかかるループ処理をするときには必須。
N = 100;
f = waitbar(0);
for ii = 1:N
mgs = "処理中 (" + ii + "/" + N + ")";
waitbar(ii/N, f, mgs);
end
横着してコマンドウィンドウに何らかの数を表示させるだけで妥協することも多いですが。