problem in Using opensees with C++

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

Moderators: silvia, selimgunay, Moderators

Post Reply
epsilon
Posts: 7
Joined: Sat Aug 26, 2017 5:44 am
Location: NA

problem in Using opensees with C++

Post by epsilon » Tue Nov 07, 2017 9:26 am

Hello,
I'm trying to model a single ShellDKGQ file with c++, here is my code:
https://gist.github.com/epsi1on/9a671b8 ... 86602691b5
My problem is after solve i do get zero displacement on nodes and loads stays unbalanced (output from above code):
https://gist.github.com/epsi1on/b2ff22c ... 4138fc2874
Do you know how i can properly use it?

Thanks

yekose
Posts: 50
Joined: Thu May 15, 2008 5:46 am
Location: Turkey

Re: problem in Using opensees with C++

Post by yekose » Tue Nov 07, 2017 9:16 pm

I am not really sure but try to use the nodes as follows,

Node *node1 = new Node(1, 6, ix, iy, iz);
Node *node2 = new Node(2, 6, jx, jy, jz);
Node *node3 = new Node(3, 6, kx, ky, kz);
Node *node4 = new Node(4, 6, lx, ly, lz);

with 5 parameters not 6.

epsilon
Posts: 7
Joined: Sat Aug 26, 2017 5:44 am
Location: NA

Re: problem in Using opensees with C++

Post by epsilon » Wed Nov 08, 2017 10:56 pm

yekose wrote:
> I am not really sure but try to use the nodes as follows,
>
> Node *node1 = new Node(1, 6, ix, iy, iz);
> Node *node2 = new Node(2, 6, jx, jy, jz);
> Node *node3 = new Node(3, 6, kx, ky, kz);
> Node *node4 = new Node(4, 6, lx, ly, lz);
>
> with 5 parameters not 6.
Hi,
Thanks, i was using this code (one extra 0 after coordinates)

Node *node1 = new Node(1, 6, 0.0, 0.0, 0.0, 0);

I've fixed it and edited code above with changes, but still same result.

epsilon
Posts: 7
Joined: Sat Aug 26, 2017 5:44 am
Location: NA

Re: problem in Using opensees with C++

Post by epsilon » Wed Nov 08, 2017 11:07 pm

I've found the problem. I was applying nodal load to a fixed node :).
This is correct code and correct output:
https://gist.github.com/epsi1on/388230f ... 83a9bc4be1
https://gist.github.com/epsi1on/2128fd5 ... fbed747425
Thanks anyways...

Post Reply