Kevin T. Chu
SAMR Phase Field Model Development Notes
Implementation Summary
- Fixed "grid anisotropy" bug. It turns out that it was a bug using
too small a number of ghost cells when running the code in parallel.
- Changed algorithm for computing grad(phi) when computing theta.
I now take the average value of grad(phi) computed using central
differencing at the centers of the two grid cells immediately
next to the face on which the flux is being computed.
- I used second-order Runge-Kutta for time integration because it yields
an error that is O(dx^2) in space and O(dt^2=dx^4) in time.
Results Summary
- Testing showed that near the interface, the gradient is very
sensitive to the numerical scheme used to compute it.
I suspect that higher-order schemes may help make the gradient calculation
less sensitive to the numerical scheme, but I have not tested this yet.
- Both 5pt and 9pt stencils now give good results.
- The problem with the 5pt scheme in my earlier runs was that
the time step was set too large for the heat equation part of
the simulation. It lead to inaccuracies in the temperature
field near the interface which degraded the evolution of the
interface. I have fixed this problem.
- The results shown are mostly for uniform grids, but there are two that
show the results for a SAMR grid with three refinement levels.
Performance Summary
- The time to run each uniform grid simulation was run from t=0 to
t=0.5 and took about 2.5 minutes using two processors on a MacBook
Pro with Intel Core 2 Duo processor.
- The time to run each SAMR simulation was run from t=0 to t=0.3
with three refinement levels (ratio to coarser levels = 4, 2)
and took about 100 minutes (not dedicated) using two processors on
a MacBook Pro with Intel Core 2 Duo processor. The simulation starts
out very fast and gets slower as time progresses because the region
covered by the fine grid grows larger and larger. This is where
higher-order discretizations would help because then we don't need
as fine a grid at the finest levels.
Implementation Summary
- Changed algorithm for computing theta. I was using a way to compute
the gradient of phi that lead bad estimates for theta.
- Fixed bugs in fortran routines for flux.