Skip to main content

Implementations and continuation of some standard computational fluid dynamics problems using the finite volume method.

Project description

TransiFlow

TransiFlow is a Python package that implements several standard test cases in computational fluid dynamics using the finite volume method. We provide an interface to compute a right-hand side, Jacobian matrix, and mass matrix for these problems, which allows us to perform time integration, or a continuation to compute a bifurcation diagram for the problem at hand.

Continuation

We provide a pseudo-arclength continuation method with adaptive arclength step size. Given a continuation parameters and a target value, the continuation can be called as follows

    # Define the problem
    parameters = {'Reynolds Number': 0, 'Problem Type': 'Lid-driven cavity'}
    interface = Interface(parameters, nx, ny, nz)

    # Instantiate the continuation
    continuation = Continuation(interface)

    # Compute an initial guess
    x0 = interface.vector()
    x0 = continuation.newton(x0)

    # Perform the continuation. x will be the state at the target Reynolds number.
    x, mu = continuation.continuation(x0, 'Reynolds Number', start, target, ds)

Eigenvalue computation

For the computation of eigenvalues, which can be used for the detection of bifurcation points, we provide an interface to JaDaPy. JaDaPy has to be installed or included in the PYTHONPATH to use it. An example of how to perform a continuation and compute eigenvalues can be found in examples/ldc.py.

Installation

TransiFlow is best installed in a virtual environment. We state the most common steps for creating and using a virtual environment here. Refer to the documentation for more details.

To create a virtual environment run

python3 -m venv /path/to/new/virtual/environment

and to activate the virtual environment, run

source /path/to/new/virtual/environment/bin/activate

After this, we can upgrade pip and install TransiFlow in editable mode from the transiflow source directory.

pip install --upgrade pip
pip install -e .

This will also install all of the dependencies. The same can be done for JaDaPy in the same virtual environment.

Now one should be able to run an example.

python examples/ldc.py

If the example fails with

ldc.py:64: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
  plt.show()

this means that tkinter is not available. You can either just save the image to the disk, or install e.g. python3-tk or python3-matplotlib on Debian-based Linux distributions.

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

transiflow-1.0.0.tar.gz (63.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

transiflow-1.0.0-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: transiflow-1.0.0.tar.gz
  • Upload date:
  • Size: 63.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for transiflow-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bcbff158638ce1c7e11c34b88586fed756014e6baad262a6e46fe20e0c0be84b
MD5 aedfdbe7d94b5e15def23b81b33e3408
BLAKE2b-256 d2e8c67f0f5390c491f266d6388ffa00fdd565c477b6a59b649391d037b6a89d

See more details on using hashes here.

Provenance

The following attestation bundles were made for transiflow-1.0.0.tar.gz:

Publisher: cd.yml on BIMAU/transiflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: transiflow-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 56.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for transiflow-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 474fa68aa563abc8d51a2b1618d1247baafebf158a436b9e3b0edf79a35d1fbe
MD5 23a6ae5c3cff07ad80bed45036735589
BLAKE2b-256 11d5a1f4cc77fb1d5d57a4c5ae5f2826e40348906b4ca2dbd86b14f11c9d3e04

See more details on using hashes here.

Provenance

The following attestation bundles were made for transiflow-1.0.0-py3-none-any.whl:

Publisher: cd.yml on BIMAU/transiflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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