2d_blob_position

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Moving_Mesh >

2d_blob_position

Previous pageReturn to chapter overviewNext page

{ 2D_BLOB_POSITION.PDE

 

 This problem illustrates moving meshes in 2D.

 A circular boundary shrinks and grows sinusoidally in time.

 The mesh coordinates are solved directly, without a mesh velocity variable.

 

 See 2D_BLOB_VELOCITY.PDE for a version that uses mesh velocity variables.

 

}

TITLE 'Pulsating circle in 2D - position specification'

 

COORDINATES

 cartesian2

 

VARIABLES

 Phi           { the temperature }

 Xm = MOVE(x) { surrogate X }

 Ym = MOVE(y) { surrogate Y }

 

DEFINITIONS

 K = 1         { default conductivity }

 R0 = 0.75     { initial blob radius }

 Um = dt(Xm)

 Vm = dt(Ym)

 

INITIAL VALUES

 Phi = (y+1)/2

 

EULERIAN EQUATIONS

 Phi:  Div(-k*grad(phi)) = 0

 Xm:  div(grad(Xm)) = 0

 Ym:  div(grad(Ym)) = 0

 

BOUNDARIES

REGION 1 'box'

  START(-1,-1)

    VALUE(Phi)=0

    VELOCITY(Xm)=0 VELOCITY(Ym)=0

  LINE TO (1,-1)

    NATURAL(Phi)=0

  LINE TO (1,1)

    VALUE(Phi)=1

  LINE TO (-1,1)

    NATURAL(Phi)=0

  LINE TO CLOSE

REGION 2 'blob' { the embedded blob }

   k = 0.001

  START 'ring' (R0,0)

    VELOCITY(Xm) = -0.25*sin(t)*x/r

    VELOCITY(Ym) = -0.25*sin(t)*y/r

  ARC(CENTER=0,0) ANGLE=360 TO CLOSE

 

TIME 0 TO 2*pi

 

MONITORS

for cycle=1

  grid(x,y)

  contour(phi)

PLOTS

FOR T = 0 BY pi/20 TO 2*pi

  GRID(x,y)

  CONTOUR(Phi)  notags nominmax

  VECTOR(-k*grad(Phi))

  CONTOUR(magnitude(Um,Vm))

  VECTOR(Um,Vm) fixed range(0,0.25)

  ELEVATION(Phi) FROM (0,-1) to (0,1)

  ELEVATION(Normal(-k*grad(Phi))) ON 'ring'

END