adtzlr / trusspy Goto Github PK
View Code? Open in Web Editor NEWNonlinear Truss Solver for Python
Home Page: http://trusspy.readthedocs.io/
License: GNU General Public License v3.0
Nonlinear Truss Solver for Python
Home Page: http://trusspy.readthedocs.io/
License: GNU General Public License v3.0
environment.yml
see a49964dError message: It is not currently possible to manually set the aspect on 3D axes
Proposed solution: Remove plt.gca().set_aspect('equal') from helper_functions2.py
Title is self explaining.
Which units should be used for:
So what units should the numbers I write in the functions have?
Some recent code change stopped the important getting started example from working.
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)
Model.plot_history(increments=[0, 1, 3])
is ignored.
Probably remove this argument and always plot the total history?
this leads to errors if the actual list of results is shorter than the specified max. number of steps
closed by 9acd6b0
Remove all unnecessary lines of code, simplify as much as possible but do not change the API
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
The documentation is currently offline due to a rename of the default branch.
New docs will be deployed on readthedocs soon.
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.
via pandoc. PDF also requires LaTeX. This is considered as an external task and shall not be part of TrussPy.
closed by 87ed4d2
As matplotlib provides no arrows in 3D mode by default, trusspy can't display arrows for force and coordinate vectors.
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).
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!
config
argument (undeformed configuration should be shown for inc=0
)force_scale=None
(must be float
)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
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.
Solution is to replace time.clock() according to the following link:
Also, it would be nice if you could get the stiffness matrix as a function of the areas of the elements for optimization purposes!
The setup of trusspy seems broken.
it is ok that it is basically a copy of the first solution but the displacements should be the initial displacements U0
(undeformed increment). Increment 0 exists only for internal usage and for plotting the undeformed model.
see as_matrix()
Solution: replace as_matrix()
with values
.
My question is whether I can choose whether to include geometric nonlinearities (as one can do with material nonlinearities).
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
Figures are outdated, i.e. 3d-plots have no arrow heads and the output seems outdated.
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'
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?
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.
Follow-Up of #10 .
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.