Create Diffraction order using Livelink for matlab

Please login with a confirmed email address before reporting spam

Hello, I want to create a diffraction order in using livelink in matlab. I could not find a command that describe how to create it. pasted bellow my lines of code in matlab:

%%%%% Assign Boundary Variables%%%%%% bL = 1; % left boundary -> inpot port bR = 12; % right boundary -> output port bB = 2; % bottom boundary -> periodic (Floquet) bT = 3; % top boundary -> periodic (Floquet)

%%%% Floquet periodic BC (y-direction) %%%%

pc1 = ewfd.create('pc1','PeriodicCondition',1); pc1.selection.set([bB, bT]); pc1.set('PeriodicType','Floquet'); pc1.set('kFloquet', {'k0cos(theta)', 'k0sin(theta)', '0'});

%%% input port (left) %%% port1 = ewfd.create('port1','Port',1); port1.selection.set(bL); port1.set('PortType','Periodic'); % port1.set('ModeType','PlaneWave'); port1.set('PortExcitation','on'); port1.set('E0', {'0','1','0'}); % Ey polarization doR1 = port2.create('doR1','DiffractionOrder',1); doR1.set('m',1); doR1.set('n', 0);

%%% output port (right) %%% port2 = ewfd.create('port2','Port',1); port2.selection.set(bR); port2.set('PortType','Periodic'); port2.set('ModeType','PlaneWave'); port2.set('PortExcitation','on'); doT1 = port2.create('doT1','DiffractionOrder',2); doT1.set('m', 1); doT1.set('n', 0);

Regards Hammam


Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.

Baidu
map