Skip to content

Equilibrate relaxed composite#710

Merged
bobmyhill merged 6 commits intogeodynamics:mainfrom
bobmyhill:equilibrate_relaxed_composite
Dec 5, 2025
Merged

Equilibrate relaxed composite#710
bobmyhill merged 6 commits intogeodynamics:mainfrom
bobmyhill:equilibrate_relaxed_composite

Conversation

@bobmyhill
Copy link
Copy Markdown
Member

This pull request modifies burnman.equilibrate so that it can equilibrate RelaxedComposite objects. Internally, the equilibrate function extracts the unrelaxed composite object from the unrelaxed attribute of the RelaxedComposite, conducts the equilibration on that object, and then copies the state (pressure, temperature, molar_fractions, number_of_moles) from the unrelaxed object back onto the relaxed composite.

A new test is introduced which fails with the current main branch.

Other minor related changes:

  • Updated initialization in Material to set number_of_moles only if it hasn't already been set, preventing accidental overwrites in derived classes.
  • The reset() method is now called in number_of_moles, ensuring that extensive material properties are output correctly immediately after changing number_of_moles.
  • Added a copy_state_from_unrelaxed() function to RelaxedComposite to facilitate the changes to equilibrate.

@bobmyhill bobmyhill merged commit 0d7b01f into geodynamics:main Dec 5, 2025
12 checks passed
@bobmyhill bobmyhill added this to the 3.0 milestone Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant