Skip to main content

A Scipy-Fenics interface for incompressible Navier-Stokes

Project description

# dolfin_navier_scipy

[![DOI](https://zenodo.org/badge/15728657.svg)](https://zenodo.org/badge/latestdoi/15728657)

This python module dns provides an interface between the FEM toolbox [FEniCS](www.fenicsproject.org) and [SciPy](www.scipy.org) in view of simulation and control of incompressible flows. Basically, FEniCS is used to discretize the incompressible Navier-Stokes equations in space. Then dns makes the discretized operators available in SciPy for use in model reduction, simulation, or control and optimization.

dns also contains a solver for the steady state and time dependent problems.

## Quick Start

To get started, create the needed subdirectories and run one of the tests/time_dep_nse_.py files, e.g.

` cd tests mkdir data mkdir results # export PYTHONPATH="$PYTHONPATH:path/to/repo/" # add the repo to the path python3 time_dep_nse_expnonl.py `

Then, to examine the results, launch ` paraview results/vel_TH__timestep.pvd `

## Test Cases and Examples

A selection:

  • tests/mini_setup.py: a minimal setup for a steady-state simulation

  • tests/steadystate_schaefer-turek_2D-1.py: the 2D steady-state cylinder wake benchmark by Schäfer/Turek

  • tests/steadystate_rotcyl.py: the 2D cylinder wake with a freely rotating cylinder as benchmarked in Richter et al.

  • tests/time_dep_nse_.py: time integration with Picard and Newton linearization

  • tests/time_dep_nse_expnonl.py: time integration with explicit treatment of the nonlinearity

  • tests/time_dep_nse_bcrob.py: time integration of the cylinder wake with boundary controls

  • tests/time_dep_nse_krylov.py: time integration with iterative solves of the state equations via [krypy](https://github.com/andrenarchy/krypy)

## Dependencies

The latter is my home-brew module that includes the submodule lin_alg_utils with routines for solving the saddle point problem as it arises in the (v,p) formulation of the NSE.

Note: the branch lau-included already contains the module sadptprj_riclyap_adi

## Documentation

Documentation of the code goes [here](http://dolfin-navier-scipy.readthedocs.org/en/latest/index.html).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dolfin_navier_scipy-1.0.0.tar.gz (36.7 kB view details)

Uploaded Source

Built Distribution

dolfin_navier_scipy-1.0.0-py3-none-any.whl (51.0 kB view details)

Uploaded Python 3

File details

Details for the file dolfin_navier_scipy-1.0.0.tar.gz.

File metadata

  • Download URL: dolfin_navier_scipy-1.0.0.tar.gz
  • Upload date:
  • Size: 36.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

File hashes

Hashes for dolfin_navier_scipy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 894dc49c3277346bf7036833cf30a2391f1f58904b626dbd08a06c15768f920e
MD5 231835fa52ce0528ab0b8fbdba84c1c6
BLAKE2b-256 483138eda4be750d40b0c1c956aeb06dea0ad1cb9041c2880447e25661c1beff

See more details on using hashes here.

File details

Details for the file dolfin_navier_scipy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dolfin_navier_scipy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 51.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.9

File hashes

Hashes for dolfin_navier_scipy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de9c61155e70bc4d5fd78b76b377a71b76f36c9bb99367db9b7939bd5639c037
MD5 7108cdfe3d5fc73ef7e74f88e8a953ec
BLAKE2b-256 c3be4e7ac6cc145f861d490e5d163b1b6deab31d543804ca004d358ab81e9547

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page