-
Notifications
You must be signed in to change notification settings - Fork 0
/
hwCphit_2D.m
41 lines (38 loc) · 2.48 KB
/
hwCphit_2D.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function [Cphit_V] = hwCphit_2D(Cpsit_V,K,L,Lx,Ly,xr,yr,k,l,f,KappaD,Kappas)
%Get Cphit_V from Cpsit_V (2D) (V denotes Vortex part)
Lkt=1./((KappaD^2)/f./(K.^2+L.^2+Kappas^2)./(K.^2+L.^2+KappaD^2));
%Applying the symmeteric expression like the one seen in Salmon's
%textbook. The expression described in the paper should generate the same
%result though, but the computation time will be doubled.
%(Note the factor 2 here)
Cphit_V=1/4*1./(Lkt.^2)*2.*(...
hwFT2(Lx,Ly,xr,yr,k,l,K.^6.*Cpsit_V,L.^2.*Cpsit_V)...
-2*hwFT2(Lx,Ly,xr,yr,k,l,K.^5.*L.*Cpsit_V,K.*L.*Cpsit_V)...
+hwFT2(Lx,Ly,xr,yr,k,l,K.^4.*L.^2.*Cpsit_V,K.^2.*Cpsit_V)...
-2*hwFT2(Lx,Ly,xr,yr,k,l,K.^4.*Cpsit_V,K.^2.*L.^2.*Cpsit_V)...
+2*hwFT2(Lx,Ly,xr,yr,k,l,K.^4.*L.^2.*Cpsit_V,L.^2.*Cpsit_V)...
-2*hwFT2(Lx,Ly,xr,yr,k,l,K.^4.*Cpsit_V,L.^4.*Cpsit_V)...
+4*hwFT2(Lx,Ly,xr,yr,k,l,K.^3.*L.*Cpsit_V,K.^3.*L.*Cpsit_V)...
-4*hwFT2(Lx,Ly,xr,yr,k,l,K.^3.*L.^3.*Cpsit_V,K.*L.*Cpsit_V)...
+4*hwFT2(Lx,Ly,xr,yr,k,l,K.^3.*L.^1.*Cpsit_V,K.^1.*L.^3.*Cpsit_V)...
-2*hwFT2(Lx,Ly,xr,yr,k,l,K.^2.*L.^2.*Cpsit_V,K.^4.*L.^0.*Cpsit_V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