Skip to content

Implements the 2D incompressible Navier-Stokes equations in vorticity-streamfunction formulation with a simple user interface

License

Notifications You must be signed in to change notification settings

Emadmasroor/SimpleNavierStokes.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleNavierStokes.jl

Status Coverage
Build Status codecov.io

Hello! Welcome to this simple package. It is currently under active development. If you'd like to see a demonstration of how this code works, head over to my blog post or the associated Nextjournal notebook.

Installation Instructions

This package is not (yet) part of the official Julia package repository, Pkg. To add the package to your Julia environment, you'll need to enter the full package URL like this:

] add https://github.com/emadmasroor/SimpleNavierStokes.jl

in the Julia REPL. Then, type

using SimpleNavierStokes.

That's it!

Running your first simulation

Try the following code to get started:

sol1 = LidDrivenCavity()

This will solve the Navier-Stokes equations on a square 32x32 grid and store the results in a custom type, SimpleNavierStokes.Results. The first time you run this (inside a particular instance of the Julia REPL), it will be rather slow, while the functions compile. The next few times, it should be much faster.

To visualize the results, call the following function directly on sol1:

ShowStreamlines(sol1)

ShowStreamlines() is a custom function, also exported by SimpleNavierStokes (and therefore available for you to use), which operates on objects of type Results. This will visualize the steady-state flow in a square lid-driven cavity.

Lid-driven cavity result

About

Implements the 2D incompressible Navier-Stokes equations in vorticity-streamfunction formulation with a simple user interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages