Skip to content

Add support for libtorch model Gibbs energies for phase-field #94

@chaibhave

Description

@chaibhave

Description:

We need to enhance our existing system to allow users to load thermodynamic surrogate models, created using Torch JIT trace or other methods for freezing pre-trained models, into Swift. The desired functionality includes the capability to accept phase fractions and concentrations as inputs and return the Gibbs energy of the system along with the derivatives of the Gibbs energy with respect to the phase fractions and concentrations.

Benefits:

  1. Streamlined Model Development: Users can train surrogates for CALPHAD-type data using Python and then evaluate these neural networks (or other models) in Swift.
  2. Code Simplification: Implementing and freezing the thermodynamics in a Torch script will reduce the amount of code with parsed functions in the main input file.
  3. Specialized Tensor Compute: This feature will specifically support surrogates of Gibbs energies intended for use in phase-field models, simplifying the process compared to the more generic tensor compute supported by NEML2.

Requirements:

  1. Input: Phase fractions and concentrations.
  2. Output: Gibbs energy of the system and its derivatives with respect to the phase fractions and concentrations.
  3. Compatibility: The solution should be designed specifically for surrogates of Gibbs energies meant to be used in phase-field modeling, ensuring a more straightforward implementation compared to the flexible but tedious approach of writing out numerous derivatives for larger phase-field models in NEML2.

By implementing this feature, we aim to improve the efficiency and clarity of our thermodynamic model development process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions