Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

High RAM use with few degrees of freedom

Please login with a confirmed email address before reporting spam

Hi everybody,

the 3D model attached has a swept mesh with 3468 hexahedral elements and the solver solves for 31395 degrees of freedom; while solving, the request for RAM "explodes" and becomes larger than 25 GB (causing a "Out of memory during assembly" error). I used a Heat Transfer module in COMSOL 4.1; solver: Time Dependent, Time Step 0.1 s (respecting the rule dt > rho * Cp / k * dL^2; dt = Time Step, rho = density, Cp = heat capacity, k = thermal conductivity, dL = meshing element size). k is anisotropic (this is the reason for large difference in meshing element size along different directions).
In other models I built in the past, there where much more mesh elements and degrees of freedom (nearly one million) and the request for RAM was much lower (in line with other threads in the Community Forum: www.comsol.eu/community/forums/general/thread/23213/).

Has anyone an idea why happens this? Thank you


5 Replies Last Post 31.08.2012, 10:44 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.08.2012, 06:16 GMT-4
Hi, all

I also have this problem.

Previously I mainly did 2D simulation. When moving to 3D, the memory consumption increases beyond my estimation... For a simple model with a little bit more than 1M degrees of freedom, it consumes even more than 60G memory. Since I don't have experience in 3D simulation with COMSOL, I don't know if this level of memory cost is normal or not.

And is there any methods to reduce the cost? Thanks a lot!
Hi, all I also have this problem. Previously I mainly did 2D simulation. When moving to 3D, the memory consumption increases beyond my estimation... For a simple model with a little bit more than 1M degrees of freedom, it consumes even more than 60G memory. Since I don't have experience in 3D simulation with COMSOL, I don't know if this level of memory cost is normal or not. And is there any methods to reduce the cost? Thanks a lot!

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.08.2012, 10:44 GMT-4
Interesting model. The memory usage explodes because of the heat source dPdV. It is based on an integration operator over the whole domain that is also a function of temperature (the independent variable). This leads to a coupling between all the degrees of freedom in the model creating a full matrix instead of the sparse limited-bandwidth matrices typical of finite element models.

This coupling results from COMSOL trying to calculate the most accurate Jacobian/stiffness matrix. To avoid it you should replace the source term dPdV with nojac(dPdV). That way COMSOL will not calculate the Jacobian of the heat source term. It may require a few more iterations but the memory required will drop by orders of magnitude.

Nagi Elabbasi
Veryst Engineering
Interesting model. The memory usage explodes because of the heat source dPdV. It is based on an integration operator over the whole domain that is also a function of temperature (the independent variable). This leads to a coupling between all the degrees of freedom in the model creating a full matrix instead of the sparse limited-bandwidth matrices typical of finite element models. This coupling results from COMSOL trying to calculate the most accurate Jacobian/stiffness matrix. To avoid it you should replace the source term dPdV with nojac(dPdV). That way COMSOL will not calculate the Jacobian of the heat source term. It may require a few more iterations but the memory required will drop by orders of magnitude. Nagi Elabbasi Veryst Engineering

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.08.2012, 12:47 GMT-4
I am a running into this exact same issue with a simple mems design i am modeling. I am only trying to find a stress induced when a load is added to the surface but the computation time is through the roof and tends to crash. Does anyone know a way to reduce the amount of mesh elements?
I am a running into this exact same issue with a simple mems design i am modeling. I am only trying to find a stress induced when a load is added to the surface but the computation time is through the roof and tends to crash. Does anyone know a way to reduce the amount of mesh elements?

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.08.2012, 13:53 GMT-4
This is a different issue. You should use a coarser mesh. Check the COMSOL documentation for details.
This is a different issue. You should use a coarser mesh. Check the COMSOL documentation for details.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.08.2012, 10:44 GMT-4
I replaced dPdV with nojac(dPdV) and the RAM request decreased 20 times! Now it works, thank you Nagi.

Camillo Giangiordano
I replaced dPdV with nojac(dPdV) and the RAM request decreased 20 times! Now it works, thank you Nagi. Camillo Giangiordano

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.