Professional Documents
Culture Documents
Adapted A Posteriori Meshes For Burgers' Equation: Róisín Hill, Niall Madden
Adapted A Posteriori Meshes For Burgers' Equation: Róisín Hill, Niall Madden
equation
08 February, 2019
Motivation
1
u2
ut = εuxx − , for x ∈ (0, 1), t > 0, (1a)
2 x
F (u, v ) = 0 ∀v ∈ V , (2)
where Z
F (u, v ) = εu 0 v 0 + (ut + uu 0 )vdx. (3)
Ω
# D e f i n e t e s t and t r i a l f u n c t i o n
v = T e s t F u n c t i o n (V)
u = F u n c t i o n (V)
# D e f i n e t e s t and t r i a l f u n c t i o n
v = T e s t F u n c t i o n (V)
u = F u n c t i o n (V)
# Assign t h e boundary c o n d i t i o n
bc = D i r i c h l e t B C ( V , g , " on_boundary " )
# D e f i n e t e s t and t r i a l f u n c t i o n
v = T e s t F u n c t i o n (V)
u = F u n c t i o n (V)
# Assign t h e boundary c o n d i t i o n
bc = D i r i c h l e t B C ( V , g , " on_boundary " )
w h i l e t <= T :
# D e f i n e weak form
F = t a u ∗ e p s i l o n ∗ d o t ( u . dx ( 0 ) , v . dx ( 0 ) ) ∗dx \
+ t a u ∗u∗u . dx ( 0 ) ∗v∗dx \
+ u∗v∗dx \
− u0∗v∗dx
# D e f i n e t e s t and t r i a l f u n c t i o n
v = T e s t F u n c t i o n (V)
u = F u n c t i o n (V)
# Assign t h e boundary c o n d i t i o n
bc = D i r i c h l e t B C ( V , g , " on_boundary " )
w h i l e t <= T :
# D e f i n e weak form
F = t a u ∗ e p s i l o n ∗ d o t ( u . dx ( 0 ) , v . dx ( 0 ) ) ∗dx \
+ t a u ∗u∗u . dx ( 0 ) ∗v∗dx \
+ u∗v∗dx \
− u0∗v∗dx
u0 . a s s i g n ( u )
t += t a u
# D e f i n e t e s t and t r i a l f u n c t i o n
v = T e s t F u n c t i o n (V)
u = F u n c t i o n (V)
# Assign t h e boundary c o n d i t i o n
bc = D i r i c h l e t B C ( V , g , " on_boundary " )
w h i l e t <= T :
# D e f i n e weak form
F = t a u ∗ e p s i l o n ∗ d o t ( u . dx ( 0 ) , v . dx ( 0 ) ) ∗dx \
+ t a u ∗u∗u . dx ( 0 ) ∗v∗dx \
+ u∗v∗dx \
− u0∗v∗dx
u0 . a s s i g n ( u )
t += t a u
Here the function ρ(x(ξ, t), t) indicates where the mesh should be
fine/coarse, and the constant γ controls the speed of the movement.
To implement this numerically we solve (4) in its weak form,
Z
(ρxξ vξ + ργxt v )dξ = 0, (5)
Ωc
N = 40 N = 5000
N = 40
Acknowledgement
This project is funded by the Irish Research
Council, (GOIPG/2017/463).