Top Banner
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
14

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

Dec 27, 2015

Download

Documents

Rodger Hoover
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 2: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences 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.

Page 3: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 4: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

MMulti-domain examplesulti-domain examples

From simple From simple to complexto complex

Page 5: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 6: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 7: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 8: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 9: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 10: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 11: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 12: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 13: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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

Page 14: Grid Coupling in TIMCOM 鄭偉明 TAY Wee-Beng Department of Atmospheric Sciences National Taiwan University.

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