FEAP User Forum
FEAP => Programming => Topic started by: YunfeiWang on November 09, 2017, 11:59:13 PM
-
Dear all
I writer an user material model with 96 material parameters. Then I writer the corresponding parameters into the input file(see attachments one). But only
the parameters on the first line of the MATERIAL part are read in the subroutine(see the output file in attachment two). In other words, only the parameters
257915. 99308. 228265. 1. 1. 1. 0. -1. -1. 1. 0. 0. 0. 0. 0. are read in the subroutine while the others are not.
Could you tell me how to solve the problem ?
Thank you very much
Best regards
-
This is not quite the way you should do it. The size of vv( ) is 5.
Under the else block you should be making calls to tinput to read in your
data. I recommend using a polling structure that is insensitive to order and
uses keyword,value pair so that the input file is also readable. But if you want
to do it brute force you can have an input structure like
ucon, yourname
v1 v2 ... v15
v16 ... v30
...
Then in your umatiXX.f use enough lines to read in all your data of the form
call tinput(tx,0,td,15)
ud(1:15) = td
call tinput(tx,0,td,15)
ud(16:30) = td
...
you should declare character*15 tx(1) and real*8 td(15).
-
Here is a simple example of a polling input structure. It uses keyword,value pairs in any order. It continues reading until it finds a blank line. The pairs are CP,# ; CS,# ; AX , where the presence of AX simply flips the value of UD(3).
character*15 text(1)
real*8 td(1),ud(*)
text = 'start'
ud(3) = 0.d0 ! default value for ud(3) flag
do while (.not.pcomp(text,' ',4))
errck = tinput(text,1,td,1)
if (pcomp(text,'cp',2)) then
ud(1) = td(1)
elseif (pcomp(text,'cs',2)) then
ud(2) = td(1)
elseif (pcomp(text,'ax',2)) then
ud(3) = 1
endif
end do
-
Here is a simple example of a polling input structure. It uses keyword,value pairs in any order. It continues reading until it finds a blank line. The pairs are CP,# ; CS,# ; AX , where the presence of AX simply flips the value of UD(3).
character*15 text(1)
real*8 td(1),ud(*)
text = 'start'
ud(3) = 0.d0 ! default value for ud(3) flag
do while (.not.pcomp(text,' ',4))
errck = tinput(text,1,td,1)
if (pcomp(text,'cp',2)) then
ud(1) = td(1)
elseif (pcomp(text,'cs',2)) then
ud(2) = td(1)
elseif (pcomp(text,'ax',2)) then
ud(3) = 1
endif
end do
Dear Prof. S. Govindjee
Please forgive me my lated thankfulness. I saw your answers just now and the question has been solved。
Thank you again
Best regards