DASSL
Solves stiff differential algebraic equations (DAE) using variable stepsize backwards finite difference formula (BDF) in the SciML scientific machine learning organization
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
2 of 18 committers (11.1%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Solves stiff differential algebraic equations (DAE) using variable stepsize backwards finite difference formula (BDF) in the SciML scientific machine learning organization
Basic Info
- Host: GitHub
- Owner: SciML
- License: other
- Language: Julia
- Default Branch: master
- Homepage: https://benchmarks.sciml.ai/
- Size: 222 KB
Statistics
- Stars: 36
- Watchers: 4
- Forks: 16
- Open Issues: 7
- Releases: 11
Topics
Metadata Files
README.md
DASSL.jl
This is an implementation of DASSL algorithm for solving algebraic differential equations. To install a stable version run
Pkg.add("DASSL")
Common Interface Example
This package is compatible with the JuliaDiffEq common solver interface which is documented in the DifferentialEquations.jl documentation. Following the DAE Tutorial, one can use dassl() as follows:
```julia using DASSL u0 = [1.0, 0, 0] du0 = [-0.04, 0.04, 0.0] tspan = (0.0,100000.0)
function resrob(r,yp,y,p,t) r[1] = -0.04y[1] + 1.0e4y[2]y[3] r[2] = -r[1] - 3.0e7y[2]*y[2] - yp[2] r[1] -= yp[1] r[3] = y[1] + y[2] + y[3] - 1.0 end
prob = DAEProblem(resrob,du0,u0,tspan)
sol = solve(prob, dassl())
```
For more details on using this interface, see the ODE tutorial.
Examples
To solve a scalar equation y'(t)+y(t)=0 with initial data y(0)=0.0 up to time t=10.0 run the following code
using DASSL
F(t,y,dy) = dy+y # the equation solved is F(t,y,dy)=0
y0 = 1.0 # the initial value
tspan = [0.0,10.0] # time span over which we integrate
(tn,yn) = dasslSolve(F,y0,tspan) # returns (tn,yn)
You can also change the relative error tolerance rtol, absolute
error tolerance atol as well as initial step size h0 as follows
(tn,yn) = dasslSolve(F,y0,tspan)
To test the convergence and execution time for index-1 problem run
convergence.jl from the test directory.
Naturally, DASSL.jl also supports multiple equations. For example the pendulum equation
u'-v=0
v'+sin(u)=0
with initial data u(0)=0.0 and v(0)=1.0 can be solved by defining
the following residual function
function F(t,y,dy)
[
dy[1]-y[2], # y[1]=u, y[2]=v
dy[2]+sin(y[1]) # dy[1]=u', dy[2]=v'
]
end
The initial data should now be set as a vector
y0 = [0.0,1.0] # y0=[u(0),v(0)]
The solution can be computed by calling
tspan = [0.0,10.0]
(tn,yn) = dasslSolve(F,y0,tspan)
Output
Apart from producing the times tn and values yn, dasslSolve also
produces the derivatives dyn (as the byproduct of BDF
algorithm), e.g.
(tn,yn,dyn) = dasslSolve(F,y0,tspan)
The decision to produce these values is that it is not entirely
trivial to compute y' from F(t,y,y')=0 when t and y are given.
Keyword arguments
DASSL supports a number of keyword arguments, the names of most of them are compatible with the namse used in ODE package.
reltol=1e-3/abstol=1e-5set the relative/absolute local error tolerancesinitstep=1e-4/minstep=0/maxstep=Infset the initial/minimal/maximal step sizes (when step size drops below minimum the integration stops)jacobianThe most expensive step during the integration is solving the nonlinear equationF(t,y,a*y+b)=0via Newton's method, which requires a jacobian of the formdF/dy+a*dF/dy'. By default, the solver approximates this Jacobian by a method of finite differences but you can provide your own method as a function(t,y,dy,a)->dF/dy+a*dF/dy'. For the pendulum equation we would define jacobian as
jacobian=(t,y,dy,a)->[[a,cos(y[1])] [-1,a]]
maxorder=6Apart from selecting the current step size DASSL method can also dynamically change the order of BDF method used. BDF is stable up to 6-th order, which is the default upper limit but for some systems of equations it may make more sense to use lower orders.dy0=zero(y)When solving differential algebraic equations it is important to start with consistent initial conditions, i.e. to chooseyandy'such thatF(t,y,y')=0initially. DASSL tries to guess the initial value ofy', but if it fails you can set your own initial conditions for the derivative.norm=dassl_norm/weights=dassl_weightsDASSL computes the error roughly aserr=norm(yc-y0), and accepting the step whenerr<1. The local error tolerancesreltolandabstolare hidden in the definition ofdassl_norm(v, wt)=norm(v./wt)/sqrt(length(v)), where weightswtare defined bydassl_weights(y,reltol,abstol)=reltol*abs(y).+abstol. You can supply your own weights and norms when they are more appropriate for the problem at hand.factorize_jacobian=trueis a Boolean option which forces the factorization of Jacobian before storing it. It dramatically increases performance for large systems, but may decrease the computation speed for small systems.
Iterator version
DASSL.jl supports an iterative version of solver (implemented via
coroutines, so debugging might be a little tricky) via
dasslIterator. In the following example the dasslIterator is used
to stop the integration when the solution y drops below 0.1
``` F(t,y,dy)=dy+y
iterator version of dassl solver
for (t,y,dy) in dasslIterator(F,1.0,0.0) if y < 0.1 @show (t,y,dy) break end end ```
Owner
- Name: SciML Open Source Scientific Machine Learning
- Login: SciML
- Kind: organization
- Email: contact@chrisrackauckas.com
- Website: https://sciml.ai
- Twitter: SciML_Org
- Repositories: 170
- Profile: https://github.com/SciML
Open source software for scientific machine learning
Citation (CITATION.bib)
@article{DifferentialEquations.jl-2017,
author = {Rackauckas, Christopher and Nie, Qing},
doi = {10.5334/jors.151},
journal = {The Journal of Open Research Software},
keywords = {Applied Mathematics},
note = {Exported from https://app.dimensions.ai on 2019/05/05},
number = {1},
pages = {},
title = {DifferentialEquations.jl – A Performant and Feature-Rich Ecosystem for Solving Differential Equations in Julia},
url = {https://app.dimensions.ai/details/publication/pub.1085583166 and http://openresearchsoftware.metajnl.com/articles/10.5334/jors.151/galley/245/download/},
volume = {5},
year = {2017}
}
GitHub Events
Total
- Watch event: 1
- Delete event: 2
- Push event: 7
- Pull request event: 5
- Create event: 3
Last Year
- Watch event: 1
- Delete event: 2
- Push event: 7
- Pull request event: 5
- Create event: 3
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Paweł Biernat | p****t@g****m | 82 |
| Christopher Rackauckas | C****t@C****m | 47 |
| dependabot[bot] | 4****] | 7 |
| Anant Thazhemadam | a****m@g****m | 5 |
| github-actions[bot] | 4****] | 3 |
| Stamp1993 | m****3@g****m | 3 |
| Tony Kelman | t****y@k****t | 2 |
| Chris de Graaf | me@c****v | 2 |
| Julia TagBot | 5****t | 1 |
| Ivar Nesje | i****e@g****m | 1 |
| Hendrik Ranocha | m****l@r****e | 1 |
| David Widmann | d****n@i****e | 1 |
| Anshul Singhvi | a****7@s****u | 1 |
| Alex Arslan | a****n@c****t | 1 |
| Lilith Orion Hafner | l****r@g****m | 1 |
| ScottPJones | s****s@a****u | 1 |
| Silvio Traversaro | s****o@t****t | 1 |
| femtocleaner[bot] | f****] | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 15
- Total pull requests: 36
- Average time to close issues: 16 days
- Average time to close pull requests: about 7 hours
- Total issue authors: 8
- Total pull request authors: 17
- Average comments per issue: 3.33
- Average comments per pull request: 0.31
- Merged pull requests: 35
- Bot issues: 0
- Bot pull requests: 11
Past Year
- Issues: 0
- Pull requests: 2
- Average time to close issues: N/A
- Average time to close pull requests: about 3 hours
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- ChrisRackauckas (5)
- mauro3 (3)
- pwl (2)
- stevengj (1)
- MartinOtter (1)
- IainNZ (1)
- JuliaTagBot (1)
- hzgzh (1)
Pull Request Authors
- dependabot[bot] (11)
- ChrisRackauckas (8)
- thazhemadam (8)
- github-actions[bot] (3)
- Stamp1993 (2)
- tkelman (2)
- christopher-dG (2)
- JuliaTagBot (1)
- LilithHafner (1)
- traversaro (1)
- ranocha (1)
- asinghvi17 (1)
- ivarne (1)
- devmotion (1)
- femtocleaner[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 1 total
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 8
juliahub.com: DASSL
Solves stiff differential algebraic equations (DAE) using variable stepsize backwards finite difference formula (BDF) in the SciML scientific machine learning organization
- Homepage: https://benchmarks.sciml.ai/
- Documentation: https://docs.juliahub.com/General/DASSL/stable/
- License: MIT
-
Latest release: 2.6.1
published over 3 years ago
Rankings
Dependencies
- actions/cache v3 composite
- actions/checkout v4 composite
- codecov/codecov-action v3 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- julia-actions/setup-julia latest composite
- actions/checkout v4 composite
- julia-actions/setup-julia latest composite
- actions/checkout v4 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-invalidations v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite