# Problems in the meshing/running of DEVICE simulations

#1

Dear all,

I am running the simulation of a plasmonic nanoparticle (a gold sphere) in water (as a solid thermal conductor, which is a fair assumption for the nanometer size of the nanoparticles in consideration). In these simulations I have found that the meshing step of DEVICE is sensitive to the value given to the parameters:

 - Max refine step
- Min edge length
- Max edge length


For a given choice the simulation is run but as I go to smaller values of min edge length, max edge length or to greater values of max refine step then my simulation never ends the meshing step or in case it does then it never ends the simulation. Whenever one of these cases happens my laptop generally crashes as everything is frozen and I have to shutdown the computer by brute force (presumably because the CPU is at 100% use with the simulation).

Do you know why this happens? What is a good way to select the values of these parameters in order to have an accurate simulation without having a conflict with the meshing step? I would appreciate any help with this problem. Thank you!

Best regards,

Gabriel

#2

Hi Gabriel, the parameters max edge length, min edge length, and max refine step controls the simulation mesh. Lowering the values of the first two parameters will result in a finer simulation mesh while increasing the third one will allow the solver to refine the mesh to full extent (take a look at this post to see how max refine step works: How to resolve warning message: “The mesh is valid but may not be adequately refined”).

As you make the mesh finer, the matrix that gets solved by the solver becomes larger and the simulation requires more and more memory. This I believe is making your system slow and is forcing it to crash eventually as the it is running out of memory (not because the CPU usage is at 100%). I would recommend starting your simulation with a coarse mesh (larger values for min and max edge lengths) and then gradually make the mesh finer as needed (i.e. check if the result remains unchanged as you make the mesh finer telling you that you have a fine enough mesh). You should also keep an eye on the system monitor to see how much memory the simulation is using at each step to determine if you can afford to make the mesh finer without the machine crashing. Depending on your design you may need to switch to a machine with a larger memory if you see that you have to use a fine mesh to get accurate result. Unfortunately there is no option in DEVICE like FDTD to calculate the memory required for running the simulation beforehand so you will have to do this check manually.