new material

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

Moderators: silvia, selimgunay, Moderators

Post Reply
gst77
Posts: 18
Joined: Sat Nov 28, 2009 9:23 am
Location: UNCuyo

new material

Post by gst77 » Thu Oct 23, 2014 11:50 am

Hi,
I followed the instructions in "Addingyourcode.pdf" to add a new material. I had the .dll file but I have the result: "WARNING could not create unixialMaterial masonryFC"
I'm running a machine with Windows 8, 64bits, and opensees 2.4.4 rev 5774.
I followed the next steps:
1-I have the masonryFC.cpp and masonryFC.h files of the new material.
2-I had the masonryFC.dll library using the files in the folder /developer/cpp and /developer/core

I have read in some posts that I have to modified the "classtag.h" file. I did it, but I don't know where put this file because it is not used in the tutorial.

Thank you very much for your time and help!

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

Re: new material

Post by fmk » Tue Oct 28, 2014 8:31 am

you don't need to edit the classtags file.

are you using 32 or 64 bit and is the revision of the svn code you checked out in agreement with the revision tag of the .exe?

gst77
Posts: 18
Joined: Sat Nov 28, 2009 9:23 am
Location: UNCuyo

Re: new material

Post by gst77 » Sat Nov 01, 2014 6:43 am

Thank you Frank! I have my material running now!!!

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Tue Dec 09, 2014 8:44 am

Hello
i want to improve a material in opensees , first i have used your practice that name is ElasticPPcpp for, what do i need to learn? eventually i could make dll file and i have checked the output with your output and it is good output reasonably.second i have tried to change the name if uniaxialmaterial ECC01 to ECC02 for chek output with my output of ECC01 but i couldn't.
i will be grateful if you help me ,where is/are my mistake's?

best regards

shokri

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

Re: new material

Post by fmk » Tue Dec 09, 2014 10:17 am

if ECC01 works and ECC02 does not .. you either have not replaced ECC01 with ECC02 evrywhere or you have not created a DLL with the correct name

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Tue Dec 09, 2014 12:57 pm

thank you for your answer and i have cheked 2 points that you sayed,and i have replaced ECC01 to ECC02 evrywhere and also i have created DLL file.
I run program and my *.tcl file's connect with dll file's but when i use one of output , for example strain stress recorder , my output when i check with ECC01 , i can't get same answer.
thank you for your attention

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

Re: new material

Post by fmk » Wed Dec 17, 2014 9:21 am

either the files are not the same, or the optimization settings are different and as a consequence the code generated may be different. are differences large or small.

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Sun Jan 11, 2015 4:11 am

Dear fmk
thank you,i could make Dll file,and it works right.another question is,how can i make Dll or exe file with fortran code,do you have useful files for it?

i will be grateful if you help me.
best

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Tue Feb 03, 2015 11:03 pm

which functin can i introduce the parameters that use in all of function?

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Fri May 08, 2015 4:08 am

Dear fmk
why in command prompt window showes material failed in setTerialStrain() when i use new material that i added with Dll file?
where are mistakes?
and which function can show amount of special parameter in command prompt? for example i introduce parameter R, and i want amount of it in each level of analysis.
tanks

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

Re: new material

Post by fmk » Mon May 11, 2015 8:55 am

if it is failing there at least it is seeing your material. i suggest you debug the code of yours by putting in some output stamenets when it gets into your method to see what is going on.

if you have a variable R defined in your material, fill in the setResponse/getResponse methods and you can access it in your scripts or in a recorder.

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Tue May 12, 2015 3:57 pm

Dear fmk
i want useful example of debug code and setResponse/getResponse method,can you give me some of them?
and is it a way that connet opensees with matlab code in adding new material? i have matlab code and it is work correctly.
thanx

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

Re: new material

Post by fmk » Mon May 18, 2015 8:52 am

you cannot add matlab elements or materials to OpenSees.

look at the UnixaialMaterial class for how to implement the setResponse and getResponse methods

shokri
Posts: 10
Joined: Sun Sep 21, 2014 11:12 pm
Location: azad university of qazvin

Re: new material

Post by shokri » Fri Jun 05, 2015 9:14 pm

Dear Fmk
how can i input parameters with initial data that in frist trying for SetTrailStrain function,Considered this input but after that do not this data?
i guess something but i want be confident.
best regards

Post Reply