Update

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

Moderators: silvia, selimgunay, Moderators

Post Reply
Jhno
Posts: 214
Joined: Sat May 05, 2012 2:55 pm
Location: Laval

Update

Post by Jhno »

Hi,
is there a way to update particular values of material? Example, I use the Drucker-Prager material, the command is as follow :
nDMaterial DruckerPrager $matTag $k $G $sigmaY $rho $rhoBar $Kinf $Ko $delta1 $delta2 $H $theta $density
Then, during analysis, I want to change the value of k to.. say 2*k.
I guess I could remove element $eleTag with the assigned material ... then remake the element... then define a new material. This process is time consuming and frustrating especially when you have alot of elements! Is there a way around this? Thanks.
selimgunay
Posts: 916
Joined: Mon Sep 09, 2013 8:50 pm
Location: University of California, Berkeley

Re: Update

Post by selimgunay »

I don't think there is a shortcut to do this other than the way that you described. There are some hybrid simulation studies that update the materials and elements in OpenSees during the simulation, but I believe those are not implemented in the standard version. If interested, I can refer to a paper and you can contact the author
rafal
Posts: 51
Joined: Sun Feb 22, 2015 5:58 am

Re: Update

Post by rafal »

You can use 'parameter' and 'updateParameter' OpenSees commands. See the docs for the syntax. You can use this approach when the materials of interests have setParameter method in cpp source files.


From OpenSees/SRC/material/nD/UWmaterials/DruckerPrager.cpp
we have:

-----------------------------------------------------------------------------
....
int DruckerPrager::setParameter(const char **argv, int argc, Parameter &param)
{
if (strcmp(argv[0],"materialState") == 0) {
// switch elastic/plastic state
return param.addObject(5,this);
} else if (strcmp(argv[0],"frictionalStrength") == 0) {
// update rho parameter
return param.addObject(7,this);
} else if (strcmp(argv[0],"nonassociativeTerm") == 0) {
// update nonassociative rho_bar parameter
return param.addObject(8,this);
} else if (strcmp(argv[0],"cohesiveIntercept") == 0) {
// update zero confinement yield strength
return param.addObject(9,this);
} else if (strcmp(argv[0],"shearModulus") == 0) {
// update shear modulus
return param.addObject(10,this);
} else if (strcmp(argv[0],"bulkModulus") == 0) {
// update bulk modulus
return param.addObject(11,this);
} else if (strcmp(argv[0],"updateMaterialStage") == 0) {
return -1;
} else {
// invalid parameter type
opserr << "WARNING: invalid parameter command for DruckerPrager nDMaterial with tag: " << this->getTag() << endln;
return -1;
}
...
-------------------------------

It means you can set parameter and then update it. Look at the examples here:

http://opensees.berkeley.edu/wiki/index ... oil_Column

HTH
Jhno
Posts: 214
Joined: Sat May 05, 2012 2:55 pm
Location: Laval

Re: Update

Post by Jhno »

Thanks for the info!
Post Reply