scheil icon indicating copy to clipboard operation
scheil copied to clipboard

Add options to save equilibrium results during scheil simulation

Open Chuangye-Wang opened this issue 7 months ago • 5 comments

This PR is mainly for saving the equilibrium results (with heat capacipty output) at each solidification step, and add it to the new attribute equilibrium_results in SolidificationResult class.

Chuangye-Wang avatar May 21 '25 14:05 Chuangye-Wang

@bocklund @nury12n having this optional functionality would be a big help for us, I read back through Hui's PR from awhile back and saw your comments and they seemed reasonable for a better long term solution. However, if you were open to this temporary optional solution it would be much appreciated so we could stop using our internal fork of scheil instead of the public repo.

sorkins avatar May 21 '25 14:05 sorkins

I have a local branch that is more Workspace-oriented that I'm behind on testing and pushing up to merge.

Would it be enough if you could provide a list of outputs to Scheil simulations to also pull properties out of Workspace (e.g. simulate_scheil_solidification(..., output="CPM") and/orsimulate_scheil_solidification(..., output=["CPM", "SM"])?

Or is there specific utility in being able to have the full xarray Dataset to be able to simulate, and then go back and pull properties out of the Dataset objects?

bocklund avatar May 21 '25 19:05 bocklund

I think being able to rely on the property framework features would a better experience and give more flexibility, but I'm open to also storing the equilibrium xarray Datasets if there's a need to do so

bocklund avatar May 21 '25 19:05 bocklund

Could you refer us to the branch? We could take a closer look and see what that would be like for us.

What you're talking about sounds like it would be sufficient for us.

sorkins avatar May 21 '25 19:05 sorkins

https://github.com/pycalphad/scheil/pull/39 - currently simulate_scheil_solidification works, but several things are broken. The idea in connection to this is that you could ask for things in simulate_scheil_solidification(..., output: list[str])

and then per temperature the code would do something like

def simulate_scheil_solidification(...):
    output_values = []
    while not_finished:
        ...
        # do calculation in the time step
        ...
        step_outputs = {}
        for output in outputs:
            step_outputs[output] = wks.get(output)
        output_values.append(step_outputs)

bocklund avatar May 21 '25 19:05 bocklund

@bocklund depending on the turnaround time for the Workspace conversion, would you be open to temporarily adding the optional tracking of the equilibrium results using this PRs method? (or it could just be left around for perhaps debugging purposes moving forward, whatever the preference is)

sorkins avatar Jun 09 '25 19:06 sorkins

@bocklund following up.

sorkins avatar Jun 20 '25 15:06 sorkins

Closed as it's implemented in https://github.com/pycalphad/scheil/pull/39

Chuangye-Wang avatar Oct 31 '25 21:10 Chuangye-Wang