Skip to content

Workshop materials for training in scientific computing and scientific machine learning

License

Notifications You must be signed in to change notification settings

SciML/SciMLWorkshop.jl

Repository files navigation

SciMLWorkshop: Workshop Materials for Training in Scientific Computing and Scientific Machine Learning (SciML)

These exercises teach common workflows which involve SciML's tools like DifferentialEquations.jl, ModelingToolkit.jl, DiffEqFlux.jl, and the connections to parts like stochastic differential equations and Bayesian estimation.

Difficulty Levels

The designation (B) is for "Beginner", meaning that a user new to the package should feel comfortable trying this exercise. An exercise designated (I) is for "Intermediate", meaning the user may want to have some previous background in DifferentialEquations.jl or try some (B) exercises first. The additional (E) designation is for "Experienced", which are portions of exercises which may take some work.

Overview

The exercises are described as follows:

  • Exercise 1 is solving a simple stiff ordinary differential equation. This is an introductory exercise to get users acquainted with the syntax.
  • Exercise 2 takes the user through solving a stiff ordinary differential equation and using the ModelingToolkit.jl to automatically convert the function to a symbolic form to derive the analytical Jacobian to speed up the solver. The same biological system is then solved with stochasticity, utilizing EnsembleProblems to understand 95% bounds on the solution. Finally, probabilistic programming is employed to perform Bayesian parameter estimation of the parameters against data.
  • Exercise 3 takes the user through defining hybrid delay differential equation, that is a differential equation with events, and using differentiable programming techniques (automatic differentiation) to to perform gradient-based parameter estimation.
  • Exercise 4 takes the user through differential-algebraic equation (DAE) modeling, the concept of index, and using both mass-matrix and implicit ODE representations. This will require doing a bit of math, but the student will understand how to change their equations to make their DAE numerically easier for the integrators.
  • Exercise 5 has one build an acausal model, a DAE system through a component-based modeling approach. Using a tutorial model of an RC circuit (resistor and capacitor) plus some information about inductors, the user then builds new ModelingToolkit components for an inductor and generates an RLC circuit to be simulated.
  • Exercise 6 takes the user through optimizing a PDE solver, utilizing automatic sparsity pattern recognition, automatic conversion of numerical codes to symbolic codes for analytical construction of the Jacobian, preconditioned GMRES, and setting up a solver for IMEX and GPUs, and compute adjoints of PDEs.
  • Exercise 7 focuses on a chaotic orbit, utilizing parallel ensembles across supercomputers and GPUs to quickly describe phase space.
  • Exercise 8 takes the user through training a neural stochastic differential equation, using GPU-acceleration and adjoints through Flux.jl's neural network framework to build efficient training codes.
  • Exercise 9 is a deep dive into controls analysis on nonlinear models. The user starts by building an acausal model of a DC motor, which is augmented with a PI-controller that is tuned to control the actions of the motor.

This exercise worksheet is meant to be a living document leading new users through a deep dive of the SciML feature set. If you further suggestions or want to contribute new problems, please open an issue or PR at the SciMLWorkshop.jl repository.