Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Running out of memory

Please login with a confirmed email address before reporting spam

Hello,

I'm trying to solve the following problem. After building my geometry, creating my mesh and solving ist, I try to plot severalt streamlines with an automatic matlab function. This Matlab function gets the solved model as an input parameter and a vektor with the startingpoints of my streamlines. The next step is a for-loop loading a single set of coordinate (x,y,z), and run the following. My chain of thougt is, that after the streamline is exported to the text-file, it is deleted or replaced by the next coordinates, respectivly.

But after about 1000 streamlines the functions stops execution with the error message that java running out of memory.

Who can help me? I already tried to increase the max Java heap size to 1024...

Best regards Matthias

model.result('pg1').feature('str1').set('xcoord', X);
model.result('pg1').feature('str1').set('ycoord', Y);
model.result('pg1').feature('str1').set('zcoord', Z);
model.result('pg1').feature('str1').set('resolution', 'fine');
model.result('pg1').feature('str1').set('maxsteps', '500000');
model.result('pg1').feature('str1').set('back', 'off');

model.result('pg1').feature('str1').feature('col1').set('expr', 'es.normE');
model.result('pg1').feature('str1').feature('col1').set('descr', 'Elektrisches Feld, Betrag');
model.result('pg1').run;
model.result.export('plot2').set('filename', ['T:\Test\COMSOL_Multiphysics\Zwickel\3D\MATLAB_MODEL\Stromlinie_' Spannung 'kV_Element_' I '.txt']);
model.result.export('plot2').run;

2 Replies Last Post Feb 21, 2011, 7:07 a.m. EST
Jim Freels mechanical side of nuclear engineering, multiphysics analysis, COMSOL specialist

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 19, 2011, 10:44 p.m. EST
1000 streamlines is a large number to try to visualize on most screens. Perhaps, you could do it in parts and plot sections.

You could try a 64-bit computer which can access much more memory. 32-bit machine only can use 2GB of memory on any single application, including COMSOL

Have you tried using the streamline graphics within COMSOL ? Perhaps that would be more efficient in memory.
1000 streamlines is a large number to try to visualize on most screens. Perhaps, you could do it in parts and plot sections. You could try a 64-bit computer which can access much more memory. 32-bit machine only can use 2GB of memory on any single application, including COMSOL Have you tried using the streamline graphics within COMSOL ? Perhaps that would be more efficient in memory.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Feb 21, 2011, 7:07 a.m. EST
Thanks a lot for your reply.
The its just that I don't want to plot all of them in the graphic user interface. I am only writing them to text-files to analyse them with a matlab script.
Thanks a lot for your reply. The its just that I don't want to plot all of them in the graphic user interface. I am only writing them to text-files to analyse them with a matlab script.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.