-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time.clock() error in Python 3.8 #10
Comments
First part: Done. Pushed a new build to PyPi. Please update via pip. |
For the second part: Could you explain your idea in detail? Do you mean something like def stiffness(list_of_element_areas):
#code for stiffness matrix
return KT How would you like to have this implemented? I mean TrussPy is meant for nonlinear deformation analysis of truss structures. So the stiffness matrix changes in EVERY increment. Would you like to access the stiffness matrix for every increment AFTER the job has completed? For example something like M.Results.R[10].KT(list_of_element_areas) for the 10-th increment? Actually I'm not really sure if this makes sense in the nonlinear case at all. This kind of optimization seems more useful for the geometric linear case with small nodal displacements (and constant stiffness matrix) for me - please correct me if I'm wrong. |
Truss problems are used a lot in structural optimization as benchmark problems. Most people who work in that framework use Python, so I think it would be very useful for this community. What I meant exactly is the following:
When you want to optimize a truss, you usually use as design variables the cross sectional areas of the truss elements. Therefore, getting the stiffness matrix as a function of the design variables (either like you said, or just by allowing symbolic variables for ‘area’ in your code) would be very useful.
Another thing I tried to do but wasn’t able to is to get the initial stiffness matrix (undeformed configuration. So let’s say I build my model, then I can’t access the initial stiffness matrix unless I pause the M.run() when the first step is finished. Most people who use the code are looking for the undeformed initial stiffness matrix.
By the way, you have done an amazing job!
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Andreas D.<mailto:notifications@github.com>
Sent: Friday, April 10, 2020 14:37
To: adtzlr/trusspy<mailto:trusspy@noreply.github.com>
Cc: Giannis1993<mailto:yianpass@hotmail.com>; Author<mailto:author@noreply.github.com>
Subject: Re: [adtzlr/trusspy] time.clock() error in Python 3.8 (#10)
For the second part: Could you explain your idea in detail? Do you mean something like
def stiffness(list_of_element_areas):
#code for stiffness matrix
return KT
How would you like to have this implemented? I mean TrussPy is meant for nonlinear deformation analysis of truss structures. So the stiffness matrix changes in EVERY increment. Would you like to access the stiffness matrix for every increment AFTER the job has completed? For example something like M.Results.R[10].KT(list_of_element_areas)?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#10 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AN6QJEW3W73KOWNHBKYUT4DRL4HGTANCNFSM4MEWRAGQ>.
|
I'll close this issue and created #13 for the second part as the title of this issue was already solved. |
Solution is to replace time.clock() according to the following link:
https://stackoverflow.com/questions/58569361/attributeerror-module-time-has-no-attribute-clock-in-python-3-8
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 text was updated successfully, but these errors were encountered: