Skip to content

Exploring julia packages for data science and other numerical modeling applications

License

Notifications You must be signed in to change notification settings

DReGuerra/scientific_julia

Repository files navigation

scientific_julia

Exploring julia packages for data science and other numerical modeling applications.

André Guerra
April, 2023
[email protected]


Description:
This repository contains a series of scripts that explore various julia packages that may be used for data science and developing numerical solutions to physical models. We start with a simple system of 3 ODEs solved using symbolics packages in ode_sys_sym.jl, then we introduce a parameter to the system of ODEs and solve it for a range of parameter values in ode_sys_num_param.jl.


Core Contents

  1. ode_sys_sym.jl $\rightarrow$ solve a system of 3 ODEs with symbolic packages
  2. ode_sys_num_param.jl $\rightarrow$ solve a system of 3 ODEs with one parameter using numerical definition
  3. ode_sys_num_param_opt.jl $\rightarrow$ solve for an optimal value of the parameter from (2) using an objective function

References

  1. MATLAB example used for the ODE system
  2. ModelingToolkit.jl
  3. DifferentailEquations.jl
  4. Plots.jl

Below are quick descriptions of the main files in this repo and the problem statements to be solved. More detail is found as comments in the respective scripts files.

ode_sys_sym.jl

The naming convention for this script indicates that we are solving an ODE (ode) system (sys) using symbolics (sym) packages in Julia.

Reproduce the MATALB example of a simple system of ODEs[1] in Julia using ModelingToolkit.jl and DifferentialEquations.jl.

Problem Statement

Consider the nonlinear system:
$x' = -x + 3z$
$y' = -y + 2z$
$z' = x^2 - 2z$

Initial conditions:
$x(t=0) = 0$
$y(t=0) = 1/2$
$z(t=0) = 3$

ode_sys_num_param.jl

In this script, we represent the ODE system numerically (not using the symbolics packages).

Problem Statement

Consider the nonlinear system (the same as above but with a parameter p):
$x' = -x + pz$
$y' = -y + 2z$
$z' = x^2 - 2z$

Initial conditions:
$x(t=0) = 0$
$y(t=0) = 1/2$
$z(t=0) = 3$

In this script, we solve the system with a parameter space p = [0,1,2].

ode_sys_num_opt_param.jl

In this script we optimize the parameter p to find the value that satisfies the data available. In this script we also produce this data given a value of p=1.

Problem Statement

The problem statement here is the same as in ode_sys_num_param.jl above. However, here we use an L2 loss function as the objective cost to be optimized in the search for the value of p.

About

Exploring julia packages for data science and other numerical modeling applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages