OpenSees, the Open System for Earthquake Engineering Simulation

About the development of the FEM module/workbench.

Moderator: bernd

User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by bernd »

Would you like to add it generally to a specific material? Means all the time you use this material or you open this material card the shear modulus is given.

Would you like to add it for a material which is part of a FreeCAD FEM analysis file?
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

bernd wrote: Tue Apr 28, 2020 10:26 am
Would you like to add it for a material which is part of a FreeCAD FEM analysis file?
yes, I want to obtain it in my analysis, I don't want to change it generally in Freecad.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by bernd »

works great here ...

- start FreeCAD
- open a material inside a analysis
- edit shear modulus with material editor (as shown in your screen)
- access material parameter in Python

example attached, open file run code:

Code: Select all

App.ActiveDocument.MechanicalSolidMaterial.Material['ShearModulus']

Code: Select all

>>> 
>>> App.ActiveDocument.MechanicalSolidMaterial.Material['ShearModulus']
'300 kPa'
>>>
 
Attachments
femanalysis_material_with_shearmodulus1.FCStd
(7.87 KiB) Downloaded 56 times
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

bernd wrote: Mon Apr 27, 2020 3:49 am great. How about code it in Python add it to femexamples package, and make a small unit test out of it ?
I made it, everything is ok, but when I want to create an input file, it takes me this error:

Code: Select all

  File "/home/ebi/freecads/freecad-build/Mod/Fem/femsolver/opensees/writer.py", line 131, in write_opensees_input_file
    self.get_element_sets_material_and_femelement_type()
  File "/home/ebi/freecads/freecad-build/Mod/Fem/femsolver/writerbase.py", line 501, in get_element_sets_material_and_femelement_type
    self.get_element_rotation1D_elements()
  File "/home/ebi/freecads/freecad-build/Mod/Fem/femsolver/writerbase.py", line 416, in get_element_rotation1D_elements
    self.theshape
AttributeError: 'FemInputWriterOpenSees' object has no attribute 'theshape'
If I delete the mesh and create it manually it works.
frame3D.FCStd
(28.93 KiB) Downloaded 61 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by bernd »

I may know what the problem is. Do you have a branch to tes with? Your opensees branch is nor uptodate?!
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

bernd wrote: Wed Apr 29, 2020 5:49 pm I may know what the problem is. Do you have a branch to tes with? Your opensees branch is nor uptodate?!
I must commit it to my opensees branch? I sent you a PR, but let me ask you a question:

how can I work on two branches simultaneously, for example when I working on adding example, I want also to work on adding shell element to opensees, how can I do that? if I checkout one branch that did not complete it's changes, git take me an error. thanks.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by bernd »

if you work on two new features use two branches. To checkout another branch you need to commit your changes.

Cherry-pick or a rebase can be used to move changes from branch to the other.

BTW: commit often with les changes.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by Kunda1 »

bernd wrote: Thu Apr 30, 2020 4:24 am if you work on two new features use two branches. To checkout another branch you need to commit your changes.
It's also possible to git stash (if you're not ready to commit)
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

Kunda1 wrote: Thu Apr 30, 2020 12:07 pm
bernd wrote: Thu Apr 30, 2020 4:24 am if you work on two new features use two branches. To checkout another branch you need to commit your changes.
It's also possible to git stash (if you're not ready to commit)
thanks, I will examine it.
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Post by ebrahim raeyat »

bernd wrote: Wed Apr 29, 2020 5:49 pm I may know what the problem is. Do you have a branch to tes with? Your opensees branch is nor uptodate?!
can you detect the problem?
Post Reply