How to get a variable from Section class in a material Class

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

Moderators: silvia, selimgunay, Moderators

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

How to get a variable from Section class in a material Class

Post by linguan118 »

Hi, fmk,
I've got a new 1d material that depends on the neutral axis position in the column section, i.e., stress=f(strain,d1/D), d1 is the depth of the neutral axis, D is the

column section (the envelope stress-strain curve of the new material varies to this variable).

I tried to modify the FiberSection2d Class. I added a variable of the position of the neutral axis of the section (Cdepth) in FiberSection2d Class. And inserted into

the function theMat->setTrial(strain, stress, tangent, Cdepth). Then in the materail, I modified the setTrialstrain and setTrial functions to include Cdepth. I then

built the Opensees.exe. But it failed! It seemed to tell me that i need to modify every setTrialstrain function in all materail Classes.

I don't know if there are other easy ways to achieve what i want. like, a global variable (Cdepth) which can be accessed in both Section and Material classes?

Thank you in advance!
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk
linguan118
Posts: 140
Joined: Sun Oct 03, 2010 11:36 pm
Location: Hong Kong

Re: How to get a variable from Section class in a material C

Post by linguan118 »

No one helps?
Research Assistant Professor, The Hong Kong Polytechnic University
guanlin@polyu.edu.hk
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: How to get a variable from Section class in a material C

Post by fmk »

yes you would and that is not going to happen! i suggest you modify your material to get the na position from the section and put a method in the section class to return it. there may exist a global pointer to current SectionForceDefo, or we can put one in.
Post Reply