3D_Position_Blob

Top  Previous  Next

{

This problem illustrates moving meshes in 3D.

A spherical boundary shrinks and grows sinusoidally in time.

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

 

See 3D_velocity_blob.pde for a version that uses mesh velocity variables.

}

TITLE 'Pulsating circle in 3D - position specification'

 

COORDINATES

cartesian3

 

SELECT

prefer_speed

 

VARIABLES

Phi    { the temperature }

Xm = MOVE(x)  { surrogate X }

Ym = MOVE(y)  { surrogate Y }

Zm = MOVE(z)  { surrogate Z }

 

DEFINITIONS

K = 1    { default conductivity }

R0 = 0.75    { initial blob radius }

 

rho2 = x^2+y^2

zsphere = sqrt(R0^2-rho2)

z1, z2

Um = dt(Xm)

Vm = dt(Ym)

Wm = dt(Zm)

 

INITIAL VALUES

   Phi = (z+1)/2

 

EQUATIONS

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

Xm:  dt(Xm) = Um

Ym:  dt(Ym) = Vm

Zm:  dt(Zm) = Wm

Xm:  div(grad(Xm)) = 0

Ym:  div(grad(Ym)) = 0

Zm:  div(grad(Zm)) = 0

 

EXTRUSION

SURFACE 'Bottom' z = -1

SURFACE 'Sphere Bottom'  z=z1

SURFACE 'Sphere Top'  z=z2

SURFACE 'Top'  z=1

 

BOUNDARIES

SURFACE 1

   VALUE(Phi)=0

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

SURFACE 4

   VALUE(Phi)=1

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

 

REGION 1 'box'

z1=0   z2=0

START(-1,-1)

NATURAL(Phi)=0

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

     LINE TO (1,-1) TO (1,1) TO (-1,1) TO CLOSE

 

LIMITED REGION 2  'blob'  { the embedded blob }

z1 = -zsphere

z2 = zsphere

layer 2 k = 0.001

SURFACE 2

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

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

   VELOCITY(Zm) = -0.25*sin(t)*z/r

SURFACE 3

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

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

   VELOCITY(Zm) = -0.25*sin(t)*z/r

START 'ring' (R0,0)

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

 

TIME 0 TO 2*pi

 

MONITORS

FOR cycle=1

   GRID(x,y,z) on 'blob' on layer 2

   CONTOUR(phi) on y=0

PLOTS

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

   GRID(x,y,z) on 'blob' on layer 2 frame(-R0,-R0,-R0, 2*R0,2*R0,2*R0)

   CONTOUR(Phi)  notags nominmax on y=0

   VECTOR(-k*grad(Phi)) on y=0

   CONTOUR(magnitude(Um,Vm,Wm)) on y=0

   VECTOR(Um,Wm) on y=0 fixed range(0,0.25)

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

   ELEVATION(magnitude(Um,Vm,Wm)) FROM (0,0,-1) to (0,0,1)

 

END