Author Topic: Which subroutine/variable contains information about the type of load?  (Read 5969 times)

serkuz

  • Jr. Member
  • **
  • Posts: 26
Dear Prof. Taylor, dear FEAP community,

For my algorithm one must be able to distinguish between the load types (e.g. FORCe or DISPlacement) and I would like to know where in the program this information is stored.

Best Regards
serkuz
« Last Edit: January 02, 2017, 08:14:28 AM by serkuz »

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2649
Re: Which subroutine/variable contains information about the type of load?
« Reply #1 on: January 02, 2017, 09:34:07 AM »
Nodal values of forces FORCe and displacements DISPl are stored in the array "F": f(ndf,numnp,2) --> 1 = force; 2= displacements. 

However, these are not used directly as they need to be multiplied by the proportional load.    You can look in pmacr1.f and follow what happens with the call to "pload".


FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: Which subroutine/variable contains information about the type of load?
« Reply #2 on: January 02, 2017, 09:44:58 AM »
To tell what type of condition is set look at ID(ndf,numnp,2) == mr(np(31)+nneq).

For example, for degree of freedom 3 at node 10, ID(3,10,2) .eq. 0 means a force boundary condition, ID(3,10,2) .ne. 0 means a displacement boundary condition.
« Last Edit: January 02, 2017, 11:39:53 AM by FEAP_Admin »

serkuz

  • Jr. Member
  • **
  • Posts: 26
Re: Which subroutine/variable contains information about the type of load?
« Reply #3 on: January 03, 2017, 05:21:08 AM »
Nodal values of forces FORCe and displacements DISPl are stored in the array "F": f(ndf,numnp,2) --> 1 = force; 2= displacements.

However, these are not used directly as they need to be multiplied by the proportional load. You can look in pmacr1.f and follow what happens with the call to "pload".
Thank you very much Professor Taylor.

serkuz

  • Jr. Member
  • **
  • Posts: 26
Re: Which subroutine/variable contains information about the type of load?
« Reply #4 on: January 03, 2017, 05:34:04 AM »
To tell what type of condition is set look at ID(ndf,numnp,2) == mr(np(31)+nneq).

For example, for degree of freedom 3 at node 10, ID(3,10,2) .eq. 0 means a force boundary condition, ID(3,10,2) .ne. 0 means a displacement boundary condition.
Thank you very much, this is exactly what I'm looking for.

I wrote the following code:
Code: [Select]
...
      integer    id(ndf,numnp,2)
...
      id(ndf,numnp,2) = mr(np(31)+nneq)
...
open(unit = ios, file = "test.txt")
        write(ios,*) id(2,1,2)
close(ios)
...
However, at node 1, is the clamping and the code gives me a zero value, so the value should be non-zero.
Have I misunderstood your post or wrongly coded?

Thanks in advance.

Best regards
serkuz

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1165
Re: Which subroutine/variable contains information about the type of load?
« Reply #5 on: January 03, 2017, 07:07:56 AM »
You have misunderstood.
mr(np(31)+nneq) is the same location in memory as id(1,1,2).  Thus a normal way to access id would be

Code: [Select]
include 'comblk.h'
include 'sdata.h'
call suba(mr(np(31)+nneq)

then

Code: [Select]
subroutine suba(id)
include 'sdata.h'
integer id(ndf,*)

at this stage inside subroutine suba you have access to ID.  The other way to access ID would be to directly index into MR( ) at location
np(31)+nneq and beyond, which is not advised.

serkuz

  • Jr. Member
  • **
  • Posts: 26
Re: Which subroutine/variable contains information about the type of load?
« Reply #6 on: February 01, 2017, 12:56:59 PM »
You have misunderstood.
mr(np(31)+nneq) is the same location in memory as id(1,1,2).  Thus a normal way to access id would be

Code: [Select]
include 'comblk.h'
include 'sdata.h'
call suba(mr(np(31)+nneq)

then

Code: [Select]
subroutine suba(id)
include 'sdata.h'
integer id(ndf,*)

at this stage inside subroutine suba you have access to ID.  The other way to access ID would be to directly index into MR( ) at location
np(31)+nneq and beyond, which is not advised.
Sorry for last answer. Thank you very much Prof. S. Govindjee.