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.

How to perform calculation for one variable at two different sweep values

Please login with a confirmed email address before reporting spam

I constructed a photodetector in the Semiconductor module, and then performed a parametric sweep with two parameters, the incident photon flux and bias voltage. For the incident photon flux, only two values were swept, 0 and a non zero value. The aim is to get I-V curves with and without light illumination. Then I got the two I-V curves at two incident photon flux as shown in the appended figure.

Now, I'd like to calculate the difference between the two curves to get net photon current. I tried a lot but didn't manage. The question is how to calculate Jx (current density) minus itself at two incident photon flux parameter values within the results of a parametric sweep.

I'll appreciate all help!



6 Replies Last Post Jul 10, 2019, 5:49 p.m. EDT

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jul 9, 2019, 9:41 p.m. EDT
Updated: 5 years ago Jul 9, 2019, 9:41 p.m. EDT

I believe one should be able to do this with COMSOL with Matlab. Have you tried?

-------------------
ZHANG, Pu
School of Physics,
Huazhong University of Science and Technology
I believe one should be able to do this with COMSOL with Matlab. Have you tried?

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jul 10, 2019, 4:21 a.m. EDT
Updated: 5 years ago Jul 10, 2019, 4:21 a.m. EDT

Ares,

Check the with() and withsol() operators in the documentation.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Ares, Check the with() and withsol() operators in the documentation. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jul 10, 2019, 12:41 p.m. EDT
Updated: 5 years ago Jul 10, 2019, 12:41 p.m. EDT

I believe one should be able to do this with COMSOL with Matlab. Have you tried?

Thanks Zhang! Matlab can provide more freedom. I'll see whether my version can do it.

>I believe one should be able to do this with COMSOL with Matlab. Have you tried? Thanks Zhang! Matlab can provide more freedom. I'll see whether my version can do it.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jul 10, 2019, 1:07 p.m. EDT
Updated: 5 years ago Jul 10, 2019, 1:00 p.m. EDT

Ares,

Check the with() and withsol() operators in the documentation.

Cheers Edgar

Thanks a lot, Edgar! I've tried both. The problems are (1) the variable I'd like to process is within the same data set (solution), seems I can't use these operators to distinguish. (2) I also tried to use two different studies, each defines a different incident photon flux, then sweep voltage. I tried with() and withsol() operators, it seems can't handle a swept variable. I got constant, not a curve.

I am not very familiar with these operators, so probably I didn't use them right. Regards, Ares

>Ares, > >Check the with() and withsol() operators in the documentation. > >Cheers >Edgar Thanks a lot, Edgar! I've tried both. The problems are (1) the variable I'd like to process is within the same data set (solution), seems I can't use these operators to distinguish. (2) I also tried to use two different studies, each defines a different incident photon flux, then sweep voltage. I tried with() and withsol() operators, it seems can't handle a swept variable. I got constant, not a curve. I am not very familiar with these operators, so probably I didn't use them right. Regards, Ares

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jul 10, 2019, 3:54 p.m. EDT
Updated: 5 years ago Jul 10, 2019, 3:53 p.m. EDT

Well they are made for exactly such tasks as yours.

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Well they are made for exactly such tasks as yours.

Please login with a confirmed email address before reporting spam

Posted: 5 years ago Jul 10, 2019, 5:49 p.m. EDT
Updated: 5 years ago Jul 10, 2019, 5:49 p.m. EDT

Well they are made for exactly such tasks as yours.

Hi Edgar, I've got the withsol() operator work. The problem now is, it seems it can only evaluate one data point each time. For example, I have swept two parameters, Q and Va, then I used the following expression: withsol('sol7', abs(semi.JX), setind(Q,1), setval(Va, -0.5)) Then I get one JX value at Q=1 and Va=-0.5. If I don't assign the Va value, it returns the last Va.

I'd like to set one Q value, and then get JX versus all Va values. By using the "setind" and "setval" inside the "withsol()", I can only get one data point designated by (Q,1) and (Va, -0.5). I failed to find a way to define a range for Va. Can this be solved?

Many thanks for your patience and time! Ares

>Well they are made for exactly such tasks as yours. Hi Edgar, I've got the withsol() operator work. The problem now is, it seems it can only evaluate one data point each time. For example, I have swept two parameters, Q and Va, then I used the following expression: withsol('sol7', abs(semi.JX), setind(Q,1), setval(Va, -0.5)) Then I get one JX value at Q=1 and Va=-0.5. If I don't assign the Va value, it returns the last Va. I'd like to set one Q value, and then get JX versus all Va values. By using the "setind" and "setval" inside the "withsol()", I can only get one data point designated by (Q,1) and (Va, -0.5). I failed to find a way to define a range for Va. Can this be solved? Many thanks for your patience and time! Ares

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.