Change value according to the results

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
drowning6
Posts: 20
Joined: Tue Nov 15, 2011 6:03 pm
Location: bucea

Change value according to the results

Post by drowning6 »

Dear everyone.

Can I change one value in my model with the result I got from every time step when I apply transient analysis like ground motion?

Thanks for all.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: Change value according to the results

Post by fmk »

yes you could.
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Change value according to the results

Post by mhscott »

If I may elaborate on fmk's correct, yet terse, response ... you can use the 'parameter' and 'updateParameter' commands to do what you ask.
drowning6
Posts: 20
Joined: Tue Nov 15, 2011 6:03 pm
Location: bucea

Re: Change value according to the results

Post by drowning6 »

fmk and mhscott, thank you so much.

If I want to change the elastic modulus of material 16 of element 66, I should set

parameter 1 element 66 material 16 E

And then in the analysis part I set ,
set tFinal 90
set dT 0.005
set ok 0
set currentTime 0

while {$ok==0&&$currentTime<$tFinal} {
set currentTime [getTime]
set EE [expr $AA*$Ec/($Tr*(1+(3*pow(abs($currentDisp),2.0))/(pow($pi,2.0)*pow($rr,2.0))))]
updateParameter 1 EE

set ok [analyze 1 $dT]
}

Can I give the new EE(elastic modulus) to the material 16 of element 66 at every time step?
drowning6
Posts: 20
Joined: Tue Nov 15, 2011 6:03 pm
Location: bucea

Re: Change value according to the results

Post by drowning6 »

And by the way, what I want to change is elastic uniaxial "Material" of zerolength "element".
Is this command still available?

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

Re: Change value according to the results

Post by fmk »

you cannot change the material, only the material property. and did you run the analysis and check that it did indeed change the response before you asked if you can???
drowning6
Posts: 20
Joined: Tue Nov 15, 2011 6:03 pm
Location: bucea

Re: Change value according to the results

Post by drowning6 »

Thanks fmk.
Sorry, I mean the material property.
I can run the analysis successfully now.
The interesting thing is that if I set "parameter 1 element 66 material 16 E", Opensees says "unable to identify the parameter".
However, if I set "parameter 1 element 1 material 1 E", the analysis can run successfully.
Actually, I mean element 66 and element 1 is same element. And material 16 and material are also same.

Maybe if we define the parameter, the material or element must begin from No.1???

Anyway, thanks so much for your reply.

Have a great day.
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Change value according to the results

Post by mhscott »

No, the elements dictate how they interpret the arguments for the parameter command. For a zero length element, the number that comes after material, e.g., ... material 1 ... indicates the first material defined for the element (2 would be the second, and so on). A fiber section in a beam-column element would interpret this as the material tag, but not so for a zero length element.
drowning6
Posts: 20
Joined: Tue Nov 15, 2011 6:03 pm
Location: bucea

Re: Change value according to the results

Post by drowning6 »

Thank you Dr. Scott.

Very interesting.
For example, if I have the following commands.
element zeroLength 56 20 11120 -mat 20 -dir 1
element zeroLength 1 22 11122 -mat 6 -dir 1

The material 6 is the first material defined the zerolength element, is that right?

Thank you for you reply.
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Change value according to the results

Post by mhscott »

Yes, but when you do the parameter command, you will still use 1
drowning6
Posts: 20
Joined: Tue Nov 15, 2011 6:03 pm
Location: bucea

Re: Change value according to the results

Post by drowning6 »

Ok, thank you.
Post Reply