Fronts.jl

Semi-infinite nonlinear diffusion problems in Julia
Author gerlero
Popularity
4 Stars
Updated Last
1 Year Ago
Started In
December 2020

Fronts.jl

Stable Dev Build Status Coverage

Fronts, at the speed of Julia ⚡️

This is the (fully native) Julia version of our numerical package for nonlinear diffusion problems, also available as a Python library.

julia> using Fronts

julia> D(c) = c^4
D (generic function with 1 method)

julia> eq = DiffusionEquation(D, symbol=:c)
∂c/∂t = (D(c)*∂c/∂r)/∂r

julia> prob = DirichletProblem(eq, i=0.1, b=1)
⎧ ∂c/∂t = (D(c)*∂c/∂r)/∂r, r>0,t>0c(r,0) = 0.1, r>0c(0,t) = 1.0, t>0

julia> c = solve(prob)
Solution c obtained after 10 iterations
cb = 1.0
dc/|b = -0.28388671875000004
ci = 0.10006060603081587

julia> c(0.25, 2) # Evaluate the solution anywhere and at any time
0.9440546607878473

julia> ∂_∂r(c, 0.25, 2) # Obtain derivatives
-0.25038534184881966

julia> flux(c, 0.25, 2) # Obtain the flux
0.19888290889257723

CIMEC (UNL–CONICET)   INTEC (UNL–CONICET)   GSaM