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.

Diode example solved but strange

Please login with a confirmed email address before reporting spam

Hi
I tried to solve the semiconductor diode example from the model library but simplifying it a bit. In particular, I discarded the rounded corner and just made it a text book like pn-junction. It seems I can solve the problem using electrostatics and diffusion for n- and p-type carriers. However, I dont trust the solution (hole concentration high at high potential).

It would be great if someone could have a brief look at my model and tell me if there is anything that's obviously wrong.

When solving, I get the message that Comsol failed to evaluate the variable Jacobian for the hole concentration. I guess that has something to do with large gradients being present which originate from the large changes in carrier concentrations.

Any help is much appreciated.


3 Replies Last Post Nov 18, 2012, 8:54 p.m. EST
Andrea Ferrario COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 16, 2012, 4:23 a.m. EST
Hi Martin,

when you get an "early" error from the solver (i.e. an error that occurs before the actual solving phase) then the solution is invalid. You should correct the error first and then look at the results.
The "failed to evaluate variable" error is usually unrelated to the solution and its properties (gradients etc.). It's an error in the model set-up. Very large or very small numbers in e.g. initial conditions or material parameters usually lead to "singular matrix" errors, warning about poor conditioning or possibly errors concerning NaN/Infs.

In your model, the problem is that you use the variables "cp" and "cn" in a Global variable (under Global definitions). Those variables are defined in the node Model 1, so if you want to use them outside that node, you need to qualify them with the proper scope, by writing mod1.cp and mod1.cn. Alternatively, you can define your variable in the Definitions node under the Model 1 node: since you are in the same node, no "mod1." scope is needed.

--
Andrea Ferrario
Electromagnetics Group
COMSOL AB
Hi Martin, when you get an "early" error from the solver (i.e. an error that occurs before the actual solving phase) then the solution is invalid. You should correct the error first and then look at the results. The "failed to evaluate variable" error is usually unrelated to the solution and its properties (gradients etc.). It's an error in the model set-up. Very large or very small numbers in e.g. initial conditions or material parameters usually lead to "singular matrix" errors, warning about poor conditioning or possibly errors concerning NaN/Infs. In your model, the problem is that you use the variables "cp" and "cn" in a Global variable (under Global definitions). Those variables are defined in the node Model 1, so if you want to use them outside that node, you need to qualify them with the proper scope, by writing mod1.cp and mod1.cn. Alternatively, you can define your variable in the Definitions node under the Model 1 node: since you are in the same node, no "mod1." scope is needed. -- Andrea Ferrario Electromagnetics Group COMSOL AB

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 18, 2012, 2:13 p.m. EST
Hi Andrea
Thanks a lot for the feedback. I'll be paying attention to variable scope from now on.
Hi Andrea Thanks a lot for the feedback. I'll be paying attention to variable scope from now on.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 18, 2012, 8:54 p.m. EST
Hello Martin
I am very interested in the diode, but I did not find the model about diode in the model library, I wonder which version of COMSOL do you use, and would you please give me the model, and the reference PDF, my e-mail adress is yuanpengwu@126.com.
Thanks a lot.
Hello Martin I am very interested in the diode, but I did not find the model about diode in the model library, I wonder which version of COMSOL do you use, and would you please give me the model, and the reference PDF, my e-mail adress is yuanpengwu@126.com. Thanks a lot.

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.