我正在模拟BOD,NH4,有机氮,硝酸盐,亚硝酸盐和DO的命运,并在Matlab中遇到了这个错误。 DO的代码不起作用。
我的代码是:
syms L(x)
syms DO(x)
syms ON(x)
syms NH(x)
syms NO2(x)
syms NO3(x)
syms v
syms kd
syms k1
syms k2
syms k3
syms ka
syms L0
syms DO0
syms DOs
syms ON0
syms NH0
syms NO20
syms NO30
L(x) = dsolve(diff(L) == -kd*L/v, L(0) == L0)
ON(x) =dsolve(diff(ON)==-k1*ON/v, ON(0)==ON0)
NH(x)=dsolve(diff(NH)==-k2*NH/v+k1*ON(x)/v, NH(0)==NH0)
NO2(x)=dsolve(diff(NO2)==-k3*NO2/v+k2*NH(x)/v, NO2(0)==NO20)
NO3(x)=dsolve(diff(NO3)==k3*NO2(x)/v, NO3(0)==NO30)
S= dsolve(diff(DO)==-kd*L(x)/v-3.43*k2*NH(x)/v-1.14*k3*NO2(x)/v+(DOs-DO)*ka/v,
DO(0)==DO0)
错误是:
Error using mupadengine/feval (line 157)
MuPAD error: Error: Invalid equation or initial condition. [ode::splitSys]
Error in dsolve>mupadDsolve (line 325)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 186)
sol = mupadDsolve(args, options);
Error in Project_Guha_final (line 25)
S= dsolve(diff(DO)==-kd*L(x)/v-3.43*k2*NH(x)/v-1.14*k3*NO2(x)/v+(DOs-DO)*ka/v,
DO(0)==DO0)
我不知道为什么我会遇到这个问题。