JWock82 / Pynite

A 3D structural engineering finite element library for Python.
MIT License
459 stars 93 forks source link

Nodal displacements specified by user - settlement of a support #37

Closed LcnGnd closed 4 years ago

LcnGnd commented 4 years ago

I would like to introduce settlement of a support or, in general, the possibility to choose a nodal displacement. Pratically it rappresents a new load for the model, but it rappresent also a non homogeneus boundary condition.

Could you give me some suggestions (guidelines)?

JWock82 commented 4 years ago

That is quite a project. I've looked into it before. I'd like to add this functionality eventually, but it requires partitioning the stiffness matrices, solving two sets of equations, and a lot of book-keeping along the way. I'd also like to add spring supports, which is a similar project.

You're welcome to give it a try if you like, but it affects a lot of the core of the code. I want to make sure it gets implemented correctly when I do it, so I'll be slow to review any pull requests on this. It would be easy to accidentally mess up the core of the program.

For now, I have other features that are in line ahead of this. It's a low priority because rarely in practice have I ever encountered a situation where I needed to account for a support settlement. Most settlements are small and most real-world structures can handle a little settlement without much trouble.

Here's a thread on my xlFrame project that discusses doing this for xlFrame. It outlines the basic issues:

https://github.com/JWock82/xlFrame/issues/12

LcnGnd commented 4 years ago

Actually I think this feature is most important in structural engineering. if you want to model a foundation settlement this feature is required. I think about houses but alse about bridges. I would like to add this new features for my project and for all.

I think that the harder part of the work is solve equation's system. I read this topic in "A First Course in the Finite Element Method - Fourth Edition - Daryl L. Logan" at page 42.

For now I've defined the function AddFixedNodalDisplacement in FEModel3D.py which introduce a node displacement in a non-supported node and store this displacement like node's attribute (es. Node.DX). I've modified the DefineSupport funcition introducing possibility to write a number too, which will rappresents the displacement value. It's stored like node's attribute too. Moreover, I've created a list in Node3D's attribute called FixedNodalDisplacements = [] (initially empty) in which storing fixed nodal displacements (Value, Direction)

This is my first idea.

LcnGnd commented 4 years ago

I would like to understand better the static condensation using to solving the model. Where can I find theoretical explanation which you referred in the code to? I'm working on nodal settlement and I have to understand how this part of code works in order to know what modify.

Thanks!

JWock82 commented 4 years ago

The book you referenced above covers static condensation very well. It gives an example of doing it to a plate, but the principle is the same for a beam hinge.

JWock82 commented 4 years ago

Instead of creating another class attribute to store a user defined displacement, you can just store it in the nodal displacement attribute (e.g. Node.DX = 3). That would reduce memory usage, and you could then partition the matrixes based on whether the degree of freedom’s displacement has an assigned value or whether it’s “None” prior to analysis.

LcnGnd commented 4 years ago

Ok, it can be a good solution, I'm agree with you, I will try! In terms of static condensation it is like we have three types of degree od freedom:

So, introducing nodal displacements I will havo to treat releases and nodal displacements at the same time; so the matrixes partition will be different from the previous one. That's right?

JWock82 commented 4 years ago

Update:

I have started working on this feature. I'm finding large plate models are slow, and eliminating the step where PyNite removes rows and columns from the stiffness matrix might greatly improve solution speed on large models. I think partitioning the stiffness matrix will be computationally faster, so I'm going to add this feature.

I don't have a lot of time right now to work on it, so it may take some time. I'm about 25% finished.

LcnGnd commented 4 years ago

I just have completed partitioning of stiffness matrix and I'm trying the code.