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.

Simulation time for 2D and 3D vastly different (with comparable DoF)

Please login with a confirmed email address before reporting spam

Hello,

I have a question regarding relative simulation time for 2D and 3D structure.

I am using COMSOL RF module to simulate an optical structure. When I try a 2D case with very fine mesh density and more than 4 million DoF, the simulation time only takes about 5 mins and very little RAM.

When I simulate a 3D structure with coarse mesh density with about 2 million DoF, the simulation takes about 30 mins with loads of RAM.

I am wondering how this is possible. Regardless of the dimension in 3D or 2D, the simulation time should, in my opinion, solely depend on the number of DoF. In my case, the 2D simulation has about twice the DoF than the 3D simulation, and yet the computation duration and memory consumption for the 3D is much more demanding. In both cases, I use MUMPS with exactly the same options, other than the 2D/3D difference.

I am wondering why this could happen.
Thanks.

Young

2 Replies Last Post 28.03.2013, 03:16 GMT-4
Gunnar Andersson COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.03.2013, 03:15 GMT-4
The explanation is that a 3D mesh has more connectivity than a 2D mesh. Let's compare 1D, 2D, and 3D:

- In a mesh of a 1D line segment, each interior mesh element has 2 neighbors. (Two mesh elements are neighbors if they share at least one vertex.)

- In a quad mesh of a 2D square, each interior mesh element has 8 neighbors.

- In a hex mesh of a 3D cube, each interior mesh element has 26 neighbors.

This means that even if the number of DOFs is the same, the system has more fill-in in a higher space dimension, and this typically leads to longer simulation time.

The explanation is that a 3D mesh has more connectivity than a 2D mesh. Let's compare 1D, 2D, and 3D: - In a mesh of a 1D line segment, each interior mesh element has 2 neighbors. (Two mesh elements are neighbors if they share at least one vertex.) - In a quad mesh of a 2D square, each interior mesh element has 8 neighbors. - In a hex mesh of a 3D cube, each interior mesh element has 26 neighbors. This means that even if the number of DOFs is the same, the system has more fill-in in a higher space dimension, and this typically leads to longer simulation time.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.03.2013, 03:16 GMT-4
Hi

do not forget that COMSOl uses sparse matrix theory, and the sparcity will change between 2D and 3D and probably notin a linear way ;) rather N^2 or N^3 hence far more time required to solve

--
Good luck
Ivar
Hi do not forget that COMSOl uses sparse matrix theory, and the sparcity will change between 2D and 3D and probably notin a linear way ;) rather N^2 or N^3 hence far more time required to solve -- Good luck Ivar

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.