How to add a new material model into OpenSees?

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

suweiai
Posts: 6
Joined: Fri Aug 13, 2010 1:39 am

How to add a new material model into OpenSees?

Post by suweiai »

First, I want to thank you for your attention. My question is how to add a new mterial model into the OpenSees program. Now, I have finished the new code of the new model, it means that the *.h and *.cpp are already finished. I know put these two files into ...\OpenSees\SRC\material\uniaxial. But, I don't know what to do in the next procedure. Some people suggest to use TclBuilder, but how to do? I hope some experts can tell us the procedure clearly. Thanks a lot! Any reply is appreciated.
yaqiang.jiang
Posts: 25
Joined: Mon Sep 21, 2009 1:59 am
Location: UoE

Re: How to add a new material model into OpenSees?

Post by yaqiang.jiang »

[quote="suweiai"]First, I want to thank you for your attention. My question is how to add a new mterial model into the OpenSees program. Now, I have finished the new code of the new model, it means that the *.h and *.cpp are already finished. I know put these two files into ...\OpenSees\SRC\material\uniaxial. But, I don't know what to do in the next procedure. Some people suggest to use TclBuilder, but how to do? I hope some experts can tell us the procedure clearly. Thanks a lot! Any reply is appreciated.[/quote]

this article may help:
Frank McKenna.OpenSees Dynamic API.
suweiai
Posts: 6
Joined: Fri Aug 13, 2010 1:39 am

Re: How to add a new material model into OpenSees?

Post by suweiai »

Oh, I know, thank you very much. If I can solve this problem, I will share this with everyone. :D
suweiai
Posts: 6
Joined: Fri Aug 13, 2010 1:39 am

Post by suweiai »

Dear Yaqiang.jiang:
I have read the article <Frank Mckenna. OpenSees Dynamic API>. In this article, it seems that we could add a new material model into OpenSees by building a Dll. But I still have quetions:1. In this article, it give us a proedure OPS_ElasticPPcpp, is it enough? If we make a proedure like that in our *.cpp file, is it enough for us to add the new material? 2. If the change of the *.cpp is enough, what do we do next? Do we should follow the method of building a Dll file to make a Dll or do other things? Do you or other people ever add a new material model into the OpenSees successfully? If so, I will be very grateful to ask you to give us a detailed operation.In the end,thank you very much again and any reply is appreciated. :)
yaqiang.jiang
Posts: 25
Joined: Mon Sep 21, 2009 1:59 am
Location: UoE

Post by yaqiang.jiang »

[quote="suweiai"]Dear Yaqiang.jiang:
I have read the article <Frank Mckenna. OpenSees Dynamic API>. In this article, it seems that we could add a new material model into OpenSees by building a Dll. But I still have quetions:1. In this article, it give us a proedure OPS_ElasticPPcpp, is it enough? If we make a proedure like that in our *.cpp file, is it enough for us to add the new material? 2. If the change of the *.cpp is enough, what do we do next? Do we should follow the method of building a Dll file to make a Dll or do other things? Do you or other people ever add a new material model into the OpenSees successfully? If so, I will be very grateful to ask you to give us a detailed operation.In the end,thank you very much again and any reply is appreciated. :)[/quote]

I haven't tried to add a new material into OpenSees.Seems you need Frank's help. good luck
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

i am working on the doc.

[url]
http://opensees.berkeley.edu/wiki/index ... _Developer
[/url]

the tarball contains the example code and a file lsiting the steps needed to build a windows dll.
suweiai
Posts: 6
Joined: Fri Aug 13, 2010 1:39 am

Post by suweiai »

Thank you very much. Following your methods, I have made the right DLL and it works well. So ,if anyone who want to add a new materail model into the Opensees, please read the papers above. At last, thank Fmk again!
fanwei85
Posts: 1
Joined: Thu Jul 24, 2008 11:23 pm
Location: Changsha City, China

about add new material

Post by fanwei85 »

[quote="suweiai"]Thank you very much. Following your methods, I have made the right DLL and it works well. So ,if anyone who want to add a new materail model into the Opensees, please read the papers above. At last, thank Fmk again![/quote]

Dear suweiai

Hello,suweiai. Following fmk steps, I have made the DLL. But I don't know to test the DLL in OpenSees (about Step 24 to 26). If possible, please give a suggestion about it. Thank you! My email: fanwei85@126.com

Thank you again.

Wei FAN
linguan118
Posts: 140
Joined: Sun Oct 03, 2010 11:36 pm
Location: Hong Kong

Post by linguan118 »

[quote="fmk"]i am working on the doc.

[url]
http://opensees.berkeley.edu/wiki/index ... _Developer
[/url]

the tarball contains the example code and a file lsiting the steps needed to build a windows dll.[/quote]
Dear FMK, the link has no files? Would you please have a look?
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

the link is in the section
Adding New Components to the Framework

[url]
http://OpenSees.berkeley.edu/OpenSees/c ... per.tar.gz
[/url]
AnggaSetiawan
Posts: 15
Joined: Tue Apr 07, 2015 10:17 pm
Location: Kyoto University

Re: How to add a new material model into OpenSees?

Post by AnggaSetiawan »

Dear FMK

I have tried make the compiler file of ElasticPPcpp.dll from your example with VisualStudio2013, but when I implemented the ElasticPPcpp in the example1.tcl did not work ("WARNING could not create uniaxialMaterial ElasticPPcpp. Do you know the reason of this problem

Thank you
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: How to add a new material model into OpenSees?

Post by fmk »

i have just putout a new release and tested it with the code in the DEVELOPER directory .. it does work with the examples provided. you will need to download the latest .exe and the latest svn code.

when building for 64, in the build .. configuration settings .. make sure the platform is x64 .. if not you need to in the platform box, create new one, it will probably default to x64 and rebuild.
AnggaSetiawan
Posts: 15
Joined: Tue Apr 07, 2015 10:17 pm
Location: Kyoto University

Re: How to add a new material model into OpenSees?

Post by AnggaSetiawan »

Dear FMK

Thank you for the suggestion.
quote "you will need to download the latest .exe and the latest svn code." --> do you mean the newest opensees.exe?, I have tried open this link but not work "svn://opensees.berkeley.edu/usr/local/svn/OpenSees/trunk/DEVELOPER"

best regards
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: How to add a new material model into OpenSees?

Post by fmk »

switch opensees with peera .. i have updated that webpage to show new link

svn://peera.berkeley.edu:/usr/local/svn/OpenSees/trunk/DEVELOPER
AnggaSetiawan
Posts: 15
Joined: Tue Apr 07, 2015 10:17 pm
Location: Kyoto University

Re: How to add a new material model into OpenSees?

Post by AnggaSetiawan »

Dear FMK

Thank you for suggestion
I have tried to open your link "svn://peera.berkeley.edu:/usr/local/svn/OpenSees/trunk/DEVELOPER", but we get information from TrotoiseSVN app "Unable to connect to a repository at URL". Is any instruction to download the SVN update?

Best Regards
Post Reply