one document with many simulations
-
Hi what is best way to run multiple simulations and save the results.
lets say each simulation has different property of location or frequency or even mesh.
my general script :for in range(1,100) s4l.document.New() # generated per simulation project_path = 'somedirectory generated' sim = lf.ElectroStaticSimulation() sim.Name = 'sim ' + str(i) sim.RunSimulation(wait=True) document.AllSimulations.Add(sim) results = sim.Results() document.AllAlgorithms.Add(...)
so genereted many folders each folder one simulation with .smash and outputs , if i try just one folder it just growing and growing. in both situations the Sim4life get stuck
-
-
@montanaro and how to run on all simulations, :
start new, finish ,save?
i tried to add many simulations to one document but i see each time save larger and larger files , so i suppose something isn't cleared. -
I think what you want is to run the simulations, extract some results, delete the simulation, and then run a new one? The more simulations you have the larger the files will be and simulation results typically take up a lot of space. You can create and run as many simulations as you like in any document, but if you want to get rid of any simulations you need to delete it manually. You can automate all of this with Python
-
can you supply some code example ? thanks