FEAP User Forum

FEAP => Programming => Topic started by: serkuz on January 02, 2017, 05:18:53 AM

Title: Which subroutine/variable contains information about the type of load?
Post by: serkuz on January 02, 2017, 05:18:53 AM
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
Title: Re: Which subroutine/variable contains information about the type of load?
Post by: Prof. R.L. Taylor 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".

Title: Re: Which subroutine/variable contains information about the type of load?
Post by: FEAP_Admin 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.
Title: Re: Which subroutine/variable contains information about the type of load?
Post by: serkuz 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.
Title: Re: Which subroutine/variable contains information about the type of load?
Post by: serkuz 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
Title: Re: Which subroutine/variable contains information about the type of load?
Post by: Prof. S. Govindjee 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.
Title: Re: Which subroutine/variable contains information about the type of load?
Post by: serkuz 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.