Author Topic: Increasing the limit of NURBS entities degree  (Read 9439 times)

resammc

  • Full Member
  • ***
  • Posts: 95
Increasing the limit of NURBS entities degree
« on: April 30, 2019, 06:29:10 AM »
Hello,

I would like to increase the limit for the highest degree possible for a NURBS surface to calculate the tangent matrix.

Currently, it seems like p=7 is the limit (according to shp2d_nurb.f).

As feap is able to calculate the quadrature points for any arbitrary degree, I think one only needs to modify the above routine and qudshp.h to get it working.

I did so by applying the following changes (for p<=10):

Nshp and Mshp dimensions are large enough, so I only changed the if condition:
Code: [Select]
      if(nel.gt.121) then ! maximum: p=10
        write(iow,*) ' Number of nodes on element too large'
        write(ilg,*) ' Number of nodes on element too large'
        if(rank.eq.0) then
          write(*,*) ' Number of nodes on element too large'
        endif
        call plstop(.true.)
      endif

and as for qudshp.h,

Code: [Select]
      real (kind=8) :: sg2      , el2      , shp2
      common /qudshp2/ sg2(3,121), el2(4,121), shp2(3,121,121)


these should suffice for user written elements. But, as I wanted to use the standard Solid 2D - Plane Stress element, I also modified sld2d1.f to increase the dimension of stress arrays.

Unfortunately, when I issue FORM or TANG commands, I get errors (segmentation fault) for p>7. (FORM works up to p=7, TANGent up to p=9)

So, the question is: are the above the only changes needed in order to get the correct tangent matrix? Or I have missed something. (I know that more changes are necessary for plotting stresses/strains, etc., but here my goal is only to have the correct tangent for external uses).

Any help in this regard would be greatly appreciated.

Attached is the input file for p=10 case.

Many thanks and kind regards,

RM

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: Increasing the limit of NURBS entities degree
« Reply #1 on: April 30, 2019, 08:47:54 AM »
I do not know off hand -- I need to do more searching.  However, I think somewhere the shp2 is passed to a routine that expects the second dimension to be 64 -- so it will get bad data from this.  Does the debugger help?

resammc

  • Full Member
  • ***
  • Posts: 95
Re: Increasing the limit of NURBS entities degree
« Reply #2 on: April 30, 2019, 11:00:49 AM »
I checked for all instances of "64" in the code; couldn't find any related ones. I will look more closely for "shp2" itself. Thanks.

Debuggers: both GDB and Valgrind point to modlsd.f (line 77) for the plane stress case (small deformations). But, I don't think this is the source of this problem since when I enable FINIte deformations, I see no segmentation fault errors, but instead all the terms of the tangent matrix are zero.
« Last Edit: April 30, 2019, 11:03:18 AM by resammc »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: Increasing the limit of NURBS entities degree
« Reply #3 on: April 30, 2019, 02:46:54 PM »
It looks like there is one more place you need to change the dimension from 64 to 121.

In the directory ./iga/elements/solids/solid2d.f  change th(64) to th(121).

If you increase any more there are many places that will need changes as dimensions are only 125!

resammc

  • Full Member
  • ***
  • Posts: 95
Re: Increasing the limit of NURBS entities degree
« Reply #4 on: April 30, 2019, 11:19:04 PM »
Thank you very much Professor. It solved the problem of segmentation fault.

Just to check if everything is fine, I added some displacement boundary conditions and tried TANG,,1. It gave no error, but then when I issue the FORM command, the segmentation fault appears again... I checked the generated tangent against a user written element and it seems like some of the (non-diagonal) terms are off by one order of magnitude (they match for lower NURBS degrees).

So, it seems like even more changes are necessary to make it work. At the moment, I will stick to the user element output after doing some further tests (hopefully, the changes in qudshp.h and shp2_nurb.f were the only crucial ones for UELEMs).