Comments (3)
You've identified one of the hardest parts of finite element analysis - the shear amount of data and memory it consumes. I've had large models in commercial software run out of disk space when running calculations. For every 1 node you have 12 displacements multiplied by the number of load combinations to store.
What your code has done works, but purging the displacements for unused load combinations is basically purging all the results for those combinations too, since they are derived "on the fly" from the displacements. You could also use load combination tags to only run selected load combinations. That has already been implemented in a recent change. See "Tags" here https://pynite.readthedocs.io/en/latest/load_combo.html
I'll admit I've never worked with weak references. I am not a programmer by trade, I'm a structural engineer. My code is probably a little weak, but the math/science behind it is pretty solid. I skimmed the python docs on weak references, and it's an interesting concept for efficient memory management. Not sure how I'd go about implementing it in Pynite.
Regarding python-diskcache
, it also looks interesting. I'd be hesitant to add any additional dependencies to the project.
from pynite.
Let me know if this is something that you'd support, and I can write a PR for this!
from pynite.
Sounds like this is absolutely a pain point for many an FEA tool! PyNite should have a solution for this, and maybe to speed up analysis by loading results from a previous run. That would prevent rework if say you accidentally shutdown your python session.
The more I think about it the more it would make sense to have some kind of remove,save,load
combo set of functions that could save progress displacements
into some user defined storage say via a callback or dict-like
interface.
As far as weak references I didn't really get them until I learned about python garbage collection where an object is kept as long as it has references to it, as explained by this example https://eli.thegreenplace.net/2009/06/12/safely-using-destructors-in-python/.
As far as implementation I think it would be relatively straight forward. The node dictionaries would be replaced with the WeakValueDict
so that the results automatically disappeared when removed from the primary storage dictionary. Likewise the load_combo
routine would have to reattach these weakvaluedict's to work again.
I'll find some time to write a demo of this and see if there are any gotchas
BTW Glad to see those load combo tags made it into the repo! I will be able to merge my fork on the latest release before submitting a PR so itll be on the same branch. The reorganization looks wonderful with the analysis code segmented out!
from pynite.
Related Issues (20)
- PhysMember with AuxNodes Bug [Solution Included] HOT 1
- Implement rotational springs? HOT 4
- Discontinuities in moment, deflection diagrams HOT 8
- Cannot create PDF report HOT 2
- Post-processing - analysis fails for two span beams HOT 2
- Define hinge at a member HOT 2
- What is "matrix is singular" error? HOT 4
- FR: Make Matplotlib optional HOT 2
- Error Creating Members with Aux Nodes HOT 4
- CylidnerMesh origin wrong when not using axis='Y' HOT 5
- Reaction force - Equilibrium problem HOT 18
- Rotational Symmetry HOT 3
- Incorrect (Zero) Reaction Observed in Z-Direction for Cantilevered Beam with Spring Supports HOT 4
- 'Quad3D' object has no attribute 'LoadCombos' HOT 2
- RuntimeWarning: divide by zero encountered in double_scalars HOT 2
- P-Delta Member Internal Results Incorrect HOT 1
- PyNite Import Issue HOT 3
- Tension-only members HOT 3
- Issue initalising PhysMember HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pynite.