# Discussion Forum

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

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 PM EDT

Posted: 11 months ago
Updated: 11 months ago

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

Posted: 11 months ago
Updated: 11 months ago

Ares,

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

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com

Posted: 11 months ago
Updated: 11 months ago

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.

Posted: 11 months ago
Updated: 11 months ago

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

Posted: 11 months ago
Updated: 11 months ago

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com