Sign inSign up

microfluidica/fronts.jl

Sponsored OSS

By microfluidica

•Updated 4 months ago

⚛️ Nonlinear diffusion problems in Julia

Image
1

8.6K

microfluidica/fronts.jl repository overview

Fronts.jl

Stable Dev Build Status Coverage PkgEval SciML Code Style Docker Docker image

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(u) = u^4
D (generic function with 1 method)

julia> eq = DiffusionEquation(D)
∂u/∂t = ∂(D(u)*∂u/∂r)/∂r

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

julia> u = solve(prob)
Solution u after 10 iterations
retcode: Success
ub = 1.0
du/do|b = -0.28388671875000004
ui = 0.10006060603081587

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

julia> d_dr(u, 0.25, 2) # Obtain derivatives
-0.25038534184881966

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

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

Tag summary

Content type

Image

Digest

sha256:3e9ac3a8e…

Size

486.5 MB

Last updated

almost 2 years ago

docker pull microfluidica/fronts.jl

This week's pulls

Pulls:

40

Sep 28 to Oct 4