We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.

Ansys Learning Forum Forums Discuss Simulation Photonics Variables not freed from memory after using the clear(); script command Reply To: Variables not freed from memory after using the clear(); script command

Guilin Sun
Ansys Employee

 

I am not sure if this is a memory leakage. Fro this article: https://optics.ansys.com/hc/en-us/articles/360050995394-Getting-Started-with-lumopt-Python-API

the default setting is to store all simulation files:

: store_all_simulations: bool

Indicates if the project file for each iteration should be stored or not. Default = True

Please try to set it as "false".

in addition, since the mesh accuracy is fixed and the mini resolution is predefined, with more and more materials filling in, the finer mesh region might be larger and larger. The mesh size depends on the material refractive index. If the filling material occupies more and more space, mesh memory will be increased for simulated data (mesh and field data). This might be another reason.