the application decic is different from the predefined syntax
Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
0 voti
Condividi un link a questa domanda
Risposta accettata
0 voti
Condividi un link a questa risposta
7 Commenti
Condividi un link a questo commento
- 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.
Condividi un link a questo commento
Condividi un link a questo commento
- 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.
Condividi un link a questo commento
Condividi un link a questo commento
Più risposte (0)
Categorie
Scopri di più su Ordinary Differential Equations in Centro assistenza e File Exchange
Prodotti
Tag
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- 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)
