-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PCG solver did NOT converge in 50000 iterations in a coupled microstrip simulation #251
Comments
Hi @CosimoMV, Looking at your mesh, it is likely that your problem could be solved by using a nicer initial mesh with more isotropic elements and smoother size grading between elements. This can be handled in Gmsh by applying size fields, see for example this tutorial. This should help the iterative solvers in Palace to converge. |
Hi @sebastiangrimberg , thanks for your help. I tried to recreate the mesh as you said, but I was only getting absurdly large files. I therefore reconstructed the geometry of the coupled microstrip directly with gmesh and meshed it with these parameters:
In this way I was able to create files that were quite small and allowed Palace to converge. The problem is that the solution, apart from being unrealistic, is highly dependent on the algorithm chosen to mesh. are shown the |S21| (dB) vs frequency (GHz) parameters obtained with various meshing algorithms: the first curve name indicates the algorithm for surfaces, the second the one used for volumes, and the third is the name of Palace solver. The S-parameters values, apart from one case, are very different and in any case unrealistic. In all cases, the Palace solver converged. |
Hi @CosimoMV, thanks for your help with the mesh generation. I think I can predict what is going on with your simulation, though I am not 100% certain and cannot test my theory without your configuration file and mesh. There are two issues, I suspect, both related to the use of wave ports in your model:
I hope this explanation is helpful. Using wave ports can be complicated and if you see room for improvement in the implementation we would always welcome a PR. It is also worth mentioning that you can visualize the computed wave port modes for each wave port in the ParaView output for the boundary mesh, which should allow you to validate and debug your model and results. |
Hi @sebastiangrimberg, first of all thank you very much for your reply and for your help (also in the other thread), it was really useful. Regarding the first point, I correctly used Regarding the second point: my concerning was that Palace, with the same configuration, but with mesh from different algorithms, converged to very different solutions that in any case were unrealistic. After 30 Ghz I obtained very big positive values for abs(S11), exactly like in #267 . So, after your reply, I investigated the problem a little further and got these results: When abs(S11) became positive the propagating eigen-mode at the boundary was probably an evanescent mode, because the wave vector had a big imaginary component:
I recorded the field values at two mirror points in relation to the plane of central symmetry, halfway between the bottom of the miscrostrip and the ground plane:
The values for Ez at 28GHz and 29GHz for p1 and p2 have the same modulus and opposite sign, as is right for an odd-mode. Then for 30 - 50 GHz I set
I recorded the field values in the usual two mirror points exactly as before:
Finally, regarding this:
I had also thought of something similar, but I did not know whether it was possible to superimpose the waveport with a PEC strip on the central symmetry plane. So, if I understand correctly, the solution would be to create two ports per side with appropriate boundary conditions instead of one, and then obtain a s4p file at the end? |
Thank you very much for the detailed testing and reporting. First, I did some thinking about evanescent modes and think I have come up with a solution there. I have added a commit to the PR #264 which improves the wave port boundary mode to exclude evanescent modes correctly. Testing this on the CPW example (as in #267), shows that it fixes the issue we observed above 30 GHz with the S-parameters. You should be able to build with this PR and I am hoping this will resolve many of the issues you identified. Regarding your last question about resolving even/odd mode ambiguity, yes I think you have the right understanding. This is what I had done in the coupled-CPW example here: https://awslabs.github.io/palace/dev/examples/cpw/. Instead of using one port per side, I split it and use two ports per side and get a 4 dimensional scattering matrix. I should note that I am not 100% certain if this 4-port approach is better or even is a fully correct model for the coupled problem but I think it might be worth trying out. |
I did the test with the branch of PR #264 and it worked perfectly even with the coupled microstrip! There is no longer any need to change the mode index at 30GHZ. Tank you very much @sebastiangrimberg ! I thought a bit about how to make sure to only found the odd (or even) modes: I think the best way to do is to exploit symmetry, which would also reduce the size of the problem by a factor of 2 (just for the propagating eigen-mode calculation). By the way, do you have any tips for me regarding mesh creation? To use Palace in the real cases that really interest me, I am forced to start from .step files that come out of a CAD. Do you have any tips on how to do the mesh creation, which seems to me to be the most critical part for the success of the simulation. |
That's great about the PR! I will get this reviewed and merged ASAP. And correct about using symmetry for even/odd mode simulation, I agree with you there. For meshing, I understand this can be a complicated part of the workflow. If you are just importing a STEP file, I think you can still get quite a long way in Gmsh using size fields. When you import a STEP, you should be able to still access the various geometric entities (like the trace domain) and add a size field which controls the mesh size based on distance from a domain or boundary. This is is what I do in the CPW example here and it works quite well. You can read more about that in the Gmsh docs, here: https://gmsh.info/doc/texinfo/gmsh.html#Specifying-mesh-element-sizes. There's also a nice example: https://gmsh.info/doc/texinfo/gmsh.html#t10. Alternatively, I am not sure what you are using to create your 3D CAD (STEP), but there are many unified CAD + meshing softwares which might simplify things. For example using the OpenCASCADE geometry kernel in Gmsh along with meshing functionality can give you access to a lot of programatic ways to control mesh sizing, avoiding the file import/export of a STEP. |
My current goal is to make simulations post-layout, so I have to use the output of our electrical-CAD. The only outputs our CAD produces that are useful here are step or odb++ files. For now I was just opening the step files with freecad to do the finishing touches and importing the final files into gmsh. I also tried meshing with freecad, but the meshing options it provides were too limited. I was already using OpenCASCADE kernel in gmsh because it is needed for boolean operations. I will do as you say and try to impose a mesh size with fields. Thank you very much @sebastiangrimberg for your help and advice! I would say that this thread can be closed without any problems. If anything, I'll open a new one if I have further problems, although I sincerely hope not! |
I tried to simulate a coupled microstrip line, but no matter what I do, I always get this error: PCG solver did NOT converge.
I tried to simulate the copper interface with PEC and a metal layer with finite conductivity, I varied the parameters "Lc", "DivFreeMaxIts", "EstimatorMaxIt" and "MaxIts" , I tried the solvers "SuperLU", "STRUMPACK" and "MUMPS" with both version 0.12 and 0.13, but I always get this error. I think I am doing something trivial wrong (the system I am simulating is simple), but I do not understand what the problem is.
This is an example of my .json files simulation.json
This is my mesh: tutto.zip
The text was updated successfully, but these errors were encountered: