You are on page 1of 60

• Basic Governing Eqn.

지배 방정식
)
• 1D Advection-Diffusion Eqn.6

태원
• Coding for Matlab

박민우
김종빈
Review of conservation equations

Mass and Momentum


V
"삶
".

-

FVOM 은
모른 점에서 -

K σ LO

]
,
.

>
3차왼

모든 점에 대해
rr- o
. 5
i
z, D
w 유속

D
FIuX
n
1≥….
+) Heat

인 1 % 더
e .

( Energy FluX
어떻게 근할까?

기억하고
Mass per volume per time Momentum
FIUY 있을 것
dz
(kg/(m2 s)) 윤동량
질량 X 속도

u u + ( u )  dx
x
면적
유속
y, ②
v
물성다
③① .

dy
온도 염분 운동량
물성량 ex)
. ,

x ,①
u 유속
A 단위 시간동안 단위 면적에 들어온 양 dx
Flux of mass in (kg/s) =u  dy  dz Flux of mass out (kg/s) = u  dy  dz

0

0

+ ( u )  dx  dy  dz
구축 방향
 x
Net Flux of mass in ‘x’ −
ㅇ ( u )  dx  dy  dz
= x

Net Flux of mass in ‘y’ − ( v )  dx  dy  dz
= y

Net Flux of mass in ‘z’ − ( w )  dx  dy  dz
= z
The change of mass per unit time going through the volume element is:
M 
=   dx  dy  dz 
~> 시간에 대한 질량 변화량

t t
     
  dx  dy  dz  =  − ( u ) − ( v ) − ( w )dx  dy  dz
t  x y z 
And the change of mass per unit time per unit volume is:
A
   
x 질량 보존 방정식

+ ( u ) + ( v ) + ( w ) = 0
t x y z

6
which is the same as:

+u

+v

+w
  u v w 
+  + +  =0
t x y z  x y z 
or 호일러리언
좌표계 고정:

1 D u v w
+ + + =0
 Dt x y z

1 D u v w
+ + + =0
( 물은 압축이 안 된다고 가정)  Dt x y z

-"
스수만며
Fresh

D
Taking  0 Boussinesq approximation Iu compressible 비압축성 >

Dt
u v w > 중력가속도 )g 관련된
~

미음 e tm 변하지 않는 말X
m 것은 (
+ + =0
= 0 # =

t
V 변하지 않음 밀로값만 남김 나머지는
x y z

.
무시 ,

비 압축성
유첸 ⇒

.
This is the Continuity Equation or Equation of Conservation of Mass

How valid is the Boussinesq approximation in the OCEAN?

How would you determine that? 수심은 별로 안 변해서


연직으로 적분할 게임 천수
방정식에
u 0.1 m/s = O[10-6 ]

=
x 100 km iorder
D
ㅇ Dt
= 1 sigma-t throughout one day

= 1 / (24*3600.) = 1.15

1 D
10-5

But
 Dt

= O 10 −8
-
 2 ordev차이나서무시할 수 있다 .
z

x
Continuity Equation in Bulk Form:R + P + V0 +  = E + Vb + 
Conservation ofO
Salt:
DS
= diffusivity diffusion강도
나타내는 계수

Dt
N
S S S S   S    S    S 
t
+u
x
+v
y
+w =
 z x ㅇ
 x x  + y
K

K

+

K
 y y  z  z z 

salt aqvection salt diffusion

Conservation of ㅇ
Heat:

T T T T   T    T    T 
+u +v +w =  +   + 
t x y z x  x x  y  y y  z  z z 
  

Equation of State:
 =  [S ,T , p ] 주어지는 값
z

Sb

S0

x
Continuity Equation in Bulk Form:R + P + V0 +  = E + Vb + 

Salt Conservation Equation in Bulk Form: VbSb = V0S0


Conservation of Momentum (Equations of Motion)
 
ma =  F

 F
라랑지안
방식 a=  m ( 거출)
U
 u u u u 
 t + u x + v y + w z  [ y 출,
  
rv
 dV  v  v  v  v
a= = +u +v +w 
dt  t x y z w  ( 저출 )

 w w w w 
 +u +v +w 
 t x y z 
고 d
방향 4축 방향
급춰 방향
x축 advection
advection
advection

 F
m
= Pressure gradient + friction+ tides+ gravity+ Coriolis

Pressure gradient: Barotropic and Baroclinic

1
Friction: Surface, bottom, internal

Tides: Boundary condition

Gravity: Only in the vertical

Coriolis: Only in the horizontal

REMEMBER, these are FORCES PER UNIT MASS



 F
m
= Pressure gradient + friction+ tides+ gravity+ Coriolis

Pressure gradient: Barotropic and Baroclinic


ㅡ ㅡ

Friction: Surface, bottom, internal

Tides: Boundary condition

Gravity: Only in the vertical

Coriolis: Only in the horizontal

REMEMBER, these are FORCES PER UNIT MASS



Ph = −g dz
z
Hydrostatic Pressure


P = Pa − g dz
z
Total Pressure

Pressure gradient force per unit mass


← …

>
중요!
A 1 
sF

1 P 1  Pa   


− =  − g −g dz 
 x   x x x 
 z 
Barometric Barotropic Baroclinic
대기압 경사수면경사에
의한 밀도 수평
pressuve
Note that even if the density is constant with depth, the horizontal pressure
gradient increases with depth if there is a horizontal density gradient

 F
m
= Pressure gradient + friction+ tides+ gravity+ Coriolis

Pressure gradient: Barotropic and Baroclinic

Friction: Surface, bottom, internal

Tides: Boundary condition

Gravity: Only in the vertical

Coriolis: Only in the horizontal

REMEMBER, these are FORCES PER UNIT MASS


Momentum이 Piffusio 에되고있는 것
-
Friction

  u    u    u 
Ax +  Ay  + Az
x  x  y  y  z  z 
  


u  s  aCdW x W
@ surface: Az = =
바람이 분리 z  

u  b  C bu V  
@ bottom: Az = = = Cbu V  ru; r  Cb V
z  
g 

u  z
@ interior: Az = ?  f Ri ; Ri =
z
2 2
마찰은 유체 내에서  u
  +   v
난류의 형태로 나타남  z   z 
)
(
2 미분형태로


 F
m
= Pressure gradient + friction+ tides+ gravity+ Coriolis

Pressure gradient: Barotropic and Baroclinic

Friction: Surface, bottom, internal

Tides: Boundary condition

Gravity: Only in the vertical

Coriolis: Only in the horizontal

REMEMBER, these are FORCES PER UNIT MASS


Gravity

[0, 0, g] = [0, 0, 9.81]

Coriolis

[-fv, fu, 0]
f = 2 sin 
2
=
24 h
  wsT

)
u v
Cans더
ma =  F
~
미지수 5 개 ⇒

식 5개


u u u u  g    u    u    u 
t
+u
x
+v
y
+w
z
− fv = − g −
x  
z
x
dz +  Ax  +
x  x  y  Ay y  + z  Az z 
   

v v v v  g    v    v    v 
t
+u
x
+v
y
+w
z
+ fu = −g −
y 
z

y
dz + Ax + Ay + Az
x  x  y  y  z  z 
1 P
0= + g ( 정수압 법칙 )
 z
u v w
+ + =0
x y z
S S S S   S    S    S 
+u +v +w =  x x  + y
K K + K
 y y  z  z z 
t x y  z x    
T T T T   T    T    T 
+u +v +w =  +   + 
t x y z x  x x  y  y y  z  z z 
  

 =  [S ,T , p ]
1차원 격자 제작

전통적으로는 사각 격자에서 출발

비구조 격자

의 장점스
수 내가 원하는 것 더 자세히 볼 수 있.
수 수체 모델 만들기까지 더 어려움 ,

의 훨씬 정확한 결과
구조 형태 격자 -

의 컴퓨터 좋아야 함 ( FDM)


초기장

~~
1D Adv-Diff Modelling
파이프 내 속도 일정


부를

I

*

O Fickss Law 이쪽과


관련림.

Nㅡ
diffusive fluX

(
A
비례 상수 (공간적 농도차이 )

f를 ( 생각
쉽게 S
salknity ) 라
Salknity

Oe D)
S
US 양
=

염분의 water


[
volume
X
=

t다.tn " = 다여 논해높도곳에서일은공로감 .

쳐버

1
↑ .
.

09 -
(: 높은 곳에서
, 낮은 곳으로)
m
0
-

f 자리에
H
나 ⇒ 색
at
Advection equation s ↑

1
+ ktvi
.

없다

-
K [ 뉴]
형다
o


= 에 =

=
.
. [T
~
N 다 - .
.

맡는 기네
= 시때
-

fik1 전방차분
iuitiul ondition

f (ㅡ n)
t
-

+6
초기조건
(
n
=
o :

뜨 = ~
m
후방차분 Condition
~

여 ) 경계 조건 처리 :
Boundary

N
f (u - ou :

fcan
~ 증앙차분
-

Treatment
~
~
~
on " -

7 -fcv
~𝜕𝑓 𝜕𝑓 냐일대
)

M
on
f (av -
:

스 Dn boundary .

+𝑈 =0
2

김 b

𝜕𝑡 𝜕𝑥 "
'

ny
.
" p .

i
cQr

성거
k
탑≈

[

(입의의 node )
flttotfuy 가정) t 0 일 때
이 5

]
=

ot "P
o
T
" " l
00

"

finton) f( ) f(ttot)
밟한 빼고의
-

알 수 있음.
f(t) finton ) fiu)

,
,

ex) n계 = 0

5명 f1 ;0 fjti -f
:

5
월 f5

f
-

-
=
v -
=
vrom
-

on

fj onot 의 (tfjoe
= fsi
-s )
Advection equation


.
위치가 공간적으로 변하고있음
Diffusion equation
의언한
Diffusion DaivDwatevF ~>이런강도 표현
mytV 6이

밟다 맑다 .


얼마나 확산을 빨리 시키느냐 .
=

K *
[ vT ]
ii. 약J
+ D
D -
( =

[i
*

D: ffusi vity
=

길이 속도

𝜕𝑓 𝜕2𝑓
=𝐷 2
𝜕𝑡 𝜕𝑥

Normal =
Pressure
Stress N

뽀 I Tangential ) Sheav
F/
A

등 동일한 기준하에 얼마만큼 가힘이 작용하는지


비교하기 위해
Diffusion equation

L
평형이 될 때까지 Diffusion 진.

~
d DD : 확산 계수
강도 조절은
-
~~
운동량 퍼지는 계수~> 마찰계수
Advection-Diffusion equation

𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
Advection-Diffusion equation

이동하면서 확산


𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥

e
4촛
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥

Taylov 급수

in차 order

짜글거리는 ←
홀수 diffusiow .
truncation evror 중 가장큼

:
이짝수이 차수가 올라갈 수록 와rr ↓

1
O

Discretization .
차분화 truncation evror
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥


ㅇ ㅇ

나중에 기나눌 거니가

d 2차 order
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥

𝜕𝑓(𝑥) 𝑓 𝑥 + ℎ − 𝑓(𝑥 − ℎ)
=
𝜕𝑥 2ℎ
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥

2 치차
order
2차 공간

정확도

𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥

시간에 대해Ii 차 order

. r
공간에
2 x차
대해
order

~
수치 해석 skin

[ ]
~> 코딩하면 수치 해석 가능 .
모델 수행 순서도

격자 제작

초기장 구성

수치모델 모의

결과값 가시화 / 결과 분석
1차원 격자 제작

101
1차원 격자 제작(답)

f=zeros(n,1);
Advection equation

𝜕𝑓 𝜕𝑓
+𝑈 =0
𝜕𝑡 𝜕𝑥
Advection equation
초기장 제작

1
sin 2 ∗ 𝑝𝑖
2
초기장 제작(답)

for i=1:n,
f(i)=0.5*sin(2*pi*h*(i-1));
end
Dt=0.05

Dt=0.0005
Diffusion equation

𝜕𝑓 𝜕2𝑓
=𝐷 2
𝜕𝑡 𝜕𝑥

1
Diffusion equation

1
Advection-Diffusion equation

𝜕𝑓 𝜕𝑓 𝜕2𝑓
+𝑈 =𝐷 2
𝜕𝑡 𝜕𝑥 𝜕𝑥
Advection-Diffusion equation

1
Advection-Diffusion equation
1
나면

erv
해보고
code 왜 나는지
Courant–Friedrichs–Lewy condition
The one-dimensional case
For one-dimensional case, the CFL has the following
form:
vQ

여 𝐶=
𝑢∆𝑡
∆𝑥
≤ 𝐶𝑚𝑎𝑥

where the dimensionless number is called the Courant


CFL 조건

Uot < Dn

number,
u is the magnitude of the velocity (whose dimension DU 줄이면 어떻게
is length/time) 될까?
Δt is the time step (whose dimension is time)
Δx is the length interval (whose dimension is

ervogAs
length).
trucatin

You might also like