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.

exponential function error

Please login with a confirmed email address before reporting spam

Hello~

In global definition>funtions

I defined the function : exp(-1/(T-Tg)) , T was arguments.

At T=Tg, the exponential value should be zero but it was infinity.

can anybody help??


11 Replies Last Post 16.11.2011, 07:35 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 08:21 GMT-4
Hi,

If you approach Tg from the left, i.e. is T is almost Tg but slightly less, then the function goes to +infinity (just try to solve the limit, the exponent wil go to +infinity), if you approach Tg from the right then it goes to zero (the exponent goes to -infinity) at the limit never really reaching zero.


Hello~

In global definition>funtions

I defined the function : exp(-1/(T-Tg)) , T was arguments.

At T=Tg, the exponential value should be zero but it was infinity.

can anybody help??


Hi, If you approach Tg from the left, i.e. is T is almost Tg but slightly less, then the function goes to +infinity (just try to solve the limit, the exponent wil go to +infinity), if you approach Tg from the right then it goes to zero (the exponent goes to -infinity) at the limit never really reaching zero. [QUOTE] Hello~ In global definition>funtions I defined the function : exp(-1/(T-Tg)) , T was arguments. At T=Tg, the exponential value should be zero but it was infinity. can anybody help?? [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 08:28 GMT-4
Dear am fa thank you for replying.

I understood your comment but, how can i treat that function to be zero?

Is there any limit operator in comsol?
Dear am fa thank you for replying. I understood your comment but, how can i treat that function to be zero? Is there any limit operator in comsol?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 08:36 GMT-4
I tried with : exp(1/(Tg-T))

but the answer was infinity...

I tried with : exp(1/(Tg-T)) but the answer was infinity...

Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 09:51 GMT-4
Hi,

The value becomes 0 or infinity depending on from which side you approach it. You are probably plotting a range that includes values on both sides of Tg.

Plotting exp(-1/(5-x)), for example, from 0 to 5, shows that the value approaches 0 "from the left." Plotting this function from 0 to 10, for example, means that you pass the singularity at 5, and an infinite value (or rather numerically very large number) makes the plot appear irregular.

Best regards,
Magnus Ringh, COMSOL
Hi, The value becomes 0 or infinity depending on from which side you approach it. You are probably plotting a range that includes values on both sides of Tg. Plotting exp(-1/(5-x)), for example, from 0 to 5, shows that the value approaches 0 "from the left." Plotting this function from 0 to 10, for example, means that you pass the singularity at 5, and an infinite value (or rather numerically very large number) makes the plot appear irregular. Best regards, Magnus Ringh, COMSOL

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 10:05 GMT-4
Hi,

you might consider a step-by-step definition to avoid the singularity:

f(T) = 0 for abs(T-Tg) < some very small value

Regards
Edgar
Hi, you might consider a step-by-step definition to avoid the singularity: f(T) = 0 for abs(T-Tg) < some very small value Regards Edgar

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 10:53 GMT-4
I guess you only want to apply your original function for T > Tg since it behaves strangely for T < Tg (and not just at T = Tg). IF that is true, then set f(T) = 0 for all T< Tg + epsilon (a small value). Even if T never becomes less than Tg at any solution time, during iterations it may and it’s good to have a well behaved function in that case.

Nagi Elabbasi
Veryst Engineering
I guess you only want to apply your original function for T > Tg since it behaves strangely for T < Tg (and not just at T = Tg). IF that is true, then set f(T) = 0 for all T< Tg + epsilon (a small value). Even if T never becomes less than Tg at any solution time, during iterations it may and it’s good to have a well behaved function in that case. Nagi Elabbasi Veryst Engineering

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.03.2011, 11:57 GMT-4
Thank you!!!!

I've solved that problem.
Thank you!!!! I've solved that problem.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 01.04.2011, 03:05 GMT-4
Hi

a usefull "epsilon" or small value is the paameter (internal to COMSOL of "eps", smallest step value you might distinguish from "1" in the used binary numerical representation

--
Good luck
Ivar
Hi a usefull "epsilon" or small value is the paameter (internal to COMSOL of "eps", smallest step value you might distinguish from "1" in the used binary numerical representation -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14.10.2011, 01:52 GMT-4
hii i guess what you wanna solve your equation that's less then and more then values are comparable in system equation original function for T > Tg since it behaves strangely for T < Tg (and not just at T = Tg)


Plotting your exponential function in exp(-1/(5-x)), for example, from 0 to 5, shows that the value approaches 0 "from the left." Plotting this function from 0 to 10 put in to values let - x=0,1,2,3,,,,and shown for more solving equation u can got help with the site here's the link
math.tutorvista.com/calculus/graphing-exponential-functions.html
hii i guess what you wanna solve your equation that's less then and more then values are comparable in system equation original function for T > Tg since it behaves strangely for T < Tg (and not just at T = Tg) Plotting your exponential function in exp(-1/(5-x)), for example, from 0 to 5, shows that the value approaches 0 "from the left." Plotting this function from 0 to 10 put in to values let - x=0,1,2,3,,,,and shown for more solving equation u can got help with the site here's the link http://math.tutorvista.com/calculus/graphing-exponential-functions.html

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16.11.2011, 01:54 GMT-5
Help with Pre-Calc homework. Exponential functions?
So, our Pre-calc teacher thinks we are geniouses since we are in a pre calc class-__- so she never really explains us stuff.and doesnt teach the way book teaches.but im scared to come up to her because she's a freaking Gorgon and we got like 14 people left in this class cause they all switched out...anyways.. So here's the problem i cant figure out. You gotta use this exponential formula: y=Pe^rt (to the 'rt' power) .
The word problem: Radium-221 has a half-life of 30 sec. How long will it take for 95% of a sample to decay?
Could anyone please just explain what to put where? would you convert 95% into decimal and use is as P?

Thank you!!
NICK
Help with Pre-Calc homework. Exponential functions? So, our Pre-calc teacher thinks we are geniouses since we are in a pre calc class-__- so she never really explains us stuff.and doesnt teach the way book teaches.but im scared to come up to her because she's a freaking Gorgon and we got like 14 people left in this class cause they all switched out...anyways.. So here's the problem i cant figure out. You gotta use this exponential formula: y=Pe^rt (to the 'rt' power) . The word problem: Radium-221 has a half-life of 30 sec. How long will it take for 95% of a sample to decay? Could anyone please just explain what to put where? would you convert 95% into decimal and use is as P? Thank you!! NICK

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 16.11.2011, 07:35 GMT-5
the answer is here...: en.wikipedia.org/wiki/Mean_lifetime#Mean_lifetime

looks like you have to find a value for the radium decay constant...

I wouldn't convert 95% into decimals and use it as P...

isolate t...
the answer is here...: http://en.wikipedia.org/wiki/Mean_lifetime#Mean_lifetime looks like you have to find a value for the radium decay constant... I wouldn't convert 95% into decimals and use it as P... isolate t...

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.