Skip to content

restrict use of averaging schemes#702

Merged
bobmyhill merged 1 commit intogeodynamics:mainfrom
bobmyhill:restrict_averaging
Nov 16, 2025
Merged

restrict use of averaging schemes#702
bobmyhill merged 1 commit intogeodynamics:mainfrom
bobmyhill:restrict_averaging

Conversation

@bobmyhill
Copy link
Copy Markdown
Member

@bobmyhill bobmyhill commented Nov 16, 2025

BREAKING CHANGE

This pull request:

  • Refactors the Composite class to compute density, thermal_expansivity, molar_heat_capacity_p, molar_heat_capacity_v, grueneisen_parameter, isentropic_bulk_modulus_reuss, isothermal_bulk_modulus_reuss, and related properties directly using thermodynamically-motivated formulas, rather than delegating to the averaging scheme for scalar properties.
  • Introduces effective_isentropic_bulk_modulus (K_eff) and effective_shear_modulus (G_eff) as new properties in both Material and Composite, with appropriate aliases and documentation, to clarify the distinction between thermodynamically-defined properties and effective properties of mixtures. These functions are averaged using the active AveragingScheme.
  • Uses K_eff and G_eff in the functions used to calculate seismic velocities.
  • Updates all example scripts (such as paper_averaging.py and paper_incorrect_averaging.py) to use the new K_eff and G_eff property names in place of the previous K_S and G, which are reserved for thermodynamic properties.
  • Removes the unused averaging methods for scalar properties (density, thermal expansivity, heat capacities) from the AveragingScheme base class, since these are now handled directly in Composite.
  • Adds new tests to make sure that thermodynamic properties are the same whether the material is a phase or a Composite containing a single phase.
  • Improves documentation, clarified copyright years, and fixed minor typos in docstrings and comments across several files.

These changes improve the physical correctness, clarity, and maintainability of the BurnMan codebase, and provide a more consistent API for users working with composite materials.

@bobmyhill bobmyhill added this to the 3.0 milestone Nov 16, 2025
@bobmyhill bobmyhill merged commit 1f40bf1 into geodynamics:main Nov 16, 2025
12 checks passed
@bobmyhill bobmyhill deleted the restrict_averaging branch November 16, 2025 21:35
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