new load class and changes to the code

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

Moderators: silvia, selimgunay, Moderators

Post Reply
pankotso
Posts: 20
Joined: Tue Oct 13, 2009 9:46 am
Location: Edinburgh

new load class and changes to the code

Post by pankotso »

Dear fmk,

I have made a new load class that is to be used mainly for truss elements (that cannot carry elemental load). The difference is that this load will have as argument the element and not the node like in nodal load. Then it will get and apply equivalent loads in the two end nodes of the element. The question I have is how to apply this load with making the fewest changes to the existing code? This is if I can take advantage of the existing nodal load class in order to make my class to cooperate with it since my class just creates two nodal loads so I do not have to produce more methods in classes like loadpattern.

Thanks a lot in advance,
Panagiotis, UoE
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

just add the load to the 2 nodes as the NodalLoad class does. you have to make a new load class and update the Truss to deal with this type of elemental load.
pankotso
Posts: 20
Joined: Tue Oct 13, 2009 9:46 am
Location: Edinburgh

Post by pankotso »

Hello fmk, thanks for your reply.

I made this new elemental load class that takes the eleload from the user. Then in the truss element in the add load method it gets the eleload and it makes 2 equivalent nodal loads, after that the nodal load are added to the nodes. My problem is that when i run i see that it is like the add load method is never called. I also checked with opserr method but it did not appear. I would like to ask you if you can think of possible reasons why the add load method is not called.

Thanks a lot in advance,
Panagiotis, UoE
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

are you using the interpreter or a main?

either way invoke Print on the domain to ensure your load is added to the domain.

if it is thre the applyLoad commmand in the ElementalLoad class to ensure that it is called for your load by say aadding opserr << *theElement or something.
pankotso
Posts: 20
Joined: Tue Oct 13, 2009 9:46 am
Location: Edinburgh

Post by pankotso »

Dear fmk, thank you for your quick reply and help to my message. I am using the main as I find it more clear for debugging of the developed code. The previous problem is now resolved. However, I would like to ask if the method for adding the nodal loads (myNodePtr->addUnbalancedLoad(*load,loadFactor); that I also use will work in my case if the load changes according to the material properties? Thank you in advance.

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

Post by fmk »

if you are asking, can modify the load you apply based on material properties .. the answer is yes if your load has a handle on the element and can get the material properties

if you are asking whether you can modify element material properties based on the load, you could again providing you have a handle on the element.
Post Reply