Author Topic: why ul(ndf,nen,j) is always zero  (Read 4963 times)

Shuai Wang

  • Jr. Member
  • **
  • Posts: 23
why ul(ndf,nen,j) is always zero
« on: January 30, 2015, 07:48:02 AM »
I am programming a subroutine for a model. 

the model is like this : each node have 3 unknown parameters. As the feap manual metions, I can call each DOF of a node by this function

ul(ndf,nen)  , for example ul(2,1) is the displacement of the 1node in 2 direction.

but when I did this, the value of ul is always zero . what's wrong with my programme?
 
do j1=1,8
                       do i1=1,3
                        dis(i1)= dis(i1) + shp(4,j1)*ul(i1,j1)
                        enddo
                        enddo
                         write(iow,5000) (ul(1,i1),i1=1,8)
5000    format(' ul x',/,
     &' ux    = ',8e12.4)

and in the output file:

ul x
 ux    =   0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00

Shuai Wang

  • Jr. Member
  • **
  • Posts: 23
Re: why ul(ndf,nen,j) is always zero
« Reply #1 on: January 30, 2015, 08:21:23 AM »
 E d g e    N o d a l    V a l u e

    Node     1-Displ     2-Displ     3-Displ
       2  5.0000E+00  0.0000E+00  0.0000E+00
       4  5.0000E+00  0.0000E+00  0.0000E+00
       6  5.0000E+00  0.0000E+00  0.0000E+00
       8  5.0000E+00  0.0000E+00  0.0000E+00

          Material    Element Tag   Element Type  History Terms  Element Terms
              1              1              2              0              0
 shape function
 shp    =   0.1314E+00  0.3522E-01  0.9437E-02  0.3522E-01  0.4906E+00  0.1314E+00  0.3522E-01  0.1314E+00
 ul x
 ux    =   0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00  0.0000E+00

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: why ul(ndf,nen,j) is always zero
« Reply #2 on: January 30, 2015, 09:48:45 AM »
I assume you are writing a user element?  You should look at using the print utilities for feap (mprint and iprint) which allow you to output arrays or parts of arrays.

It is hard to tell what is wrong from your description.  Of course at the beginning of any analysis the "ul" array should be zero.  After a solution (i.e., if you put DISP ALL in your solution program) you should get non-zero solution variables.  Then if you output the "ul" array properly in and element routine (i.e., elmt01.f) it should be non-zero.  You also need to see if the shape functions are zero or not.

Shuai Wang

  • Jr. Member
  • **
  • Posts: 23
Re: why ul(ndf,nen,j) is always zero
« Reply #3 on: February 09, 2015, 06:47:18 AM »
 :)
Thanks for your reply.
Yes, as you explained, I checked the shape function, it is not zero value.
The reason is that ul was first initialed as yero value.
Sorry for my mistake.