[New Users] Please note that all new users need to be approved before posting. This process can take up to 24 hours. Thank you for your patience.
Check out the v.254 - Midnight Carnival - Ludibrium Patch Notes here!
If this is your first visit, be sure to check out the Forums Code of Conduct: https://forums.maplestory.nexon.net/discussion/29556/code-of-conducts

Problem regarding Maxfun in ODE IVP

SheikhHammadSheikhHammad
Post: 1
Member
in Tech Support
Hi, I am having a problem in solving ODE IVP. System is not working and reaching maxfun. Error is "Warning, cannot evaluate the solution further right of 535.57713, probably a singularity
".

My Code is:

restart;
dsys1 := { diff(T[ge](t),t)=(1/(2114.26))*(((720/(4.6983649*10^(-3)))*((T[gi](t))-(T[ge](t))))-((604.29*(5/(2.9815))^(0.78))*((T[ge](t)) -298.15))), diff(T[gi](t),t)= (1/(2114.26))*((0.05*700)+(((0.884*((((T[sw](t))-(T[gi](t)))+(((2.71828^((25.317-5144/((T[sw](t))))))-(2.71828^((25.317-5144/((T[gi](t)))))))*((T[sw](t))))/((2.689*10^(5))-(2.71828^((25.317-(5144/((T[sw](t))))))))))))*((T[sw](t))-(T[gi](t)) )) + ((5/((5.321)*(3164-2.36*(T[sw] (t))))) * (0.016273* ( (2.71828^((25.317-(5144/( (T[sw](t)) )))))- (2.71828^((25.317-(5144/( (T[gi](t)) ))))) ) *(0.884*(( (T[sw](t))- (T[gi](t)))+(((2.71828^((25.317-5144/((T[sw](t)) ))))-(2.71828^((25.317-5144/((T[gi](t)))))))*( (T[sw](t)) ))/((2.689*10^(5))-(2.71828^((25.317-(5144/( (T[sw](t)) ))))))))))- ((720/(4.6983649*10^(-3)))*( (T[gi](t)) - (T[ge](t))))), diff(T[c](t), t)= ((1/(3439.205))*((0.05*700) - 215.952*( (T[c](t))- (T[sw](t))))), diff(T[h](t), t) = ((1/(193399.328))*((18050.6*(360- (T[h](t)))) - (0.8*( (T[h](t)) -298.15)))), diff(T[sw](t), t)= ((1/(81667.64)) * ((0.05*700) + (215.952*(( T[c](t))-(T[sw](t) )))+ (0.034233*((3976*298.15)-(3976* (T[sw](t))))) - ((((3146-(2.36*(T[sw] (t) )) )-(3976 * (T[sw](t)) )))* (0.016273 * ( (2.71828^((25.317-(5144/( (T[sw](t)) )))))- (2.71828^((25.317-(5144/( (T[gi](t)) ))))) ) *(0.884*((( (T[sw](t))- (T[gi](t)))+(((2.71828^((25.317-5144/((T[sw](t)) ))))-(2.71828^((25.317-5144/((T[gi](t)))))))*( (T[sw](t)) ))/((2.689*10^(5))-(2.71828^((25.317-(5144/( (T[sw](t)) ))))))))))/( (3146-(2.36*(T[sw] (t) )) ))) - (((0.884*((( (T[sw](t))- (T[gi](t)))+(((2.71828^((25.317-5144/((T[sw](t)) ))))-(2.71828^((25.317-5144/((T[gi](t)))))))*( (T[sw](t)) ))/((2.689*10^(5))-(2.71828^((25.317-(5144/( (T[sw](t)) ))))))))))*( (T[sw](t)) - (T[gi](t)) )))), T[ge](0) = 298.15, T[gi](0) = 298.15, T[c](0)=298.15, T[h](0)=360.0, T[sw](0)=298.15};
dsol1 := dsolve(dsys1, numeric, output = Array([0, 100, 200, 300, 400, 5000]),method= rkf45, abserr= 1*10^(-7),relerr = 1*10^(-7), maxfun=900000000, range=0..5000);

I tried to increase the maxfun, it's still not working. If there's any particular solution, kindly let me know.
Thanks in anticipation!

Comments