Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

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.

3D waveguide, compute electromagnetic field

I want to view the electromagnetic field (in particular the norm of E) of 3D waveguide. I haven't experience in a 3D waveguide, I have simulate always a cross-section of waveguide. First of all I solved a cross-section in 2D model in COMSOL, after that I tried a 3D model, after drawing the waveguide I inserted two port (type of port is numeric, the excitation is On only one of this port).
In solver sequences created automatically by COMSOL 4 there is two study step, the first is Boundary mode analysis, the second is Frequency domain.

Problem:
The first study step compute rightly the field at boundary of waveguide, the eigenvalue is almost the same of that in 2D model, the second study step doesn't finish, there is an error. First appears a window:

"The following feature has encountered a problem:
Feature: Stationary 1 (sol1/s1)
Error: Undefined value found."

In the tab Error 1 there is:

"Undefined value found.
- Detail: Undefined value found in the equation residual vector.
There are 1 degrees of freedom giving NaN/Inf in the vector for the variable mod1.emw.S1x
at coordinates: (0,0,0), ...
There are 1 degrees of freedom giving NaN/Inf in the vector for the variable mod1.emw.S2x
at coordinates: (0,0,0), ..."


Where is the problem? Is there another method to solve my (I think and hope) simple problem (view the electromagnetic field in the entire 3D structure)?

Thanks in advance.
And sorry for my bad English.

13 Replies Last Post Oct 7, 2013, 6:29 AM EDT
Posted: 7 years ago Jul 12, 2010, 10:43 AM EDT
The problem is that I have to add two boundary mode analysis, one for each port. Then there are three study in the solver sequence node (two for boundary mode analysis and one for Frequency domain).

The boundary mode analysis is necessary (I think) for simulating the field in the waveguide, each port is a numeric type port then I have to add boundary mode analysis to know the field at boundary of the waveguide.

I hope that this information are useful for other users.
The problem is that I have to add two boundary mode analysis, one for each port. Then there are three study in the solver sequence node (two for boundary mode analysis and one for Frequency domain). The boundary mode analysis is necessary (I think) for simulating the field in the waveguide, each port is a numeric type port then I have to add boundary mode analysis to know the field at boundary of the waveguide. I hope that this information are useful for other users.

Steven Carneiro
Posted: 7 years ago Dec 16, 2010, 11:26 AM EST

The problem is that I have to add two boundary mode analysis, one for each port. Then there are three study in the solver sequence node (two for boundary mode analysis and one for Frequency domain).

The boundary mode analysis is necessary (I think) for simulating the field in the waveguide, each port is a numeric type port then I have to add boundary mode analysis to know the field at boundary of the waveguide.

I hope that this information are useful for other users.


Hello Ciccio,
I having some trouble in putting a 3D model of a simple step-index fiber working... I tried adding the study 'Boundary Mode Analysis' and 'Frequency Domain', but I can't get it working. The only thing that appears after simulation is the following error:

" Undefined value found.
- Detail: Undefined value found in the equation residual vector.
There are 1 degrees of freedom giving NaN/Inf in the vector for the variable mod1.emw.S1x
at coordinates: (0,0,0), ... "

I really don't understand this error code... I was hoping you could help out with this problem. I would appreciate it.
Thank you for your time.

Best Regards,
Steven R. Carneiro
[QUOTE] The problem is that I have to add two boundary mode analysis, one for each port. Then there are three study in the solver sequence node (two for boundary mode analysis and one for Frequency domain). The boundary mode analysis is necessary (I think) for simulating the field in the waveguide, each port is a numeric type port then I have to add boundary mode analysis to know the field at boundary of the waveguide. I hope that this information are useful for other users. [/QUOTE] Hello Ciccio, I having some trouble in putting a 3D model of a simple step-index fiber working... I tried adding the study 'Boundary Mode Analysis' and 'Frequency Domain', but I can't get it working. The only thing that appears after simulation is the following error: " Undefined value found. - Detail: Undefined value found in the equation residual vector. There are 1 degrees of freedom giving NaN/Inf in the vector for the variable mod1.emw.S1x at coordinates: (0,0,0), ... " I really don't understand this error code... I was hoping you could help out with this problem. I would appreciate it. Thank you for your time. Best Regards, Steven R. Carneiro

Shakeeb Bin Hasan
Posted: 7 years ago Dec 17, 2010, 4:53 AM EST
Hi Steven,

Assuming that fields are not blowing up inside, you apparently missed to set something up. It would be easier for people if you share your model file as well.

If you can, I would recommend you to have a look at "waveguide adapter" tutorial in model library. It is basically the same thing, launching an eigen mode in the waveguide.

All the best
Hi Steven, Assuming that fields are not blowing up inside, you apparently missed to set something up. It would be easier for people if you share your model file as well. If you can, I would recommend you to have a look at "waveguide adapter" tutorial in model library. It is basically the same thing, launching an eigen mode in the waveguide. All the best

Robert Buckles
Posted: 6 years ago Apr 28, 2011, 5:48 PM EDT
I am having a similar issue with the Microstrip_on_pcb example. I have brought it forward from Comsol 3.5, and am trying to mak it work in 4.0. Of course, all the documented steps from 3.5 have to be (almost) total reinterpreted, but I think i have it. I perform the boundary mode analysis correctly in the first study and store the solution. I then put the frequency domain in a second study and use the store solution as the initial condition. (Note, I could not put these in the same study, as the stationary solver re-evaluates and changes the mode index computed by the boundary mode.) I get a failed to evaluate expression error (sol3/s1). The full text of the error follows. Boundary 10 is the lumped port. Any ideas?


Failed to evaluate variable.
- Variable: mod1.emw.tEmodez
- Geometry: 1
- Boundary: 10
Failed to evaluate variable.
- Variable: mod1.emw.Jsportz
- Defined as: ((mod1.tEz-(2*mod1.emw.tEmodez))/mod1.emw.etaRef)
Failed to evaluate expression.
- Expression: d((mod1.emw.iomega*mu0_const*(-mod1.emw.Jsportx*test(mod1.tEx)-mod1.emw.Jsporty*test(mod1.tEy)-mod1.emw.Jsportz*test(mod1.tEz)))*(dvol),{test@2})

I am having a similar issue with the Microstrip_on_pcb example. I have brought it forward from Comsol 3.5, and am trying to mak it work in 4.0. Of course, all the documented steps from 3.5 have to be (almost) total reinterpreted, but I think i have it. I perform the boundary mode analysis correctly in the first study and store the solution. I then put the frequency domain in a second study and use the store solution as the initial condition. (Note, I could not put these in the same study, as the stationary solver re-evaluates and changes the mode index computed by the boundary mode.) I get a failed to evaluate expression error (sol3/s1). The full text of the error follows. Boundary 10 is the lumped port. Any ideas? Failed to evaluate variable. - Variable: mod1.emw.tEmodez - Geometry: 1 - Boundary: 10 Failed to evaluate variable. - Variable: mod1.emw.Jsportz - Defined as: ((mod1.tEz-(2*mod1.emw.tEmodez))/mod1.emw.etaRef) Failed to evaluate expression. - Expression: d((mod1.emw.iomega*mu0_const*(-mod1.emw.Jsportx*test(mod1.tEx)-mod1.emw.Jsporty*test(mod1.tEy)-mod1.emw.Jsportz*test(mod1.tEz)))*(dvol),{test@2})

Robert Buckles
Posted: 6 years ago Apr 28, 2011, 5:52 PM EDT
Here is the file. It's 4.0a.
Here is the file. It's 4.0a.


Posted: 6 years ago Aug 2, 2011, 2:50 PM EDT
Hi,

I am having a similar problem in boundary mode analysis and frequency domain analysis in a 3D RF waveguide. Does any one know on how to resolve the following issues I am facing at the moment in Comsol 4.1-

1. When you add boundary mode analysis for two ports, they ask for desired number of modes and search for modes around. Well I know from 2D modal analysis, you can include any number of modes but how to include the search for mode around field as I am just looking for the fundamental mode (I know that you can include the mode index parameter where you are interested as in 2D mode solver but it gives an error in 3 D analysis).

2. Is it possible to solve for TM/TE fundamental mode via boundary mode analysis and then launch the mode at the input port.



Thanks

Roney
Hi, I am having a similar problem in boundary mode analysis and frequency domain analysis in a 3D RF waveguide. Does any one know on how to resolve the following issues I am facing at the moment in Comsol 4.1- 1. When you add boundary mode analysis for two ports, they ask for desired number of modes and search for modes around. Well I know from 2D modal analysis, you can include any number of modes but how to include the search for mode around field as I am just looking for the fundamental mode (I know that you can include the mode index parameter where you are interested as in 2D mode solver but it gives an error in 3 D analysis). 2. Is it possible to solve for TM/TE fundamental mode via boundary mode analysis and then launch the mode at the input port. Thanks Roney

Posted: 6 years ago Mar 22, 2012, 9:53 AM EDT
Hi,
I’ve the same problem. Does anyone get the solutions? I’ve tried to look at "waveguide adapter" tutorial in model library , but it’s not help. There’re still errors. The errors are
" Undefined value found.
- Detail: Undefined value found in the equation residual vector.
There are 1 degrees of freedom giving NaN/Inf in the vector for the variable mod1.emw.S1x
at coordinates: (0,0,0), ... "
It would be a very helpful if anyone can help or get the solutions for these errors
Thank you in advance

Hi, I’ve the same problem. Does anyone get the solutions? I’ve tried to look at "waveguide adapter" tutorial in model library , but it’s not help. There’re still errors. The errors are " Undefined value found. - Detail: Undefined value found in the equation residual vector. There are 1 degrees of freedom giving NaN/Inf in the vector for the variable mod1.emw.S1x at coordinates: (0,0,0), ... " It would be a very helpful if anyone can help or get the solutions for these errors Thank you in advance

Posted: 6 years ago Mar 27, 2012, 9:30 AM EDT
You have to add in the electromagnetic brach two port, set in type of port numeric, you have to set "Wave excitation in the port" to On only to one of the two port.

In the branc study, you have to add two boundary mode analysis, and set correctly the field Port name.

To choose one particular mode in multimodal waveguide, you have to create two stuy, in one add two boundary mode analysis, in the second stydy add only a frequency domain. Create default solver in the second study and set in the dependent varibales the right parameter to choose the solution that you found out in the first stydy.
Sorry for my bad English
You have to add in the electromagnetic brach two port, set in type of port numeric, you have to set "Wave excitation in the port" to On only to one of the two port. In the branc study, you have to add two boundary mode analysis, and set correctly the field Port name. To choose one particular mode in multimodal waveguide, you have to create two stuy, in one add two boundary mode analysis, in the second stydy add only a frequency domain. Create default solver in the second study and set in the dependent varibales the right parameter to choose the solution that you found out in the first stydy. Sorry for my bad English

Akram Hajebifard
Posted: 6 years ago Apr 11, 2012, 12:46 PM EDT
Hi Ciccio,

I have the same problem while I have done what you have said.
Could you please share your structure, which has solved? or send it to my email (ahaje092@uottawa.ca)

Thank you in advance,
Akram
Hi Ciccio, I have the same problem while I have done what you have said. Could you please share your structure, which has solved? or send it to my email (ahaje092@uottawa.ca) Thank you in advance, Akram

Akram Hajebifard
Posted: 6 years ago Apr 11, 2012, 2:49 PM EDT
Hi Steven,

I have the same problem.
Could you please send your structure to me if you have solved it?

my email:
ahaje092@uottawa.ca

Thank you in advance,
Akram
Hi Steven, I have the same problem. Could you please send your structure to me if you have solved it? my email: ahaje092@uottawa.ca Thank you in advance, Akram

Posted: 5 years ago Apr 16, 2013, 4:38 PM EDT

Hi Ciccio,

I have the same problem while I have done what you have said.
Could you please share your structure, which has solved? or send it to my email (ahaje092@uottawa.ca)

Thank you in advance,
Akram


Did you get the required file? I am really stuck into this problem.
Can you help me, please?
[QUOTE] Hi Ciccio, I have the same problem while I have done what you have said. Could you please share your structure, which has solved? or send it to my email (ahaje092@uottawa.ca) Thank you in advance, Akram [/QUOTE] Did you get the required file? I am really stuck into this problem. Can you help me, please?

Massimo Valerio Preite
Posted: 4 years ago Oct 3, 2013, 8:48 AM EDT
Hello.
I don't know if COMSOL (in my case version 3.5a, for the 4.3 or something like that there is an example of a dielectric slab waveguide with 2 Boundary Mode Analysis) has problems with the fact that just one of the BMA can be the ruling application.
I set one port to excitation and the other not. But it gives me problems anyway
Hello. I don't know if COMSOL (in my case version 3.5a, for the 4.3 or something like that there is an example of a dielectric slab waveguide with 2 Boundary Mode Analysis) has problems with the fact that just one of the BMA can be the ruling application. I set one port to excitation and the other not. But it gives me problems anyway

Massimo Valerio Preite
Posted: 4 years ago Oct 7, 2013, 6:29 AM EDT
Hello.
I had a similar problem. To do an S-parameter analysis with more than one port, you must use as many Boundary Mode Analysis as the ports. Go to the User's Guide of the RF module, pages 59-62.
You have to go to the Initial Value page of the Solver Manager and select current solution from the area "Variables not solved for ..."
Hello. I had a similar problem. To do an S-parameter analysis with more than one port, you must use as many Boundary Mode Analysis as the ports. Go to the User's Guide of the RF module, pages 59-62. You have to go to the Initial Value page of the Solver Manager and select current solution from the area "Variables not solved for ..."

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.