prisms-center / phaseField

PRISMS-PF: An Open-Source Phase-Field Modeling Framework
https://prisms-center.github.io/phaseField/
Other
229 stars 119 forks source link

Adding support for multiple nuclei of the same order parameter #215

Closed supriyoumich closed 2 months ago

supriyoumich commented 3 months ago

The changes are specific to nucleation model. As there can be numerous nuclei in a given simulation, it is computationally expensive to use separate order parameter for each of the nucleus. Therefore, multiple nuclei should be assigned to same order parameter which can reduce the computational cost, especially when the total number of nuclei is very large and simulation box is also large. But we need to make sure that the nuclei assigned to the same order parameter are far from each other in space and there is no possibility of coalescence during simulation. These changes are made in this commit.

It will first make sure any two nuclei, irrespective of their order parameter, will not overlap (this was already there in the master code). Next, the code will check whether the distance between any two nuclei with same order parameter is less than a threshold distance. If the condition is true, then nucleation is not allowed for these two nuclei. This will ensure that if same order parameter is used for multiple nuclei, then they are located far from each other at least by a threshold distance. The threshold distance can be changed via the input file.

landinjm commented 3 months ago

@supriyoumich Can you add a short description on what these commits do and why they're necessary?

supriyoumich commented 3 months ago

@landinjm description added.