VTT-ProperTune / OpenPFC

Open-source solver for phase field crystal type (PFC) type problems.
GNU Affero General Public License v3.0
8 stars 4 forks source link

Moving boundary condition interface tracking improvement #45

Open suviraj1 opened 2 months ago

suviraj1 commented 2 months ago

Currently for the implementation of the moving boundary condition the interface is tracked by taking the first/last point where the value of the field of interest passes a hard-set value of 0.1. This works quite well for the phi field for a solid, since the atomic peaks are very likely to cross that value, but might not work for phi with a very low amplitude or low average density, and will not work for a continuously changing field such as concentration. Instead, this boundary condition should probably track the local average of the field of interest (such as how the mean-field phi is implemented in the main code) and see where that crosses a threshold value set by the user - by default, the midpoint between the high and low densities. Alternatively, for the phi field at least, it is possible to track the interface location by computing the amplitude of the field at a point A[x] = |n|_mf - nmf, and this will be zero in the liquid and nonzero in the solid. That wouldn't work for concentrations, though.