jerbaroo / bridge-sim

Python library for concrete slab bridge simulation.
MIT License
1 stars 0 forks source link

Pier boundary condition stiffness #188

Closed jerbaroo closed 3 months ago

jerbaroo commented 4 years ago

@rozsasarpi I have moved your PR here. I made a few changes, the generated .tcl file isn't quite as the example that you had laid out, but it is mostly setup to get there. The last few bits shouldn't be so bad.

Perhaps take a look through the changes (apart from the .tcl file that is there).

If you comment line 214 in bridge_sim/sim/run/opensees/build/d3/__init__.py then duplicate nodes at the bottom of each pier will be placed into the .tcl file. That function is also where the remaining changes need to be made, currently I iterate through each pier and through the bottom nodes (and duplicates) of that pier. I'm still not quite sure how to finish it, I suggest you try generate the OpenSees commands as you think they should look, and if there's difficulty calculating anything on the bridge-sim side just '@' me. I will do my best to reply quickly, to get this thing merged. Keep the code as simple as possible, can restrucure anything before merging.

If you checkout this branch, comment line 214, and then run the following you can see the changes made in the .tcl file. This is also useful to do as you make any changes to the code.

rm -rf generated-data && poetry run python pr-example.py
cp generated-data/bridge-705-10,0-healthy/opensees/bridge-705-10,0-healthy-params=5,-0,-100.tcl og-temp.tcl
git diff og-temp.tcl
jerbaroo commented 4 years ago

A few notes:

rozsasarpi commented 4 years ago

@barischrooneyj Thanks for clear description. I made some steps (the changes are pushed to the branch):

bottom_node_coords
array([[ 43.725   ,  -3.5     , -13.5     ],
       [ 43.725   ,  -3.5     , -12.771849],
       [ 43.725   ,  -3.5     , -12.771358],
       [ 43.725   ,  -3.5     , -12.67365 ],
       [ 43.725   ,  -3.5     , -12.673159],
       [ 43.725   ,  -3.5     , -11.7     ]])

There are nodes that are very close, why is this?

Could you check the changes in the code and look into the remaining TODOs?

jerbaroo commented 4 years ago

Could you check the changes in the code and look into the remaining TODOs?

Yep, I'll get back to you by tomorrow.

jerbaroo commented 4 years ago

Hi @rozsasarpi

jerbaroo commented 4 years ago

There are nodes that are very close, why is this?

I'm not sure but have opened an issue and will look into it. #189

rozsasarpi commented 4 years ago

@barischrooneyj

It would be great to have the other 5 stiffness values as well, I was just going for a quick implementation/solution. For bridge 705 we have a strong feeling that the rotation about the z axis is the (only) relevant degree of freedom to be constrained with a spring. If you have the time and willingness, it would be great if you could add the other directions as well. Be careful and do not add a duplicate node if there is not at least one spring stiffness different from zero for the considered node. I expect that OS would not like that, i.e. having a node not connected to the rest of the structure.

jerbaroo commented 4 years ago

I think (haven't checked it but I'm >95% sure) that the current assignment of material ids ($matTag in OS) is incorrect

I noticed this after OpenSees shouted at me, it's fixed already.

It would be great to have the other 5 stiffness values as well

In my view as package maintainer I think this is necessary. The previous less powerful API fix_z_rotation etc. was functional, and this PR should not introduce replacement features that are not fully implemented. https://blog.codinghorror.com/the-broken-window-theory/

However the partial implementation could already be used, even if not merged.

All duplicate nodes at the bottom of the pier (only those that are created the second, so one member of each twin) should have all of their degrees of freedom fixed ... Could you add this?

Yep, I can add this, I have some time on Friday

Roadmap to getting this merged:

jerbaroo commented 4 years ago

Yep, I can add this, I have some time on Friday

Added this, the code runs now at least.

Can you take a look at what is missing from the .tcl side of things, so the implementation is sufficient for your use-case.

I will try iterate a bit faster to get through this PR.

rozsasarpi commented 4 years ago

Thanks a lot, I can look at it at earliest on Monday or Tuesday.

rozsasarpi commented 4 years ago

@barischrooneyj I run the code and checked the .tcl file. It looks good to me, it has everything what we need for the specific use case. In the coming days I'll propose and prepare a simple case to very the computations.

jerbaroo commented 4 years ago

Will be mostly offline for next two weeks. However would be great to merge this this month. I reckon the first point on the "roadmap" above is the vast majority of the work, and can fly through the rest.

jerbaroo commented 4 years ago

Remembered one thing that is undocumented that you might run into. Currently the stiffness parameters are not taken into account when computing a path of where to store results from simulation.

As a temporary workaround you can change the Bridge.name attribute to save/load results from a different path. I think this is the default right now (that simulations results for one Bridge are loaded/saved based on Bridge.name + loading parameters). The reason being that this is easier to maintain (instead of taking every single Bridge parameter into account when calculating a file path), and just pushes the burden onto the user.

jerbaroo commented 4 years ago

@barischrooneyj I run the code and checked the .tcl file. It looks good to me, it has everything what we need for the specific use case. In the coming days I'll propose and prepare a simple case to very the computations.

@rozsasarpi any luck on verifying the stiffness_z_rotation? I can do the remaining parameters next.

jerbaroo commented 4 years ago

As an aside RE timeline: I will try to finish v0.1 this year and then start tackling the JOSS paper feedback the few months after that as milestone v0.2. Received some great feedback from the JOSS review, https://github.com/openjournals/joss-reviews/issues/2496#issuecomment-691732204 and the following comments are relevant.