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.

Attempt to evaluate real logarithm of negative number.

Please login with a confirmed email address before reporting spam

Hi, All

I got this error when I run the simulation:

" Attempt to evaluate real logarithm of negative number.
- Function: log
Failed to evaluate variable.
- Variable: comp1.semi.Efp
- Defined as: comp1.semi.Ev-(comp1.semi.Vth*log(comp1.semi.P/(comp1.semi.gamma_p*comp1.semi.Nv))) "

I tried to calculate the component in log (i.e., comp1.semi.P/(comp1.semi.gamma_p*comp1.semi.Nv) ) in Comsol Results and the result shows that this component indeed a positive number with a order about 10^-4~10^-9. If so, why I still face this error?

Can anybody help?

Best regards

1 Reply Last Post Mar 21, 2017, 3:13 p.m. EDT
Robert Koslover Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 7 years ago Mar 21, 2017, 3:13 p.m. EDT
You appear to be using one of the applications that I'm not very familiar with, but I'll risk appearing ignorant and offer you a suggestion:
Are you *sure* that for ALL cases (e.g., locations, time steps, frequencies, etc), that may be being subjected to evaluation(s):
1) The number in question is never negative.
2) The number in question is never zero.
3) The number in question is purely real, not complex (not sure if this reqrmt is critical or not)

You appear to be using one of the applications that I'm not very familiar with, but I'll risk appearing ignorant and offer you a suggestion: Are you *sure* that for ALL cases (e.g., locations, time steps, frequencies, etc), that may be being subjected to evaluation(s): 1) The number in question is never negative. 2) The number in question is never zero. 3) The number in question is purely real, not complex (not sure if this reqrmt is critical or not)

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.