Modelica中的Weissinger方程解



我想用Modelica求解Weissinger方程,我尝试了OpenModelica中所有现有的求解器,但都失败了。有人试过吗?

以下是代码

model Weissinger_Equation
Real y(start = sqrt(3 / 2));
Real t = time;
Real yp(start = 0);
equation
der(y) = yp;
t * y ^ 2 * yp ^ 3 - y ^ 3 * yp ^ 2 + t * (t ^ 2 + 1) * yp - t ^ 2 * y = 0;
annotation(
experiment(StartTime = 0, StopTime = 10, Tolerance = 0.0001, Interval = 0.0002),
__OpenModelica_commandLineOptions = "--matchingAlgorithm=PFPlusExt --indexReductionMethod=dynamicStateSelection -d=initialization,NLSanalyticJacobian,newInst",
__OpenModelica_simulationFlags(lv = "LOG_STATS", s = "dassl"));
end Weissinger_Equation;

这在Dymola中有效。

model Weissinger_Equation
Real y(fixed = true, start = sqrt(3 / 2));
Real t = time;
Real yp(start = 0);
equation 
der(y) = yp;
t * y ^ 2 * yp ^ 3 - y ^ 3 * yp ^ 2 + t * (t ^ 2 + 1) * yp - t ^ 2 * y = 0;
annotation (
experiment(StartTime = 1, StopTime = 10, Tolerance = 0.0001, Interval = 0.0002),
__OpenModelica_commandLineOptions = "--matchingAlgorithm=PFPlusExt --indexReductionMethod=dynamicStateSelection -d=initialization,NLSanalyticJacobian,newInst",
__OpenModelica_simulationFlags(lv = "LOG_STATS", s = "dassl"));
end Weissinger_Equation;

最新更新