FEAP User Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
FEAP Version 8.6.1n released: February 14, 2022
Home
Help
Search
FEAPwiki
Login
Register
FEAP User Forum
»
FEAP
»
Programming
»
get element num/id in the user element subroutine
« previous
next »
Print
Pages: [
1
]
Author
Topic: get element num/id in the user element subroutine (Read 2874 times)
ace21
Jr. Member
Posts: 27
get element num/id in the user element subroutine
«
on:
September 01, 2015, 11:38:57 AM »
Dear Feap community
I wanted to know is it possible to get the element number/id in feap user element routine. I want to use the element id to retrieve its material properties ( the element id will then be argument for an array defined as common block containing material properties e.g property(number of elements) ) b/c in my problem the material properties are different for every element ( heterogeneous case)
Or there is some other way to do this task
I am using feap version 8.2
thanks
Logged
K.Li
Full Member
Posts: 191
Re: get element num/id in the user element subroutine
«
Reply #1 on:
September 01, 2015, 11:44:22 AM »
I assume your material subroutine is called at every Gauss point. The current element number is defined as integer n and it is saved in eldata.h.
So if you include eldata.h in your subroutine, n will be the current element.
Logged
Prof. R.L. Taylor
Administrator
FEAP Guru
Posts: 2649
Re: get element num/id in the user element subroutine
«
Reply #2 on:
September 02, 2015, 06:00:58 AM »
An alternative to you managing the storage for the material properties is to let feap use "history variables" to store your parameters. See the programer manual on use. Use the "nh3" storage as it does not change with time increments. Allocate what you need under isw = 1 and set the values when isw = 14. Then you can extract for all the other isw values. Feap will set the values for each element individually in the array hr(nh3+0:numnh3) which is passed with the include 'hdata.h'
Logged
ace21
Jr. Member
Posts: 27
Re: get element num/id in the user element subroutine
«
Reply #3 on:
September 03, 2015, 01:55:59 AM »
Thanks K.Li and Prof Taylor for the useful suggestions
Logged
Print
Pages: [
1
]
« previous
next »
FEAP User Forum
»
FEAP
»
Programming
»
get element num/id in the user element subroutine