zhuminjie / OpenSeesPy

OpenSeesPy versions, doc, and pip
Other
177 stars 66 forks source link

Changing the value of a specific parameter of a material #136

Open ADuzandeh opened 6 months ago

ADuzandeh commented 6 months ago

Hello,

Would you please let me know how I can use this code line from Opensees (tcl) in the Openseespy environment?

"updateParameter -material $tag -refB $newVal"

Specifically, I wish to set a new value for Bulk modulus to PDMY or PIMY after gravity analysis; however, I am unable to find any guidance on how to accomplish this task with OpenSeasPy.

zhuminjie commented 6 months ago

https://openseespydoc.readthedocs.io/en/latest/src/updateParameter.html

zhuminjie commented 6 months ago

Which version are you using? I don't find the syntax in the latest version for Tcl.

ADuzandeh commented 6 months ago

Thank you for your prompt response. I do not use the Opensees (tcl) in particular in my search I find this code line I am sharing the link to the webpage with you: https://opensees.berkeley.edu/OpenSees/manuals/usermanual/1560.htm

In the meantime, I use this code that you suggested; so firstly we have to assign a parameter tag to my specific material and after that update the parameters but the problem is that It always shows an error. I share the code lines and the error with you:

"ops.parameter(1, 'element', *eltag_T1, 'material', 1, 'refBulkModul') ops.updateParameter(1, 5.5e4)

error: Parameter::addComponent 1 -- no objects were able to identify parameter"

zhuminjie commented 6 months ago

I can't give you any suggestions unless it's a bug. If you believe it's a bug, please share a minimum working example.

ADuzandeh commented 6 months ago

Hello,

I appreciate your help. I would like to share a minimum working example with you to better understand the issue.

Ex.txt

zhuminjie commented 6 months ago

Try "bulkModulus"

ADuzandeh commented 6 months ago

I tested it and it is not working yet and appears to have the same error.

mhscott commented 6 months ago

Try adding the material tag after 'bulkModulus'

ops.nDMaterial('PDMY',23,.....)
...
ops.parameter(.......,'bulkModulus',23)