{ MELTING.PDE }
{ ************************************************************
This problem shows the application of FlexPDE to the melting of metal.
We choose as our system variables the temperature, "temp", and the
fraction of material which is solid at any point, "solid".
The temperature is given by the heat equation,
rho*cp*dt(temp) - div(lambda*grad(temp)) = Source
where cp is the heat capacity, rho the density and lambda the conductivity.
The latent heat, Qm, is an amount of heat released as "Solid" changes from
zero to one. We have Qm = integral[0,1]((dH/dSolid)*dSolid), or assuming
dH/dSolid is constant, dH/dSolid = Qm.
Then heat source from freezing is
dH/dt = (dH/dSolid)*(dSolid/dt) = Qm*dt(Solid).
We assume that the solid fraction can be represented by a function
solid = 0.5*erfc((temp-Tm)/T0)
where Tm is the melting temperature, and T0 is a temperature range over
which the melting transition occurs. Since there are no spatial derivatives
in this equation, we introduce a diffusion term with small coefficient to act
as a noise filter.
The particular problem addressed here is a disk of cold solid material
immersed in a bath of liquid. The initial temperatures are such that material
first freezes onto the disk, but after equilibrium is reached all the material
is liquid. The outer boundary is insulated.
Since the initial condition is a discontinuous distribution, we use a separate
REGION to define the cold initial disk, so that the grid lines will follow the
shape. We also add a FEATURE bounding the disk to help the gridder
define the abrupt transition. SELECT SMOOTHINIT helps minimize
interpolator overshoots.
history(temp) at (0.051,d/2) at (0.075,d/2) at (R_plate,d/2)
history(temp) at (0.051,d) at (0.075,d) at (R_plate,d)
history(solid) at (0.051,d/2) at (0.075,d/2) at (R_plate,d/2)
history(solid) at (0.051,d) at (0.075,d) at (R_plate,d)
history(integral(cp*temp+Qm*(1-solid))) as "Total Energy"