Author |
Message |
Richard Boonstra (rboonstra)
Junior Member Username: rboonstra
Post Number: 3 Registered: 01-2006
| Posted on Tuesday, February 07, 2006 - 05:29 pm: | |
I am getting a divide by 0 error when using the RAMP function. Under DEFINITIONS, mu is defined using the following statements: muo = 1 mu = RAMP(1405-tk,muo,1.5,100) so that when tk > 1405, mu = 1 and it is 1.5 otherwise, with a transition over an interval of 100. tk is listed in the VARIABLES section and has an initial value of 2000. In the BOUNDARIES section I specify a VALUE bc that involves the term 1/mu. When the problem starts I get a divide by zero error with this term highlighted. But mu should never be 0. Even when I replace mu by (mu + 1e-6) it still gives a divide by 0. If the definition of mu is changed to mu = RAMP(1405-tk,muo,1,100) so that it is always 1, the error does not occur. Also, if I replace the RAMP by a simple linear expression for mu (as in: mu = 0.001*tk) the error still occurs. So it seems to be a problem with functional dependency. Can you tell me what is happening? Thanks for your help.
|
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 539 Registered: 06-2003
| Posted on Monday, February 13, 2006 - 03:46 pm: | |
I will have to see the script. The fact that the error still occurs with the linear expression means the failure is not related to the RAMP function. What version of FlexPDE are you using? |
Richard Boonstra (rboonstra)
Member Username: rboonstra
Post Number: 5 Registered: 01-2006
| Posted on Monday, February 13, 2006 - 07:45 pm: | |
I am using 5.0.8. The script is attached. The divide by 0 occurs immediately. It may not converge if you do get it running, however. Thanks again. 5.3 K | Model.pde "Shows divide by 0 error" | | |
|