-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update doc part 1 and added solvers for velocity using sine transform.
- Loading branch information
Showing
5 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
% Copyright 2020 The MathWorks, Inc. | ||
function xu = getIntermediateU_xyRK3_dst(u, b, dt, Re, nx, ny, dx, dy, id) | ||
|
||
kx = [1:nx-1]'; | ||
ax = pi*kx/(nx); | ||
mwx = 2*(cos(ax)-1)/dx^2;% DST-I | ||
|
||
ky = [1:ny]'; | ||
ay = pi*ky/(ny); | ||
mwy = 2*(cos(ay)-1)/dy^2; % DST-II | ||
|
||
mw = mwx+mwy'; % Modified Wavenumber | ||
|
||
% 各 column 毎に変換されるので、 | ||
% column 方向(x 方向に)dst1, 転置して | ||
% y 方向に dst2、転置し返して元に戻す処理 | ||
rhshat = mydst2(mydst1(b)')'; | ||
|
||
switch id | ||
case 1 | ||
uhat = rhshat./(1-(4/15)*dt/(Re)*mw); | ||
case 2 | ||
uhat = rhshat./(1-(1/15)*dt/(Re)*mw); | ||
case 3 | ||
uhat = rhshat./(1-(1/6)*dt/(Re)*mw); | ||
end | ||
|
||
xu = mydst1(mydst3(uhat')'); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
% Copyright 2020 The MathWorks, Inc. | ||
function xv = getIntermediateV_xyRK3_dst(v, b, dt, Re, nx, ny, dx, dy,id) | ||
|
||
|
||
kx = [1:nx]'; | ||
ax = pi*kx/(nx); | ||
mwx = 2*(cos(ax)-1)/dx^2;% DST-I | ||
|
||
ky = [1:ny-1]'; | ||
ay = pi*ky/(ny); | ||
mwy = 2*(cos(ay)-1)/dy^2; % DST-II | ||
|
||
mw = mwx+mwy'; % Modified Wavenumber | ||
|
||
% 各 column 毎に変換されるので、 | ||
% column 方向(x 方向に)dst2, 転置して | ||
% y 方向に dst1、転置し返して元に戻す処理 | ||
rhshat = mydst1(mydst2(b)')'; | ||
|
||
switch id | ||
case 1 | ||
vhat = rhshat./(1-(4/15)*dt/(Re)*mw); | ||
case 2 | ||
vhat = rhshat./(1-(1/15)*dt/(Re)*mw); | ||
case 3 | ||
vhat = rhshat./(1-(1/6)*dt/(Re)*mw); | ||
end | ||
|
||
xv = mydst3(mydst1(vhat')'); | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters