Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

postint over multiple FEMs

Please login with a confirmed email address before reporting spam

Hi,
This question is regarding post processing. I am using the RF Module>Perpendicular waves>Hybrid mode waves. I wanted to know if doing the following is possible. If so, how?

I define a waveguide structure. Mesh it. Solve for the fundamental mode of the waveguide at a particular wavelength. Let us call this Sol1.
Now with the same struture (and everything else same i.e. Mesh etc) I just change the wavelength and solve again to obtain sol2.

I can do this with a Matlab script with a for loop for the wavelength.

While in the for loop I can store the fem in variables fem1 and fem2 for the two wavelengths.

Now I want to postint the product of the Pozav_rfwv (fundamental mode) of fem1 and Pozav_rfwv (fundamental mode) of fem2 over a region of the waveguide.

So basically I want to integrate the product of poynting vector for the fundamental mode @ wavelength 1 and poynting vector for the fundamental mode @ wavelength 2 for the same structure.

Is it possible to do the above?

Thanks,
Ravi

3 Replies Last Post 2010年2月23日 GMT-5 08:07
COMSOL Moderator

Hello RAVI TUMMIDI

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月22日 GMT-5 22:49
I have a similar question. Hope someone can solve it
I have a similar question. Hope someone can solve it

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月23日 GMT-5 07:22
Hi,

Why not trying to use "parametric solver"!!

But this : "So basically I want to integrate the product of poynting vector for the fundamental mode @ wavelength 1 and poynting vector for the fundamental mode @ wavelength 2 for the same structure." is a bit not clear!!
You want to integrate the product of the same parameter (Poynting vector) but each one of them is in different solution!!??
Hi, Why not trying to use "parametric solver"!! But this : "So basically I want to integrate the product of poynting vector for the fundamental mode @ wavelength 1 and poynting vector for the fundamental mode @ wavelength 2 for the same structure." is a bit not clear!! You want to integrate the product of the same parameter (Poynting vector) but each one of them is in different solution!!??

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2010年2月23日 GMT-5 08:07


Hello, I think I have a solution.

to integrate two different postevaluate quantities, I use this script and it works well.


% First, you "must" create a fem object with two applications mode (your case) or more applications.
% exemple for N application (It's my script for EMconductiveMediaDC) :



for i=1:N;

clear appl
appl.mode.class = ...;
appl.module = ...;

appl.dim={(sprintf('V%i',i))}; % My case, I solve electrical potential "V"
appl.sshape = ...;

appl.name = (sprintf('emdc%i',i)); % ...
appl.assignsuffix=(sprintf('_emdc%i',i));

clear pnt
pnt.Qj0 = ...;
pnt.ind = ...;
appl.pnt = ...;

clear bnd
bnd.type = ...;
bnd.ind = ...;
appl.bnd = ...;

clear equ
equ.sigma = ...;
equ.ind = ...;
appl.equ = equ;
fem.appl{i} = appl;

end

fem.frame = {'ref'};
fem.border = 1;
clear ode
clear units;
units.basesystem = 'SI';
ode.units = units;
fem.ode=ode;
fem=multiphysics(fem);
fem.xmesh=meshextend(fem);


% Now, you have the structure without solutions %

% I store before all fem object (two in your case) in a FEMS object :
% FEMS{1} = fem1;
% FEMS{2} = fem2; ... ; It's just to concatenate solutions

conc=[];
for i=1:N
u=FEMS{i}.sol.u;
conc=[conc , u];
end

solution=reshape(conc',[],1);
fem.sol=femsol(solution);

% Now, you have your object with all applications mode, so you can use the "postint function" %

Partial_der = postint ( fem , ' Pozav_rfwv1 * Pozav_rfwv2 ' , '' dl '' , [...] );

% Pozav_rfwv1 = application mode 1, Pozav_rfwv2 = application mode 2 %








Hello, I think I have a solution. to integrate two different postevaluate quantities, I use this script and it works well. % First, you "must" create a fem object with two applications mode (your case) or more applications. % exemple for N application (It's my script for EMconductiveMediaDC) : for i=1:N; clear appl appl.mode.class = ...; appl.module = ...; appl.dim={(sprintf('V%i',i))}; % My case, I solve electrical potential "V" appl.sshape = ...; appl.name = (sprintf('emdc%i',i)); % ... appl.assignsuffix=(sprintf('_emdc%i',i)); clear pnt pnt.Qj0 = ...; pnt.ind = ...; appl.pnt = ...; clear bnd bnd.type = ...; bnd.ind = ...; appl.bnd = ...; clear equ equ.sigma = ...; equ.ind = ...; appl.equ = equ; fem.appl{i} = appl; end fem.frame = {'ref'}; fem.border = 1; clear ode clear units; units.basesystem = 'SI'; ode.units = units; fem.ode=ode; fem=multiphysics(fem); fem.xmesh=meshextend(fem); % Now, you have the structure without solutions % % I store before all fem object (two in your case) in a FEMS object : % FEMS{1} = fem1; % FEMS{2} = fem2; ... ; It's just to concatenate solutions conc=[]; for i=1:N u=FEMS{i}.sol.u; conc=[conc , u]; end solution=reshape(conc',[],1); fem.sol=femsol(solution); % Now, you have your object with all applications mode, so you can use the "postint function" % Partial_der = postint ( fem , ' Pozav_rfwv1 * Pozav_rfwv2 ' , '' dl '' , [...] ); % Pozav_rfwv1 = application mode 1, Pozav_rfwv2 = application mode 2 %

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.