grid coupling in timcom 鄭偉明 tay wee-beng department of atmospheric sciences national taiwan...

14
Grid Coupling in Grid Coupling in TIMCOM TIMCOM 鄭鄭鄭 鄭鄭鄭 TAY Wee-Beng TAY Wee-Beng Department of Atmospheric Department of Atmospheric Sciences Sciences National Taiwan National Taiwan University University

Upload: rodger-hoover

Post on 27-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Grid Coupling in Grid Coupling in TIMCOMTIMCOM

鄭偉明鄭偉明TAY Wee-BengTAY Wee-Beng

Department of Atmospheric Sciences Department of Atmospheric Sciences National Taiwan University National Taiwan University

MotivationMotivation

MMulti-domain problemsulti-domain problems Problems which require 2 or more domains (grids) Problems which require 2 or more domains (grids)

to solve efficiently.to solve efficiently. Arises dArises due to difference in topography or ue to difference in topography or

restriction in computation resources.restriction in computation resources.

ObjectiveObjective

TTo transfer values from grid A to B and vice o transfer values from grid A to B and vice versa efficiently and conservativelyversa efficiently and conservatively

EfficientlyEfficiently AAlgorithm must not take up too much lgorithm must not take up too much

computational resources.computational resources. RRelatively simple to program.elatively simple to program.

ConservativelyConservatively Flux must be conserved, minimal dissipation.Flux must be conserved, minimal dissipation. NNo appearance of unrealistic value.o appearance of unrealistic value. To ensure stabilityTo ensure stability

MMulti-domain examplesulti-domain examples

From simple From simple to complexto complex

Multi-domain in TIMCOMMulti-domain in TIMCOM

FeaturesFeatures Both Cartesian grids Both Cartesian grids

(TAI and NPB)(TAI and NPB) Same orientation, fixed Same orientation, fixed

in spacein space NPB is twice the size of NPB is twice the size of

TAITAI BBoundary faces of TAI oundary faces of TAI

positioned exactly at positioned exactly at center of NPB cellscenter of NPB cells

Algorithm: TAI to NPB gridAlgorithm: TAI to NPB grid

UWNPB(JJ,K)= U(I3,J,K) +U(I3,J+1,K)UWNPB(JJ,K)= U(I3,J,K) +U(I3,J+1,K) UWNPB is west face valueUWNPB is west face value U(I,J,K) from TAIU(I,J,K) from TAI I3 = I0-3I3 = I0-3

Algorithm: TAI to NPB gridAlgorithm: TAI to NPB grid

U2NPB(JJ,K)=0.25*[U2(I2,J,K)+ U2(I1,J,K)+ U2NPB(JJ,K)=0.25*[U2(I2,J,K)+ U2(I1,J,K)+ U2(I2,J+1,K)+ U2(I1,J+1,K)]U2(I2,J+1,K)+ U2(I1,J+1,K)]

U2NPB is center valueU2NPB is center value U2NPB = U@(I=2)U2NPB = U@(I=2) U2(I,J,K) from TAIU2(I,J,K) from TAI I2 = I0-2I2 = I0-2 Average of 4 valuesAverage of 4 values Same for V, S and TSame for V, S and T Same for U1NPB,Same for U1NPB, except different cellexcept different cell

Using interpolated values in NPBUsing interpolated values in NPB

U(1,127,K)=IN(2,127,K)*(FLT1*UWNPB(J,U(1,127,K)=IN(2,127,K)*(FLT1*UWNPB(J,K)+ FLT2*U(1,127,K))K)+ FLT2*U(1,127,K)) U(1,127,K) is face valueU(1,127,K) is face value IN - Mask array for scalar quantities IN - Mask array for scalar quantities

IN(I,J,K)=1,0 for water, land respectivelyIN(I,J,K)=1,0 for water, land respectively UWNPB - Interpolated face value from TAIUWNPB - Interpolated face value from TAI FLT1/2 FLT1/2 –– time filter to improve stability since T time filter to improve stability since TAI AI

has finer grid, smaller time step. Use part of old has finer grid, smaller time step. Use part of old value to improve stabilityvalue to improve stability

Using interpolated values in NPBUsing interpolated values in NPB

TMP=U2NPB(J,K)-U1(2,N,K)TMP=U2NPB(J,K)-U1(2,N,K) TMP represents a small incremental differenceTMP represents a small incremental difference SSame effect as previous case to improve stabilityame effect as previous case to improve stability

U2(2,N,K)=U2(2,N,K)+TMPU2(2,N,K)=U2(2,N,K)+TMP U2(2,N,K) is center valueU2(2,N,K) is center value TTo give a smaller and smoother incremento give a smaller and smoother increment IImproves stabilitymproves stability Same for V, S and TSame for V, S and T

Using interpolated values in NPBUsing interpolated values in NPB

U2(1,N,K)=U1NPB(J,K)U2(1,N,K)=U1NPB(J,K) U2(1,N,K) is center valueU2(1,N,K) is center value U1NPB - Interpolated center value from TAIU1NPB - Interpolated center value from TAI U1NPB = U@(I=1)U1NPB = U@(I=1) Same for V, S and TSame for V, S and T No time filter due to spatial averagingNo time filter due to spatial averaging

Algorithm: NPB to TAI gridAlgorithm: NPB to TAI grid

UETAI(J,K)=U(2,(J-2)/2+127,K)UETAI(J,K)=U(2,(J-2)/2+127,K) UETAI is east face valueUETAI is east face value U(I,J,K) from NPBU(I,J,K) from NPB

Algorithm: NPB to TAI gridAlgorithm: NPB to TAI grid

UI0TAI(J,K)=U2(3,(J-2)/2+127,K)UI0TAI(J,K)=U2(3,(J-2)/2+127,K) UI0TAI is center valueUI0TAI is center value U2(I,J,K) from NPBU2(I,J,K) from NPB SSame for V, S and Tame for V, S and T

Using interpolated values in TAIUsing interpolated values in TAI

U(I1,J,K)=IN(I1,J,K)*UETAI(J,K)U(I1,J,K)=IN(I1,J,K)*UETAI(J,K) U(I1,J,K) is face valueU(I1,J,K) is face value IN - Mask array for scalar quantities IN - Mask array for scalar quantities

IN(I1,J,K)=1,0 for water, land respectivelyIN(I1,J,K)=1,0 for water, land respectively No time filterNo time filter

U2(I0,J,K)=UI0TAI(J,K)U2(I0,J,K)=UI0TAI(J,K) U2(I0,J,K) is center valueU2(I0,J,K) is center value No time filter and IN multiplication requiredNo time filter and IN multiplication required

ConclusionConclusion

Multi-domain problems requires the use of Multi-domain problems requires the use of grid couplinggrid coupling

Objective to transfer values from one grid to Objective to transfer values from one grid to anotheranother

Efficient and conservative algorithmEfficient and conservative algorithm Use of filter to ensure smooth transition and Use of filter to ensure smooth transition and

stabilitystability