sliptube_explicit_reconnect

<< Click to Display Table of Contents >>

Navigation:  Sample Problems > Usage > Moving_Mesh >

sliptube_explicit_reconnect

Previous pageReturn to chapter overviewNext page

{

  SLIPTUBE_EXPLICIT_RECONNECT.PDE  

 

  This problem demonstrates mesh reconnection in a thin gap between a rotating and a stationary component.

  The structure is similar to an electric motor.

 

  The gap is split in two to better control the mesh connections.

 

  We also make use of the EXPLICIT facility to bypass the computaton of mesh motion.

}

title

  ' Tube With slip surface'

 

variables

  u(1) ! a heat variable demonstrates the rotation

  xm = move(x)

  ym = move(y)

 

global variables

  theta(0.01) ! rotation angle

 

select

  ! select the reconnection facility.  Link-swaps will be turned on in the gap region.

  reconnect(off)

  ! select first-order interpolation to increase speed

  order=1

 

definitions

  r1 = 0.5            

  r2 = 1.0            

  q21= r2/r1

  thetadot   ! the rotation speed, set differently in each component

  thetadot1 = 1 ! the primary rotation speed

  eps = 0.02 ! the gap thickness

  k = 0.1

  source= 0

  MP = movable point(r1,0) ! define a movable point on the rotor to monitor motion

  MP1 = movable point(-r1,0)

 

lagrangian equations

  xm: dt(xm) = -ym*thetadot         ! mesh x-coordinate = -R*sin(theta)*thetadot

  ym: dt(ym) = xm*thetadot       ! mesh y-coordinate = R*cos(theta)*thetadot

  theta: dt(theta) = thetadot1

  ! compute the temperature after the motion is complete

  then

  u:   div(k*grad(u))   + source  = dt(u)

 

boundaries

  region "Stator"   ! the stator

  thetadot = 0   ! stationary

  k=0.1

  ! Explicit definition bypasses the solution.  # designates the value at an earlier time.

  ! these statements guarantee the nodal positions in the stator

  EXPLICIT(xm)=xm#1    

  EXPLICIT(ym)=ym#1

 

  start (r2,0)

  value(u)=0

      arc to (0,r2) to (-r2,0) to (0,-r2) to close

 

  ! define the second of a pair of gap regions

  region "Gap2"

   thetadot =0   ! the second gap boundary nodes do not move

   k = 0.01

  reconnect(swap)   ! turn on the node-link reconnections in the second gap

  start (r1+eps,0)

      EXPLICIT(xm)=xm#1 ! freeze the positions of the second gap boundary

      EXPLICIT(ym)=ym#1

      arc to (0,-(r1+eps)) to (-(r1+eps),0) to (0,r1+eps) to close

 

  ! define the first of the pair of gap regions

  region "Gap1"

   thetadot = thetadot1/2 ! this boundary moves at half the rotor speed

   k = 0.01

  reconnect(swap)         ! activate node-link reconnection in the first gap

  start (r1+eps/2,0)

      ! rotate the inter-gap boundary at half the rotor speed

      EXPLICIT(xm) =xm#1*cos(thetadot1*deltat/2) - ym#1*sin(thetadot1*deltat/2)

      EXPLICIT(ym) = xm#1*sin(thetadot1*deltat/2) + ym#1*cos(thetadot1*deltat/2)

      arc to (0,-(r1+eps/2)) to (-(r1+eps/2),0) to (0,r1+eps/2) to close

 

  ! define the rotor region

  region "Rotor half"

   thetadot = thetadot1   ! rotate at full speed

   source = 0

   k=0.1

  ! define the rotor positions

  EXPLICIT(xm) =xm#1*cos(thetadot1*deltat) - ym#1*sin(thetadot1*deltat)

  EXPLICIT(ym) = xm#1*sin(thetadot1*deltat) + ym#1*cos(thetadot1*deltat)

               

  ! use the movable position to start the rotor arc.  This allows us to monitor the motion.

  start (MP)

      arc to (0,-r1) to (-r1,0) to (0,r1) to close

 

  ! Divide the rotor in half, with a heat source in one half, to demonstrate the solution integrity

  region "Heated Rotor half"

   thetadot = thetadot1

   source = 1

   k=0.1

  EXPLICIT(xm) =xm#1*cos(thetadot1*deltat) - ym#1*sin(thetadot1*deltat)

  EXPLICIT(ym) = xm#1*sin(thetadot1*deltat) + ym#1*cos(thetadot1*deltat)

               

  start (0,r1)

      arc to (-r1,0) to (0,-r1) line to close

 

! run for two full rotations

time 0 to 2*2*pi

 

monitors

  for cycle=1

    grid(x,y)  paintregions

    contour(u)

    contour(space_error(u))

 

    history(theta)

     

 

plots

  for t = 0 by pi/4 to endtime

    grid(x,y)  paintregions

    contour(u) as "Temperature"

    contour(u)   on "Gap1" on "Gap2" as "Gap Temperature"

    contour(source) painted

    ! show the integral of temperature in the gap to determine when the solution has stabilized

    history(integral(u,"Gap")) as "Gap Integral"

    ! show the x-position of the moving point to monitor the rotation

    history(xm, r1*cos(theta)) at (MP) as "Position Monitor"

 

end