the application decic is different from the predefined syntax
Ahora está siguiendo esta pregunta
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
Se ha producido un error
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
0 votos
Comparte un enlace a esta pregunta
Respuesta aceptada
0 votos
Comparte un enlace a esta respuesta
7 comentarios
Comparte un enlace a este comentario
- Use MStateDependence 'none' if M is constant, otherwise usually 'strong'.
- If M is singular (true DAE), keep MassSingular 'yes'.
- Verify the residual yourself at t0:r = Mfun(t0,y0)*ydot0 - f(t0,y0);norm(r)If norm(r) is not small relative to AbsTol/RelTol scaling, ode15s is right to complain.
- Confirm Mass and MStateDependence match your problem:
- MStateDependence 'none' for constant M
- 'strong' when M depends on y
- If some rows of M are (near) zero, those correspond to algebraic equations. Ensure y0 satisfies those algebraic constraints. If not, allow decic to adjust those y components (set the corresponding fixy entries to false).
- Check scaling and tolerances. Poorly scaled states can make a tiny absolute residual large in relative terms. Consider rescaling states or tightening/loosening tolerances appropriately.
- Provide good Jacobians if you can (via odeset options like Jacobian) or ensure f and Mass are smooth. Discontinuities around t0 can derail the initializer.
- If M is constant and nonsingular, you may set MassSingular 'no' and even precompute Minv to rewrite the system as ydot = Minv*f, but only if that is numerically safe.
- The error means the initializer could not verify consistency, not that your equation is inherently wrong.
- If you know ydot0 that makes M(y0)*ydot0 = f(y0) hold, pass it via InitialSlope.
- Otherwise, yes: use decic to compute consistent (y0, ydot0) first. That is the standard and reliable workflow for index-1 DAEs with ode15s.
Comparte un enlace a este comentario
Comparte un enlace a este comentario
- Free the algebraic components of y0. If some rows of M are zero (or nearly so), those y components are algebraic and must be allowed to move to satisfy constraints.
- Free more entries of yp0 (typically the differential components) until the count of free variables reaches at least n.
- Count of fixed entries:sumfix = sum(fixed_y0) + sum(fixed_yp0); % must be <= 66
- If you believe your previous (y0, yp0) are consistent, verify:r = mass_matrix_handle(t0, y0) * yp0 - f(t0, y0);norm(r)
Cannot specify more than 2 components of y0 and yp0.
Comparte un enlace a este comentario
Comparte un enlace a este comentario
Más respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Productos
Etiquetas
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
