the application decic is different from the predefined syntax
Vous suivez désormais cette question
- Les mises à jour seront visibles dans votre flux de contenu suivi.
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails.
Une erreur s'est produite
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
0 votes
Partagez un lien vers cette question
Réponse acceptée
0 votes
Partagez un lien vers cette réponse
7 commentaires
Partagez un lien vers ce commentaire
- 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.
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
- 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.
Partagez un lien vers ce commentaire
Partagez un lien vers ce commentaire
Plus de réponses (0)
Catégories
En savoir plus sur Ordinary Differential Equations dans Centre d'aide et File Exchange
Produits
Tags
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
