Git Product home page Git Product logo

trusspy's Introduction

Hi there ๐Ÿ–๏ธ,

this is Andreas, a mechanical engineer graduated from Graz University of Technology, based in ๐Ÿฐโ›ฐ๏ธ Graz, Austria ๐Ÿ‡ฆ๐Ÿ‡น. In my free time, I like running ๐Ÿƒโ€, skiing โ›ท๏ธ and snowboarding ๐Ÿ‚ while I also enjoy family times at home ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ.

GitHub stats

Currently, I'm an engineer in industry (during the day) and a PhD student at Graz University of Technology at the Institute of Structural Durability and Railway Technology (well, at night... ๐Ÿ“š ๐Ÿ•ฏ๏ธ). All the tools related to my scientific work are available here on my GitHub profile.

sparsity-pattern

I'm the author of ๐Ÿ” FElupe, an open-source finite element analysis package focussing on the formulation and numerical solution of nonlinear problems in continuum mechanics of solid bodies. Most of the open source finite element packages I found are either super-difficult to install, needs to be compiled or are great but slow (or at least too slow for my needs).

With FElupe, I try to fill a gap in between.

I'm convinced that static input files ๐Ÿ–จ๏ธ which are passed to a standalone fea solver ๐Ÿ–ฉ are a thing of the last decades ๐Ÿ’พ. Instead, scripts are input files: easy to adopt scripts with access to third-party libraries ๐Ÿ›’, written in common scripting languages are the way to go. With common languages I mean something easy-to-learn for engineers, like Python, Matlab/Octave or Julia, not another proprietary simulation file format. FElupe is just another one of many open-source finite element analysis packages using this approach. Well defined and public available scripting interfaces hopefully accelerate the introduction of flexible natural language-processing for simulations.

Projects

Python Fortran Julia PyPI Markdown Jupyter GitHub Pages PyTorch Codecov

Star History Chart

Code Snippets

trusspy's People

Contributors

adtzlr avatar fran-retfie 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

trusspy's Issues

Simplify `Model.plot_model()`

  • remove the config argument (undeformed configuration should be shown for inc=0)
  • don't allow force_scale=None (must be float)

where are element and node forces stored in the simulation?

Hi! I was easily managing to get trusspy running on linux - thanks a lot :) I'm trying to simulate some pretty simple static structures and I want to read out the individual element and reaction forces. I looked into a few of the object's properties - however the complexity of the data structure was a bit overwhelming and didn't find the forces :)

could you give me a hint where to look for the reaction forces for each node and the forces inside each element?

Martin

Plot supports based on boundary conditions

Add an option to draw supports (roller, pinned) inside the model plot. As TrussPy is 3D-based this seems a quite complicated task: Which symbols should be used? The Classic symbols in each direction? Which plane should be used to draw the symbols? Is it possible that the 2D plots are still projections of the 3D scene or are special considerations based on 2D/3D needed?

A0 and E0

Hi, I'd be grateful if you could help me figure out how should I assign A0 and E0, and generally, all variables which have been defined relatively when I use the excel sheet as inputs. Regards,
truss1.xlsx

No such file or directory: 'pandoc'

Python version: 3.11
Trusspy Version: trusspy 20221217

I got error below while running https://github.com/adtzlr/trusspy/tree/master/tests/eADV_A_model_python.py

FileNotFoundError Traceback (most recent call last)
File /opt/homebrew/lib/python3.11/site-packages/trusspy/model.py:418, in Model.run(self)
416 if self.logfile:
417 sys.stdout = self.stdout
--> 418 sp_run(['pandoc', self.logfile_name+'.md', '-t', 'latex', '-o', self.logfile_name+'.pdf'])
419 if self.Settings.logpdf: sp_run(['pandoc', self.logfile_name+'.md', '-t', 'html', '-s', '-o', self.logfile_name+'.html'])
File /opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py:548, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
545 kwargs['stdout'] = PIPE
...
1900 err_msg = os.strerror(errno_num)
-> 1901 raise child_exception_type(errno_num, err_msg, err_filename)
1902 raise child_exception_type(err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'pandoc'

Was wondering how to solve it. Any suggestion would be appreciated. Thank you so much!

plot movie (gif): wrong frame ordering on binder

The png's seem to be unordered if example 101 is executed on binder. On my local machine (Windows) everything is ok. Probably binder is running on Linux and files are sorted differently there. It is assumed that the gif generation is also broken if TrussPy is executed locally on a Linux machine.

Setup GitHub Actions

Preliminary Work

  • Run tests with tox

Tasks

  • Automate publish on PyPI if a release is created
  • Run tests and use codecov.io (needs preliminary tasks)

Proper dimension switch 2D/3D

For now only 3D-input is possible but quite anything is prepared for 2D mode. replace all static "3" to self.ndim to get dynamic analyis dimension.

[Python] Usage of __slots__ or @dataclass(slots=True) in python classes for reducing memory usage and performance improvement

I saw the Pycon 2016 talk from Nina Zakharenko about Memory Management in Python and at the 21:19 min, she introduced the dunker slots attribute to define the attributes. Because with that, you can't assign at runtime new attributes to the class instance. This reduces the memory usage and improves performance.

To reduce boilerplate, there is also the possibility to use @dataclass(slots=True) as shown in this video, see also the python documentation โ†’ https://docs.python.org/3.10/library/dataclasses.html

Reduce "side-effects" in functions

During function calls, several class Attributes are updated. Therefore some function definitions have "side-effects" to the model. They may generate Errors which are hard to debug.

No arrows in 3D view

As matplotlib provides no arrows in 3D mode by default, trusspy can't display arrows for force and coordinate vectors.

Example not working

Hi, I was interested in using this library. However, when I tried running the example, an error showing 'Model' object has no attribute 'External Forces'

Docs are broken

The documentation is currently offline due to a rename of the default branch.

New docs will be deployed on readthedocs soon.

  • Re-upload to readthedocs
  • Re-add apidoc

[Question] Which units should be used?

Which units should be used for:

  • Length: m ?
  • Area: mยฒ ?
  • Force: kN ?
  • E-modulus: kN/mยฒ ?
  • Degree: rad ?

So what units should the numbers I write in the functions have?

The keyword `fps` is no longer supported. Use `duration`(in ms) instead

Output exceeds the size limit. Open the full output data in a text editor---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[40], line 2
1 # show results
----> 2 M.plot_movie(
3 config=["deformed"],
4 view="xz",
5 contour="force",
6 lim_scale=(-0.5, 3.5, -2, 2),
7 force_scale=1.0,
8 cbar_limits=[-1, 1],
9 )

File [~(removedforprivacy)....site-packages/trusspy/model.py:712), in Model.plot_movie(self, config, view, contour, lim_scale, force_scale, nodesize, cbar_limits, incs)
701 def plot_movie(
702 self,
703 config="both",
(...)
710 incs="all",
711 ):
--> 712 p_movie(
713 self,
714 config,
715 view,
716 contour,
...
326 save_args = {
327 "format": format or Image.registered_extensions()[extension],
328 }

TypeError: The keyword fps is no longer supported. Use duration(in ms) instead, e.g. fps=50 == duration=20 (1000 * 1/50).

`plot_model()` raises `ValueError`

due to missing a ax argument in plt.colorbar():

ValueError: Unable to determine Axes to steal space for Colorbar. 
Either provide the *cax* argument to use as the Axes for the Colorbar, 
provide the *ax* argument to steal space from it, or add *mappable* to an Axes.

(Python 3.10, Win10)

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.