Elastic icon indicating copy to clipboard operation
Elastic copied to clipboard

Fix BMEOS to use Birch-Murnaghan equation instead of Murnaghan equation

Open Copilot opened this issue 1 month ago • 0 comments

Plan for Fixing Birch-Murnaghan EOS

  • [x] Understand the difference between Murnaghan and Birch-Murnaghan equations
  • [x] Review current implementation of BMEOS function
  • [x] Implement the correct 3rd-order Birch-Murnaghan equation
  • [x] Add Murnaghan equation as a separate function (for compatibility)
  • [x] Update documentation to reflect the correct equation
  • [x] Test the implementation and validate correctness
  • [x] Update scan_pressures function documentation
  • [x] Run code review and fix issues
  • [x] Run security checks (no issues found)
  • [x] Final verification complete
  • [x] Make internal function naming consistent (invbmeos → invmurneos)

Summary

Successfully implemented the correct 3rd-order Birch-Murnaghan equation of state, replacing the incorrect Murnaghan equation that was previously used. All tests pass, documentation is updated, and internal naming is now consistent.

Key Changes:

  1. BMEOS function: Now implements true 3rd-order Birch-Murnaghan EOS
  2. MurnaghanEOS function: Added as separate function for reference/compatibility
  3. Documentation: Updated in elastic.py, init.py, and lib-usage.rst
  4. Internal naming: Renamed invbmeos to invmurneos for consistency
  5. Validation: All unit tests pass, no security issues found
Original prompt

This section details on the original issue you should resolve

<issue_title>Birch-Murnaghan equation of state</issue_title> <issue_description>Thank you so much for sharing your code. I met some issues in the code. I think the equation used in file 'elastic.py' function 'BMEOS' is not Birch-Murnaghan equation. It is Murnaghan equation: https://en.wikipedia.org/wiki/Murnaghan_equation_of_state The correct equation is: https://en.wikipedia.org/wiki/Birch%E2%80%93Murnaghan_equation_of_state </issue_description>

Comments on the Issue (you are @copilot in this section)

@jochym You are right. I will make the correction in the text. Later, I will implement B-M version as well. (I will also accept PR if you have time ;). Tanks, @Ruoyan0103 !
  • Fixes jochym/Elastic#71

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot avatar Jan 04 '26 20:01 Copilot