prisms-center / phaseField

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

Enable system evolution before first nucleation event #175

Closed david-montiel-t closed 2 months ago

david-montiel-t commented 3 years ago

Currently, the code does not allow the system to evolve before the first nucleation event occurs.

We want to have an option in parameters.in that lets the user specify whether to alloy evolution before the first nucleation event and and modify the following section of nucleation.cc (lines 29-47) in the core library accordingly:

        if (currentIncrement == 1){
            while (new_nuclei.size() == 0){
                currentTime+=userInputs.dtValue*(double)userInputs.steps_between_nucleation_attempts;
                currentIncrement+=userInputs.steps_between_nucleation_attempts;

                while (userInputs.outputTimeStepList.size() > 0 && userInputs.outputTimeStepList[currentOutput] < currentIncrement){
                    currentOutput++;
                }

                while (userInputs.checkpointTimeStepList.size() > 0 && userInputs.checkpointTimeStepList[currentCheckpoint] < currentIncrement){
                    currentCheckpoint++;
                }

                new_nuclei = getNewNuclei();
            }
        }
        else {
            new_nuclei = getNewNuclei();
        }