Adding new material

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

Moderators: silvia, selimgunay, Moderators

Post Reply
JOSELUISEM
Posts: 11
Joined: Fri Oct 18, 2013 9:36 am
Location: Unam

Adding new material

Post by JOSELUISEM » Tue May 13, 2014 10:09 am

Hi, everyone,
I been successfully following the "Implementing Your Own Material in OpenSees" tutorial. Now as second step, I've decided just to try modifying only the name of a copy of the steel01 material but I'm missing something, this is what I done:

1.- a change of all variables and files in (Steel01.h, Steel01 .cpp) to (trialMat01.h trialMat01.cpp)
2.- an addition of "#define MAT_TAG_trialMat01 76" in classTags.h
3.- I get the trialMat01.dll file like in the tutorial without warnings
4.- Also I've checked "virtual int setTrialStrain (double strain, double strainRate =0) =0;" in uniaxialmaterial.h

I'm using OpenSees 2.4.4 rev 5755, VS 2010 and win7. Also I've tried it in OpenSees 2.4.4 rev 5755, win8 and VS 2013 with the same results:
"WARNING could not create unixialMaterial trialMat01"

Which is the right way to do this? Thank you for your valuable time,

JOSELUISEM
Posts: 11
Joined: Fri Oct 18, 2013 9:36 am
Location: Unam

Re: Adding new material

Post by JOSELUISEM » Tue May 13, 2014 11:26 am

NOW IT'S DONE TY.

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

Re: Adding new material

Post by fmk » Tue May 13, 2014 1:49 pm

did you sort out your own problem?

JOSELUISEM
Posts: 11
Joined: Fri Oct 18, 2013 9:36 am
Location: Unam

Re: Adding new material

Post by JOSELUISEM » Wed May 14, 2014 9:17 am

yes, your tutorials are very useful. Thank you

shehuiren
Posts: 4
Joined: Wed Sep 04, 2013 5:59 pm
Location: 兰州

Re: Adding new material

Post by shehuiren » Thu Jul 10, 2014 8:03 pm

JOSELUISEM wrote:
> Hi, everyone,
> I been successfully following the "Implementing Your Own Material in
> OpenSees" tutorial. Now as second step, I've decided just to try
> modifying only the name of a copy of the steel01 material but I'm missing
> something, this is what I done:
>
> 1.- a change of all variables and files in (Steel01.h, Steel01 .cpp) to
> (trialMat01.h trialMat01.cpp)
> 2.- an addition of "#define MAT_TAG_trialMat01 76" in classTags.h
> 3.- I get the trialMat01.dll file like in the tutorial without warnings
> 4.- Also I've checked "virtual int setTrialStrain (double strain,
> double strainRate =0) =0;" in uniaxialmaterial.h
>
> I'm using OpenSees 2.4.4 rev 5755, VS 2010 and win7. Also I've tried it in
> OpenSees 2.4.4 rev 5755, win8 and VS 2013 with the same results:
> "WARNING could not create unixialMaterial trialMat01"
>
> Which is the right way to do this? Thank you for your valuable time,

hi ,
Could you please give me "Implementing Your Own Material in OpenSees"tutorial.
thank you ,@ 270841567@qq.com

shehuiren
Posts: 4
Joined: Wed Sep 04, 2013 5:59 pm
Location: 兰州

Re: Adding new material

Post by shehuiren » Sun Jul 13, 2014 4:15 am

wrote:
> did you sort out your own problem?
hi ,fmk
Could you please give me "Implementing Your Own Material in OpenSees"tutorial.
thank you ,@ 270841567@qq.com

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

Re: Adding new material

Post by fmk » Wed Jul 16, 2014 9:04 am


mtsonicc
Posts: 55
Joined: Wed Mar 14, 2012 6:27 pm
Location: Hanyang University

Re: Adding new material

Post by mtsonicc » Mon Sep 29, 2014 3:55 am

I'm having exactly the same problem.

I also get the trialMat01.dll file like in the tutorial without warnings.
but I get this message also: "WARNING could not create unixialMaterial trialMat01"

How did you solve this problem?
does anyone know how?

I'm so desperate to see the answer.

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

Re: Adding new material

Post by fmk » Mon Oct 06, 2014 9:43 am

are you using the 32 bit version of the .exe

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

Re: Adding new material

Post by shokri » Mon Mar 09, 2015 3:36 am

Hi fmk
i made new material with dll , but when i use this code,the matrial dosen't fail but i can't plot stress-strain because the stress equals zero.
i used your tutorials.
where is my problem? where is in my code i have mistake?
i will be grateful if you help me.

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

Re: Adding new material

Post by fmk » Mon Mar 09, 2015 7:54 am

in your code put some debugging statements, e.g. before the return from setTrialStress() or getStress() put a debug satement such as:
opserr << "trailStress: " << tStress << endln;

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

Re: Adding new material

Post by shokri » Mon Mar 09, 2015 12:05 pm

Dear fmk
thank you for your attention
i used this debugging statements but my problem didn't solve and in command prompt shows Tstress:0 in each strain.

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

Re: Adding new material

Post by fmk » Wed Mar 11, 2015 3:50 pm

well in the setTrialStrain method put something similar that outputs the strain and the stress at end of routine. if strain not 0 and stress 0 the problem lies obviosuly in the method. if it is always 0 it means either your script is garbage.

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

Re: Adding new material

Post by shokri » Thu Mar 12, 2015 7:50 pm

Dear fmk
explain obviously this line in previous command:
"in the setTrialStrain method put something similar that outputs the strain and the stress at end of routine",which codes shall i put? i khnow just one code that you said for getStress().and when i put this code in getStress(),and in getStrain() the strain was not 0 but stress was 0.
and when i put this one again in setTrailStrain no strain and stress i can't capture,what's wrong in setTrailStrain?

Post Reply