awslabs / palace

3D finite element solver for computational electromagnetics
https://awslabs.github.io/palace/dev
Apache License 2.0
224 stars 50 forks source link

Verification failed when solving a horn antenna using mesh file created by Gmsh. #235

Closed keheheke closed 2 months ago

keheheke commented 2 months ago

i meet some problems when simulation a horn antenna by Gmsh and palace.I can't figure out if it's a problem with the mesh or the model. The simulation model is composed of a copper horn antenna feeded by a waveport,and airbox outside as an Radiation boundary,see the attachment model. The error is : Verification failed: (lambda.real() > 1.0 / (1.0 - 1.0e-2)) is false: --> Computed wave port mode is or is very close to being evanescent

keheheke commented 2 months ago

horn_Gmsh_V1.json horn for Gmsh_V1.zip

1

here is the error and config\msh\geo file

keheheke commented 2 months ago

i still didn't know how to set the mesh for boundary, is there any examples of antennas to study?

sebastiangrimberg commented 2 months ago

Hi @keheheke, thanks for sharing your mesh and input file. The first issue is with your model/mesh. The mesh on the wave port face does not conform to the horn boundary, you can see that the triangles discretizing the outer box lie on top of and intersect the triangles for the edge of the horn domain. This needs to be fixed in your CAD model. Unfortunately I don't have any examples of antennas for you, but you might be able to learn something from the CPW examples with wave ports here. One option is to use the OpenCASCADE kernel in Gmsh and use the Fragment operation in the API (I think this is Coherence or BooleanFragment in the .geo syntax) to ensure the boundary embedding is correct.

Screenshot 2024-04-22 at 8 38 50 AM

Another note is that if you are applying PEC boundary conditions to the surface of the horn, you don't need to mesh the inside. However, it should not hurt to much in this case and so I imagine fixing the above mesh issue should allow your simulation to run.

Finally, I noticed that the version of Palace you are using from Weisim is quite outdated. You would be strongly recommended to use the main branch or most recent release, this includes bug fixes for wave ports specifically. This should build fine on WSL if you are using a Windows machine, or if you need access to a separate Linux machine you could use a public cloud provider like AWS.

wlt8023 commented 2 months ago

Hi @keheheke, thanks for sharing your mesh and input file. The first issue is with your model/mesh. The mesh on the wave port face does not conform to the horn boundary, you can see that the triangles discretizing the outer box lie on top of and intersect the triangles for the edge of the horn domain. This needs to be fixed in your CAD model. Unfortunately I don't have any examples of antennas for you, but you might be able to learn something from the CPW examples with wave ports here. One option is to use the OpenCASCADE kernel in Gmsh and use the Fragment operation in the API (I think this is Coherence or BooleanFragment in the .geo syntax) to ensure the boundary embedding is correct.

Screenshot 2024-04-22 at 8 38 50 AM

Another note is that if you are applying PEC boundary conditions to the surface of the horn, you don't need to mesh the inside. However, it should not hurt to much in this case and so I imagine fixing the above mesh issue should allow your simulation to run.

Finally, I noticed that the version of Palace you are using from Weisim is quite outdated. You would be strongly recommended to use the main branch or most recent release, this includes bug fixes for wave ports specifically. This should build fine on WSL if you are using a Windows machine, or if you need access to a separate Linux machine you could use a public cloud provider like AWS.

Hello, do you have a tutorial on building Palace in Windows?

keheheke commented 2 months ago

Hi @keheheke, thanks for sharing your mesh and input file. The first issue is with your model/mesh. The mesh on the wave port face does not conform to the horn boundary, you can see that the triangles discretizing the outer box lie on top of and intersect the triangles for the edge of the horn domain. This needs to be fixed in your CAD model. Unfortunately I don't have any examples of antennas for you, but you might be able to learn something from the CPW examples with wave ports here. One option is to use the OpenCASCADE kernel in Gmsh and use the Fragment operation in the API (I think this is Coherence or BooleanFragment in the .geo syntax) to ensure the boundary embedding is correct.

Screenshot 2024-04-22 at 8 38 50 AM

Another note is that if you are applying PEC boundary conditions to the surface of the horn, you don't need to mesh the inside. However, it should not hurt to much in this case and so I imagine fixing the above mesh issue should allow your simulation to run.

Finally, I noticed that the version of Palace you are using from Weisim is quite outdated. You would be strongly recommended to use the main branch or most recent release, this includes bug fixes for wave ports specifically. This should build fine on WSL if you are using a Windows machine, or if you need access to a separate Linux machine you could use a public cloud provider like AWS.

@sebastiangrimberg thanks a lot, i fixed the geometry of my model by the 'Boolean Fragment', then i can keep the mesh conform on the face and box, finally it can be solved. also, i used old version of palace integrated by Welsim at the windows system. i will keep learning and figure more about palace.

sebastiangrimberg commented 2 months ago

@keheheke Great to hear! I will close this issue now but feel free to reopen if you have further questions.

sebastiangrimberg commented 2 months ago

@wlt8023 We do not provide instructions for building on Windows since we have no ability to test it and do not use it regularly. However, there are a few options:

keheheke commented 1 week ago

@sebastiangrimberg @sebastiangrimberg

hello,recently,I have a problem when using Palace to solve a Rectangle waveguide, I want to get the Insertion loss(S21) . The cut off frequency of the waveguide is 15GHz, if I set the start frequency <15GHz ,such as 10GHz, it will be error like that: <Verification failed: (lambda.real() > 1.0 / (1.0 - 1.0e-2)) is false: --> Computed wave port mode is or is very close to being evanescent (位 = (9.9999999973809139e-01,0.0000000000000000e+00))!>

if I set the start frequency >15GHz ,such as 16GHz, the simulation will run successfully:

However, i need to get the S21 parameter at from 10GHz to 20GHz ,even the wave energy will be evanescent, is there any solution ?

keheheke commented 1 week ago

@sebastiangrimberg here is the mesh and config file Palace data.zip

sebastiangrimberg commented 1 week ago

Hi @keheheke, thanks for your question. In general I'm not sure if it makes sense to try to drive a wave port below the cutoff frequency of the propagating mode, so I do not know what the expected result for S21 is in this case. However, there have been many recent improvements to wave ports which should at least allow your simulation to run below cutoff (< 15 GHz), even as recently as last week with #264. I would suggest as a place to start you build and run Palace from main instead of the outdated version it appears you are using. It appears to me that you are at least using the code from before https://github.com/awslabs/palace/pull/192 (merged Feb. 2024) which included some major upgrades to the wave port boundary mode solver.

keheheke commented 1 week ago

Hi @keheheke, thanks for your question. In general I'm not sure if it makes sense to try to drive a wave port below the cutoff frequency of the propagating mode, so I do not know what the expected result for S21 is in this case. However, there have been many recent improvements to wave ports which should at least allow your simulation to run below cutoff (< 15 GHz), even as recently as last week with #264. I would suggest as a place to start you build and run Palace from main instead of the outdated version it appears you are using. It appears to me that you are at least using the code from before #192 (merged Feb. 2024) which included some major upgrades to the wave port boundary mode solver.

@sebastiangrimberg ,Thanks a lot,i will seek help to build the latest version for better features.