Skip to content

Gas math stripping

Rob Nelson requested to merge pull/4326/GasMathsStrip into Bleeding-Edge

Created by: ComicIronic

Removed update_values(). RIP, shine on you CPU diamond. Removed get_moles_by_id and get_archived_moles_by_id, all moles are now accessed directly to reduce call cost. Added set_temperature and set_volume procs which recalc pressure when temperature or pressure change. Heat_capacity is now a var updated when gases update. Modified adjust_gas to use set_gas, modified set_gas to alter heat_capacity, total_moles, and pressure as needed.

This gets rid of a lot of the high-CPU in the code. set_gas could get costly, but for all the calls it has to be tolerated.

Merge request reports