Dear all,
I have a material model that reads data from a file that denotes a respective Youngs Modulus to each element in the model.
I am currently doing this within the umatl routine, where I write the values to the history variable as follows:
if(isw.eq.14) then
! Initialise history variable values in hn(*)
! Read element densities
open (unit=io, file=file_name)
do i = 1,numel
read(io,*) temp ! decimal [0:1]
if (i.eq.n_el) then
hn(i) = temp*ud(1) ! multiply by Youngs Modulus constant
exit
endif
enddo
close(io)
else
! Compute and output stress (sig) and tangent moduli (dd)
... ! calculation using hn(n_el)
endif
However, this method requires opening the file and reading the contents for every element up until the current element number (n_el). Additionally, this occurs for every node of the element.
I would like to be able to read the file the whole way through just once and assign the values to the history variables.
From what I've seen in other forum posts this should be done in isw=1. However, I assign the size of history variable arrays in the umati routine (which is isw=1), therefore it wouldn't be possible to do this there.
Any advice on this matter would be greatly appreciated. I have attached the umatl file for context.
Thank you,
Elliot