New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialization of Testing models #3
Comments
From debugging the FP overflow //_cell_m = 1.4892411615919498e+031;
_cell_diode_m=_cell_m;
_cell_diode_Ids=8.5399999999999991/(-1+exp(24.488272557445249/_cell_diode_m)); |
cell.m is a parameter which is iterated in an initial equation of the class So I am not sure what the exact issue is in this case. However, I updated the |
Looks like a tool issue which fails to solve the minimal model model Simple
final parameter Real m(start = 1, fixed = false);
final parameter Real IsdRef(start = 1E-6, fixed = false);
final parameter Real IphRef = 8.54;
parameter Integer ns = 48;
parameter Real VocRef = 30.2;
final parameter Real VocCellRef = VocRef / ns;
parameter Real VmpRef = 24.0;
final parameter Real VmpCellRef = VmpRef / ns;
parameter Real ImpRef = 7.71;
constant Real Q = 1.6021766208E-19;
parameter Real TRef = 298.15;
final parameter Real VtCellRef = 1.38064852e-23 * TRef / Q;
initial equation
IphRef = IsdRef * (exp(VocCellRef / m / VtCellRef) - 1);
IphRef = IsdRef * (exp(VmpCellRef / m / VtCellRef) - 1) + ImpRef;
end Simple; |
We analyzed the problem. The reason that SimulationX fails is due to the damping strategy of the non-linear solver. If the number of iterations is increased, the solver converges to the expected solution. The solver also converges with the standard solver settings, if the start values are set to be closer at the solution, i.e., |
I was running into convergence problems in OpenModelica with the nonlinear solver, as well. You may be interested in https://trac.openmodelica.org/OpenModelica/ticket/4222. However, I will perform tests with your proposed start values. |
I incorporated you initial conditions into master and version v0.3.1. With the actual nightly built of OpenModelica the problems described in https://trac.openmodelica.org/OpenModelica/ticket/4222 also disappeared. So thanks a lot for your support. |
Do you think we can close this ticket, as your initial conditions are applied to the library? |
We used this Simple.mo (with original initial value settings) example as test case to improve damping strategies of different solvers. So it was a very relevant test case. |
All of the testing models do not succeed to initialize in SimulationX. E.g., PhotoVoltaics.Testing.SimpleCellResistor. Depending on the solver it raises a Floating Point overflow exception, or simply stops to iterate.
The text was updated successfully, but these errors were encountered: