Skip to content

Commit d11016b

Browse files
Update faq.md
1 parent 10ea8e6 commit d11016b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/src/basics/faq.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,26 @@ values, like solving for `u^2` or `exp(u)` instead of `u`, which mathematically
177177
can only be positive. Look into using a tool like [ModelingToolkit.jl](https://mtk.sciml.ai/dev/)
178178
for automatically transforming your equations.
179179

180+
### I'm trying to solve DAEs but my solver is unstable and/or slow, what's wrong with IDA and DFBDF?
181+
182+
Fully implicit DAEs ``f(du,u,p,t) = 0`` are extremely difficult to numerical handle for many reasons.
183+
The linearly implicit form ``Mu'=f(u)`` where ``M`` is a singular mass matrix is much simpler
184+
numerically and thus results in much better performance. This is seen in many instances with the
185+
SciMLBenchmarks. Thus it is recommended that in almost all or most situations, one should use the
186+
mass matrix form of the DAE solver.
187+
188+
However, it is generally recommended that if you are solving a DAE that you use
189+
[ModelingToolkit.jl](https://mtk.sciml.ai/dev/) because it has many utilities for pre-processing
190+
DAEs to make them more numerically stable. For example, if your algebraic conditions are not
191+
uniquely matching to algebraic variables (i.e. you have at least one unique algebraic variable
192+
per algebraic condition), then the system is what is known as high index and thus the numerical
193+
DAE solvers will not be able to accurately solve the equation without rewriting the equations.
194+
ModelingToolkit is able to automatically detect this kind of condition and perform the equation
195+
transformation automatically. As such, if you are having difficulties with a DAE system, it is
196+
highly recommended to try `modelingtookitize` to transform the system to MTK's formulation and
197+
running `structural_simplify` to see how it would change the equations, simply convert the model
198+
to MTK.
199+
180200
## [Performance](@id faq_performance)
181201

182202
#### GPUs, multithreading and distributed computation support

0 commit comments

Comments
 (0)