Me throwing spaghetti against the wall:
I wonder if this is somehow a Windows problem; if comsol was running the same simulation on linux if the same thing would happen?
Yeah its a sort of new feature called comsol compiler, its pretty slick, it’ll package up the simulation with a UI that you can define and spit out a file that can be run on an end user’s computer without them having to have deep FEA knowledge or even a comsol license.
It does require that end user have the comsol runtime installed though. The runtime will self extract and install from the simulation file; having the runtime install does kind of erect a trust barrier to having randos from the internet running it.
Anyways here’s an example I made that I think is stressing the memory the exact same way your problem is; its a dead simple example, user clicks the “Compute” button after launching it and it’ll run and then display the solve time at the bottom when finished. Takes about 44 minutes on a dual socket haswell system.
The actual .mph file is in there if you wanted to see how I constructed methods/variables/UI.
disclaimer: I butchered one of the existing example files to create this so its a tiny bit hacky, but it works.
https://drive.google.com/drive/folders/1YX0rqS85H-Z1rzjLTw_k6776FSBppKEB?usp=share_link