Sometimes the MQS solver fails with this error:
Solver returns: 'diverged (indefinite preconditioner)'.
ERROR: Linear system solver could not determine the solution.
There could be several reasons for this error to occur.
- if the boundaries of the computational domain are touching or cutting through some of the model objects.
That sometimes generates instabilities with the solver. I would recommend that you add a block of air to cover the area of the model that you don't want to simulate, give it a higher priority in the voxel settings, and put the boundaries slightly away from the body such that they touch the air blocks instead. Create blocks in the model, assign them air properties (you can drop them in the same folder where the background material is), and then put them in a separated manual folder in the voxel settings with a higher priority. You don't need to increase the paddings a lot, you just need to increase the original grid a few cells from your original simulation so that the boundaries now don't touch the model but the air blocks instead.
- if the current sources are not discretized "properly".
The current sources have to be made of closed current loops with correct orientations. For example, if you are using spiral or more complex coil structures, where you have to close the circuit by adding extra lines, the directions of those lines matter and you have to check that the current flow in the same direction for all of them (in other words, the current sources field has to be divergence free).