OpenSees, the Open System for Earthquake Engineering Simulation

About the development of the FEM module/workbench.

Moderator: bernd

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

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby bernd » Fri Feb 28, 2020 11:04 am

shahram10715 wrote:
Fri Feb 28, 2020 10:06 am
ebrahim raeyat wrote:
Wed Feb 26, 2020 9:22 pm
thanks to openseespy, we can write opensees input file in python format and benefit from all of python library!

https://openseespydoc.readthedocs.io/en/latest/
Its a good choice but we must consider that this package is not published open source yet.
If it is not OpenSource I will not do any dev in my spare time in this regard. I would recommend to use the TCL interface than. Made a issue to bring light in the darkness ... https://github.com/OpenSeesPy-pip/opens ... /issues/11
User avatar
Kunda1
Posts: 7308
Joined: Thu Jan 05, 2017 9:03 pm

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby Kunda1 » Fri Feb 28, 2020 2:32 pm

shahram10715 wrote:
Fri Feb 28, 2020 10:03 am
Kunda1 wrote:
Thu Feb 27, 2020 2:29 pm
Maybe a conda repository ?
I'm not quite sure but I think it is dedicated to python packages only.
See https://github.com/FreeCAD/FreeCAD_Cond ... /README.md
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
bernd
Posts: 9779
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby bernd » Fri Feb 28, 2020 3:28 pm

bernd wrote:
Fri Feb 28, 2020 11:04 am
shahram10715 wrote:
Fri Feb 28, 2020 10:06 am
ebrahim raeyat wrote:
Wed Feb 26, 2020 9:22 pm
thanks to openseespy, we can write opensees input file in python format and benefit from all of python library!

https://openseespydoc.readthedocs.io/en/latest/
Its a good choice but we must consider that this package is not published open source yet.
If it is not OpenSource I will not do any dev in my spare time in this regard. I would recommend to use the TCL interface than. Made a issue to bring light in the darkness ... https://github.com/OpenSeesPy-pip/opens ... /issues/11
according to a post on the issue OpenSeesPy is opensource and included in main opensees.

Would be good if one you you both opensees guys would test this OpenSeesPy and could give some feedback. Python is the languarge we speak, thus it would be cool to use this one.

cheers bernd
User avatar
ebrahim raeyat
Posts: 281
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby ebrahim raeyat » Fri Feb 28, 2020 4:35 pm

bernd wrote:
Fri Feb 28, 2020 3:28 pm
according to a post on the issue OpenSeesPy is opensource and included in main opensees.

Would be good if one you you both opensees guys would test this OpenSeesPy and could give some feedback. Python is the languarge we speak, thus it would be cool to use this one.

cheers bernd
yes, it is in main source of opensees:
openseespy.png
openseespy.png (85.64 KiB) Viewed 303 times
i will try to prepare an example for openseespy, these are available:

https://openseespydoc.readthedocs.io/en ... mples.html
User avatar
kkremitzki
Posts: 1982
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby kkremitzki » Fri Feb 28, 2020 11:25 pm

OpenSees' license
The Regents grants permission, without fee and without a written license agreement, for (a) use,
reproduction, modification, and distribution of this software and its documentation by educational,
research, and non-profit entities for noncommercial purposes only;
is not open source because of its non-commercial restriction, failing #6 of The Open Source Definition, "6. No Discrimination Against Fields of Endeavor". It's source-available. With its current license it will never, for example, be able to be distributed in Debian.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
ebrahim raeyat
Posts: 281
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby ebrahim raeyat » Sat Feb 29, 2020 8:43 am

according to this issue on openseespy-pip i changed the name of element, but new question:

node numbering for C3D20 element is different than 20NodeBrick element in opensees, i map those node number, but it gives me this error:

Code: Select all

Twenty_Node_Brick::Jacobian3d - Non-positive Jacobian: -1.73472e-11
    0   -8.260282e-01   -8.260282e-01   -8.260282e-01    2.261895e-01
    1   -3.936492e-01   -2.745967e-02   -2.745967e-02   -1.087298e-01
    2   -1.274597e-01   -1.274597e-01    6.350833e-03   -3.127017e-02
    3   -2.745967e-02   -3.936492e-01   -2.745967e-02   -1.087298e-01
    4   -2.745967e-02   -2.745967e-02   -3.936492e-01   -1.087298e-01
    5   -1.274597e-01    6.350833e-03   -1.274597e-01   -3.127017e-02
    6   -2.602817e-02   -2.602817e-02   -2.602817e-02   -6.189500e-03
    7    6.350833e-03   -1.274597e-01   -1.274597e-01   -3.127017e-02
    8    1.219677e+00   -1.774597e-01   -1.774597e-01    3.149193e-01
    9    1.774597e-01    1.549193e-01   -2.254033e-02    4.000000e-02
   10    1.549193e-01    1.774597e-01   -2.254033e-02    4.000000e-02
   11   -1.774597e-01    1.219677e+00   -1.774597e-01    3.149193e-01
   12    1.549193e-01   -2.254033e-02    1.774597e-01    4.000000e-02
   13    2.254033e-02    1.967734e-02    2.254033e-02    5.080666e-03
   14    1.967734e-02    2.254033e-02    2.254033e-02    5.080666e-03
   15   -2.254033e-02    1.549193e-01    1.774597e-01    4.000000e-02
   16   -1.774597e-01   -1.774597e-01    1.219677e+00    3.149193e-01
   17    1.774597e-01   -2.254033e-02    1.549193e-01    4.000000e-02
   18    2.254033e-02    2.254033e-02    1.967734e-02    5.080666e-03
   19   -2.254033e-02    1.774597e-01    1.549193e-01    4.000000e-02
now, my question is: what is principle axis in C3D20 element?
nodenumbering.png
nodenumbering.png (159.66 KiB) Viewed 269 times

i examin it in three state, first no change between them, one for as is in picture and another for axis that i assume, but in those state gives me that error. this is my python script that convert node numbering:

Code: Select all

inpfile = open('/home/ebi/Box_Mesh001.inp', 'r')
line = inpfile.readline()
while not line.startswith("** Volume elements"):
    line = inpfile.readline()
    continue
inpfile.readline()
line = inpfile.readline()

with open('/home/ebi/opensees/openseespy/element.tcl', 'w') as pyfile:
    while not line.startswith('*'):
        try:
            num, *nodes = line.split(',')[:-1]
            line = inpfile.readline()
            nodes2 = line.split(',')[:-1]
            n = nodes + nodes2
            maps = [7, 8, 5, 6, 3, 4, 1, 2, 15, 16, 13, 14, 11, 12, 9, 10, 19, 20, 17, 18]
            node = ''.join(f'{n[i - 1]} ' for i in maps)
#             node = ''.join(f'{i} ' for i in n)
            pyfile.write(f"element 20NodeBrick {num} {node}  1\n")
            line = inpfile.readline()
        except:
            break
User avatar
bernd
Posts: 9779
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby bernd » Sat Feb 29, 2020 10:29 am

have you read FEM_Mesh and FEM_Mesh_CalculiX they may help
User avatar
bernd
Posts: 9779
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby bernd » Sat Feb 29, 2020 10:31 am

kkremitzki wrote:
Fri Feb 28, 2020 11:25 pm
OpenSees' license
The Regents grants permission, without fee and without a written license agreement, for (a) use,
reproduction, modification, and distribution of this software and its documentation by educational,
research, and non-profit entities for noncommercial purposes only;
is not open source because of its non-commercial restriction, failing #6 of The Open Source Definition, "6. No Discrimination Against Fields of Endeavor". It's source-available. With its current license it will never, for example, be able to be distributed in Debian.
Thanks reminding about this!
User avatar
ebrahim raeyat
Posts: 281
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby ebrahim raeyat » Sat Feb 29, 2020 6:17 pm

bernd wrote:
Sat Feb 29, 2020 10:29 am
have you read FEM_Mesh and FEM_Mesh_CalculiX they may help
oops, i mistake this section in convert .inp file to opensees format:

Code: Select all

xyz[-1] = xyz[-1].rstrip("\n")
last coordinate z, have "\n" character, this is now work, i will prepare .tcl and .py file soon.

thanks @bernd
User avatar
ebrahim raeyat
Posts: 281
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: OpenSees, the Open System for Earthquake Engineering Simulation

Postby ebrahim raeyat » Sun Mar 01, 2020 3:34 am

this is my first attempt to visualize 3D cantilever beam with openseespy, it's cool:
3D_cantilever.png
3D_cantilever.png (117.31 KiB) Viewed 219 times