thermofun icon indicating copy to clipboard operation
thermofun copied to clipboard

Memoization leading to extreme memory demands in reactive transport simulations

Open j-engelmann opened this issue 1 year ago • 1 comments

I initially created this issue over on the Reaktoro github, but as it seems to be related to ThermoFun i will also raise it here. In developing reactive transport simulations using Reaktoro and ThermoFun as the thermodynamic backend, i discovered that the ThermoFun part (namely the PropertiesSolvent, ElectroPropertiesSolvent and ThermoPropertiesSubstance objects) grows in memory use over runtime, until it crashes the program.

From the previous discussion with @allanleal, this may be related to memoization in ThermoFun. I believe the memory issues arise because the thermodynamic properties are stored at all unique P/T points. While this may be efficient for smaller batch calculations, its too much information to handle in the kinds of simulations i run.

Is there a way to control or turn off this feature?

Any help would be greatly appreciated!

Cheers,

Jasper

j-engelmann avatar Aug 26 '24 08:08 j-engelmann