Skip to main content

dolfin_navier_scipy

DOI PyPI version Documentation Status

This python module dns provides an interface between the FEM toolbox FEniCS and SciPy 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.

pip install sadptprj_riclyap_adi
cd tests
mkdir data
mkdir results
# export PYTHONPATH="$PYTHONPATH:path/to/repo/"  # add the repo to the path
# pip install dolfin_navier_scipy                # or install the module using pip
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
  • tests/time_dep_nse_double_rotcyl_bcrob.py: rotating double cylinder via Robin boundary conditions

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.

Installation as Module

pip install dolfin_navier_scipy

Changelog

v1.1.3

  • catch the case that the datapoints do not extend to the full time range
  • enforce explicit specification of the FEM scheme in problem_setups.gen_bccont_fems

Release files for dolfin-navier-scipy 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dolfin-navier-scipy 1.2.4
File Size Uploaded
dolfin_navier_scipy-1.2.4.tar.gz 2.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for dolfin-navier-scipy 1.2.4
File Interpreter ABI Platform
dolfin_navier_scipy-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / dolfin_navier_scipy-1.2.4.tar.gz

Download URL dolfin_navier_scipy-1.2.4.tar.gz
Size 2.9 MB
Tags Source
SHA-256 checksum
How to use checksums
97f612495b1e5aa15082cefe562305e6c7b2722d2b5a6014e9a6123ea7757312
BLAKE2b-256 checksum
How to use checksums
7ccf2ac130f54c02309e88ba9b12729161a59f73c06d53e17dd5d56f525c4d47
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.13

Release files / dolfin_navier_scipy-1.2.4-py3-none-any.whl

Download URL dolfin_navier_scipy-1.2.4-py3-none-any.whl
Size 60.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ce4896946f3c4b4f7624095b08d1f5b02fa73169574b65e75fea68158224399
BLAKE2b-256 checksum
How to use checksums
12ee13d38cfd2433dc3c0182e3c2ed83fb3333ac7ae3e4362a2cc76963c3943a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.13

Release history Release notifications | RSS feed

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

This release

1.2.4 This release

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page