AddMSLPort bug in coordinates.

Give some feedback on openEMS.

Moderators: thorsten, sebastian

Post Reply
Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

AddMSLPort bug in coordinates.

Post by Hale_812 » Fri 20 May 2016, 09:16

I had almost broken my head, until found the problem by random edit.

This does not work:

Code: Select all

start = [ -port.spacing/2-port.width,    0];
stop  = [ -port.spacing/2,  -port.feedY/2, -port.feedY-port.length, substrate.t];
[CSX, PRT{1}] = AddMSLPort( CSX, 40, 1, 'metal', start, stop, 'y', [0 0 1], 'ExcitePort', true, 'FeedShift', 3*max_res, 'MeasPlaneShift',  6*max_res);
bizarre message is thrown:
error: AddMSLPort: subscript indices must be either positive integers less than 2^31 or logicals
error: called from
AddMSLPort at line 187 column 22
planar at line 138 column 12
Here is working script:

Code: Select all

start = [ -port.spacing/2-port.width,    -port.feedY-port.length, substrate.t];
stop  = [ -port.spacing/2,  -port.feedY/2, 0];
[CSX, PRT{1}] = AddMSLPort( CSX, 40, 1, 'metal', start, stop, 'y', [0 0 1], 'ExcitePort', true, 'FeedShift', 3*max_res, 'MeasPlaneShift',  6*max_res);
The only difference is Z-start and Z-stop coordinates are interchanged. Ohh... I lost 4 hours trying to figure out the problem, checking manuals and examples. See, the excitation is along Y, not along Z. So such behavior is very unexpected.
Last edited by Hale_812 on Wed 25 May 2016, 01:58, edited 1 time in total.

thorsten
Posts: 1393
Joined: Mon 27 Jun 2011, 12:26

Re: AddMSLPort bug in coordinates.

Post by thorsten » Fri 20 May 2016, 19:28

Hi,

I do not see any difference between the two versions... but I can reproduce the problem.
There is not much that I can do. The z-start value is where the MSL line is placed and this must not be on the boundary as I guess was in your case.
That is just not allowed. The solution would be to detect this case and give a proper error message...
I have to think about it...

regards
Thorsten

Hale_812
Posts: 171
Joined: Fri 13 May 2016, 02:54

Re: AddMSLPort bug in coordinates.

Post by Hale_812 » Wed 25 May 2016, 01:58

Ah, sorry, it looked almost the same, so I copy-pasted wrong case again. So, I mean what I mean, the start and the beginning. Yes, thank you again! This actually works great!

By the way, can I add a metal to the port strip top? It has zero thickness, so I do not know how this would influence radiation and coupling to nearby circuit. Or should I just make it much shorter than the quarter-wave?

Post Reply