Fix BMEOS to use Birch-Murnaghan equation instead of Murnaghan equation
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:
- BMEOS function: Now implements true 3rd-order Birch-Murnaghan EOS
- MurnaghanEOS function: Added as separate function for reference/compatibility
- Documentation: Updated in elastic.py, init.py, and lib-usage.rst
- Internal naming: Renamed invbmeos to invmurneos for consistency
- 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.