Electric field amplitude in AddCoaxialPort

Give some feedback on openEMS.

Moderators: thorsten, sebastian

Post Reply
Jan
Posts: 2
Joined: Wed 12 Jul 2017, 03:26

Electric field amplitude in AddCoaxialPort

Post by Jan » Wed 12 Jul 2017, 03:56

First of all, thank you for all your effort with the software. I am not a programmer and only starting to understand what RF is about :) I have been playing with it for some time now and it has been a great learning tool. In the process I noticed few things which I though I should share.
I think that the amplitude of electric field in the argument of AddCoaxialPort is not having any effect. In the file AddCoaxialPort.m at lines 207, 208 is:

port.excite = 1;
evec = [1 1 1];

I believe it should be:
port.excite = 1;
evec = [excite_amp excite_amp excite_amp];

I understand that for most cases it is not important and can be easily recalculated in the post processing, just since it is already there ... :)

Another thing I noticed in the AddCoaxialPort.m file is the definition of function for exciting electric field distribution:

func_Ex = [ nameX '/(' nameX '*' nameX '+' nameY '*' nameY ') * (sqrt(' nameX '*' nameX '+' nameY '*' nameY ')<' num2str(r_o) ') * (sqrt(' nameX '*' nameX '+' nameY '*' nameY ')>' num2str(r_i) ')'];
func_Ey = [ nameY '/(' nameX '*' nameX '+' nameY '*' nameY ') * (sqrt(' nameX '*' nameX '+' nameY '*' nameY ')<' num2str(r_o) ') * (sqrt(' nameX '*' nameX '+' nameY '*' nameY ')>' num2str(r_i) ')'];

func_E{idx_prop_n} = 0;
func_E{idx_prop_nP} = func_Ex;
func_E{idx_prop_nPP} = func_Ey;

If I understand it correctly, this function works only in Cartesian coordinates so the excitation in cylindrical coordinates needs to be defined separately. Would it be maybe possible to mention it in the help?

Again, thanks for all your effort,
Jan

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

Re: Electric field amplitude in AddCoaxialPort

Post by thorsten » Wed 12 Jul 2017, 07:03

I understand that for most cases it is not important and can be easily recalculated in the post processing, just since it is already there ... :)
Yes, but I think this i a bug. I will have a look.
If I understand it correctly, this function works only in Cartesian coordinates so the excitation in cylindrical coordinates needs to be defined separately. Would it be maybe possible to mention it in the help?
No I think this should work in a cylindrical mesh too since the coordinates x,y,z (and rho,a) which are used to calculate the field distribution are available in all coordinate systems.
But I'm not sure I ever even tried.

regards
Thorsten

Jan
Posts: 2
Joined: Wed 12 Jul 2017, 03:26

Re: Electric field amplitude in AddCoaxialPort

Post by Jan » Fri 21 Jul 2017, 03:21

Thank you for fast response. It is true that I have tried the cylindrical coordinates a while ago when I was just introduced to OpenEMS, so I may have made some mistakes there. I will have a look at it again.

Post Reply