﻿ Sample Problems > Usage > Moving_Mesh > 2d_bubble_reconnect

2d_bubble_reconnect

Navigation:  Sample Problems > Usage > Moving_Mesh >

2d_bubble_reconnect

{    2D_BUBBLE_RECONNECT.PDE

Moving bubble with mesh reconnection.

}

TITLE "2d bubble with mesh reconnection"

SELECT

reconnect(on)

VARIABLES

phi(0.1)

xm=move(x)

ym(1e-4)=move(y)

DEFINITIONS

tlen = 2               ! length of the tube

twid = 0.25   ! half-width of the tube

u0=0.01               ! the bubble velocity

{

turnon = 0.1

u0t = u0   !  *uramp(t,t-turnon)

}

bx = 0.1                 ! initial position of the bubble center

k=0.01         ! thermal conductivity of the tube

penalty=10

! declare the front node of the bubble to be a moviable point

! define the mesh velocities for convenience

um = dt(xm)

vm = dt(ym)

! the velocity divergence

divv = dx(um) + dy(vm)

EQUATIONS

phi:   div(k*grad(phi))=0               ! a diffusion equation for example

xm:    div(grad(dt(xm))) = penalty*um   ! diffuse the mesh velocities

BOUNDARIES

! the tube

REGION 1

START(0,-twid)

value(phi) = 0

dt(xm)=0                 ! lock the tube so it doesn't move

dt(ym)=0

line to (tlen,-twid) to (tlen,twid) to (0,twid) to close

! the bubble

region 2

start(Tip)

dt(xm)=u0       ! impose the velocity of the bubble boundary

dt(ym)=0

value(phi)=1 ! force the dummy diffusion to be 1.0 on the surface of the bubble

mesh_spacing = 0.02 ! request fine meshing on the bubble

arc(center=bx,0) angle=360

to close

PLOTS

for cycle=1

grid(x,y)

contour(phi)

contour(dt(phi))

contour(um) as "Mesh Velocity"

elevation(um) from(0,0) to (tlen,0) as "Mesh Velocity"

vector(um-u0,vm)

contour(space_error(phi))

history(deltat)

END