Giter Site home page Giter Site logo

clearcalcs / pycufsm Goto Github PK

View Code? Open in Web Editor NEW
41.0 13.0 21.0 8.62 MB

Python port of CUFSM (Constrained and Unconstrained Finite Strip Method), for analysing the buckling of thin-walled structures.

License: Academic Free License v3.0

Python 68.33% Jupyter Notebook 18.87% Cython 12.80%
python3 structural-engineering structural-analysis thin-walled cold-formed-steel

pycufsm's Introduction

pyCUFSM

Description

This package is primarily a port of CUFSM v5.01, written by Benjamin Schafer PhD et al at Johns Hopkins University, from its original MATLAB language to Python v3, using the Numpy and Scipy packages for matrix manipulation and other advanced mathematics functionality. The goal of this project is to create a derivative of CUFSM which can be used either in Jupyter Notebooks or in headless (library) applications. This project is not affiliated with Benjamin Schafer PhD or Johns Hopkins University in any way.

The original MATLAB CUFSM program may be accessed at the following address: https://www.ce.jhu.edu/cufsm/

Installation

This package is still under heavy development, but it may be installed in several different possible forms, as described below:

  1. Minimal (headless) installation: pip install pycufsm
  2. Installation with plotting capabilities: pip install pycufsm[plot]
  3. Installation with Jupyter Notebooks: pip install pycufsm[jupyter]
  4. Installation with full development dependencies: pip install pycufsm[dev]

Contributing

If you would like to contribute to the pyCUFSM project, then please do - all productive contributions are welcome! However, please make sure that you're working off of the most recent development version of the pyCUFSM code, by cloning the GitHub repository, and please review our wiki article on Contributing to the Code.

Current Status

Complete and Generally Tested

  • Unconstrained FSM (signature curve generation)
  • Constrained FSM
  • Added template_path() function to define a complete arbitrary cross-section by simple paths
  • Add automated validation testing of FSM calculations via pytest
  • Various efficiency and readability improvements:
    • Cythonise a few computation-heavy functions in analysis.py, including klocal(), kglocal(), and assemble()
    • Moved computation-heavy cFSM functions to analysis.py and cythonised them
    • Review code for places where matrices can be preallocated rather than concatenated together

Complete But Untested

  • Equation constraints
  • Spring constraints
  • General boundary conditions

Planned Further Work

  • Handle holes in cross-sections in some meaningful way
  • Various efficiency and readability improvements:
    • Make use of scipy.sparse for sparse matrices where possible
    • Convert some numerical inputs and data to dictionaries with strings
    • Eliminate matrix columns which are nothing more than the index number of the row
    • Review code for function calls that are unnecessarily repeated (a couple of these have already been addressed, e.g. base_properties() did not need to be re-run for every half wavelength)
  • Write API-style documentation (for now, generally refer to MATLAB CUFSM documentation and/or comments)

Disclaimer

While the original MATLAB CUFSM has been extensively tested, and best efforts have been made to check accuracy of this package against the original MATLAB CUFSM program, including via automated validation testing, no warrant is made as to the accuracy of this package. The developers accept no liability for any errors or inaccuracies in this package, including, but not limited to, any problems which may stem from such errors or inaccuracies in this package such as under-conservative engineering designs or structural failures.

Always check your designs and never blindly trust any engineering program, including this one.

pycufsm's People

Contributors

dependabot[bot] avatar joelbenjohn avatar maderero avatar smith120bh avatar someparsa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pycufsm's Issues

edit readme to provide notes on installation

Hi and Thank you indeed for such amazing package.

Could you provide some clear notes in read me so that the users can read them and install the package? It seems that we should download the package and address local root in the codes but this sometimes does not work, at least I did not succeed to do so. One option may be distributing your package by PIP PyPI so that users can easily install them using their command.

add comments or a simple help on examples

I know it is a to-do for this project to create a complete help for usage of functions and to explain how things work in the package, but for the alpha version testers; could you please add some pieces of notes and comments in the examples files or in a separate file to help them understand how files work and how they can use the package? I am working on the examples and notebooks provided and I can not understand why some errors appear. As for examples, files run healthy but no results are being plotted or displayed on the command window.

Issue in results for bending

I wonder do the results from this package are verified / compared with the outputs of the MATLAB version of the cufsm? Results for compression on my analysis are close to existing ones but for bending, they are far away.

Corner nodes >1 affecting distortional mode results

When I evaluate the constrained distortional mode on shapes (raw-generated or using template_path) which have multiple nodes/elements representing the profile corners, the number of distortional modes 'n_dist_modes' increases (following n_dist_modes = n_r*4-2), and the resulting curve and displaced shape show influence of combined local and distortional modes.

with multiple corner elements:
image
image

with n_r=1 (no corner elements)
image
image

If I had to guess, I'd say that the code is struggling to differentiate these corner nodes from "main nodes".

Not sure if that has any effect on physical behavior, but it does make it more difficult to locate the local minimum for distortional buckling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.