Author |
Message |
Dave Gregory (dave)
New member Username: dave
Post Number: 2 Registered: 02-2008
| Posted on Wednesday, February 27, 2008 - 08:38 pm: | |
hi, i am trying to solve richrads equation,whenevr i put fractional power there is some probelm,simulation doesen't run. If i convert to nearest integer it runs perfectly.What could be the probelm. |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 1069 Registered: 06-2003
| Posted on Thursday, February 28, 2008 - 02:49 pm: | |
1. Both your C and J coefficients are proportional to S^3.5. S is initialized to zero, with a value of 1 at the boundary. Polynomial fits to discontinuities oscillate. Fractional powers are implemented as exp(3.5*ln(S)), so a zero or negative value will crash. 2. Using s^3 also crashes, so your remark about integer values seems not to be true. You need to put a floor on S, so it cannot generate absurd numbers for C and J. In the attached, I have used 0.001 as a floor value for S. You can pick a number you like, but not zero.
|
|