﻿ Sample Problems > Usage > Stop+Restart > restart_import

# restart_import

Navigation:  Sample Problems > Usage > Stop+Restart >

# restart_import   {  RESTART_IMPORT.PDE

This example reads the RESTART transfer file created by

RESTART_EXPORT.PDE and resumes execution at the exported time.

}

TITLE 'Stop and Restart Test - Import'

VARIABLES

temp(100)

psi(0.001)

w(1)

DEFINITIONS

Lx = 1   Ly = 0.5

Gy = 980

sigma_top = 0.01     { surface heat loss coefficient }

sigma_bowl =  1     { bowl heat loss coefficient }

k =  0.0004         { thermal conductivity }

alpha = 0.001       { thermal expansion coefficient }

visc = 1

heatin = min(10,t)

t0 = 50

rho0 = 1

rho = rho0*(1 - alpha*temp)

cp = 1

u = dy(psi)

v = -dx(psi)

penalty = 5000

{ Read in the file exported by restart_export.pde.

Use the imported mesh and problem time. }

INITIAL VALUES

restart("restart_export_output/restart_export_restart.xfr")

EQUATIONS

temp: div(k*grad(temp)) = rho0*cp*(dt(temp) + u*dx(temp) + v*dy(temp))

psi:  div(grad(psi)) + w = 0

w:    dt(w) + u*dx(w) + v*dy(w) = visc*div(grad(w)) - Gy*dx(rho)

BOUNDARIES

region 1

{ on the arc of the bowl, set Psi=0, apply conduction loss to T,

and apply penalty function to w to enforce no-slip condition. }

start(0,0)

natural(temp) = -sigma_bowl*temp

value(psi) = 0

natural(w)=penalty*tangential(u,v)

{ on the top, continue the prior BC for Psi,

but apply a heat input and loss to T.

Apply natural=0 BC (no vorticity transport) for w }

natural(w)=0

line to (0,Ly)

{ in the symmetry plane assert w=0, with a reflective BC for T }

value(w)=0

line to close

TIME 0 to 100

MONITORS

for cycle=5 { watch what's happening }

contour(temp) as "Temperature"

contour(psi) as "Stream Function"

contour(w)   as "Vorticity"

vector(curl(psi)) as "Flow Velocity" norm

PLOTS

for t = 1 by 1 to 10 by 10 to endtime

grid(x,y)

contour(temp) as "Temperature"  painted

contour(psi) as "Stream Function"

contour(w)   as "Vorticity"  painted

vector(curl(psi)) as "Flow Velocity" norm

contour(rho) as "Density"  painted

HISTORIES

history(temp) at (0.1*Lx,Ly) (0.2*Lx,Ly) (0.5*Lx,Ly) (0.8*Lx,Ly)

(0.7*Lx,0.5*Ly) (0.04*Lx,0.1*ly) as "Temperature"

history(u) at (0.1*Lx,Ly) (0.2*Lx,Ly) (0.5*Lx,Ly) (0.8*Lx,Ly)

(0.7*Lx,0.5*Ly) (0.04*Lx,0.2*Ly) as "X-velocity"

history(v) at  (0.04*Lx,0.1*ly) as "Y-velocity"

history(v) at  (0.04*Lx,0.1*ly) vs sqrt(t) as "Y-velocity"

history(psi) at (0.52,0.38)

END