Skip to main content

"AUTO-07p made accessible through python."

Project description

PyPI GA Documentation Status Python Version

What is pyfurc?

pyfurc is a python module that facilitates calculations for non-linear mechanical systems exhibiting bifurcations with the generalized path-following FORTRAN program AUTO-07p directly in python.

Energy expressions, degrees of freedom and loads are defined using sympy symbolic math processing functionality, and equilibrium equations are automatically derived symbolically.

pyfurc then generates FORTRAN code for the bifurcation problem, calls the AUTO-07p routines and reads the result into a pandas DataFrame for post-processing in python.

The basic functionality looks like this:

drawing

Solving a bifurcation problem can be this simple:

import pyfurc as pf
import sympy as sp
import matplotlib.pyplot as plt

phi = pf.Dof("\\varphi")
P = pf.Load("P")

cT = 10/3.1415
ell = 0.5

V = pf.Energy(1/2*cT*phi**2-P*ell*(1-sp.cos(phi)))
bf = pf.BifurcationProblem(V, name="hinged_cantilever")
bf.set_parameter("RL1", 12.73)  #set maximum load

solver = pf.BifurcationProblemSolver(bf)
solver.solve()  # solve problem

for dat in bf.solution.raw_data:
    plt.plot(dat["U(1)"], dat["PAR(1)"])

To get started, check out the Quickstart section below or take a look at the in-depth installation guides in the Documentation.

Part of the documentation is an in-depth tutorial where a simple example problem is solved in different ways.

Quickstart

Prerequisites:

  • Running Linux distribution (only tested on Ubuntu so far)
  • Python 3.8.2+
  • pip

For installing pyfurc run

pip3 install pyfurc

Documentation and Tutorial

The Documentation is hosted on readthedocs.

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

pyfurc-0.2.4.tar.gz (4.2 MB view hashes)

Uploaded Source

Built Distribution

pyfurc-0.2.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

Supported by

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