Asmita1994
Materials
- Nov 7, 2019
- 2
I am writing UEXPAN subroutine in ABAQUS 2017 to calculate thermal strain increment in my domain for powder bed electron beam additive manufacturing. This is how my subroutine looks:
subroutine uexpan(expan,dexpandt,temp,time,dtime,predef,dpred,
1 statev,cmname,nstatv,noel)
c
include 'aba_param.inc'
c
character*80 cmname
C
dimension expan(*),dexpandt(*),temp(2),time(2),predef(*),
1 dpred(*),statev(nstatv)
c
integer, parameter:: AlphaLen = 13
double precision, parameter :: AlphainstTempMap(13)= (/
1 296.,
2 533.,
3 589.,
4 700.,
5 755.,
6 811.,
7 933.,
8 1073.,
9 1098.,
$ 1123.,
1 1877.,
2 1882.,
3 1973. /)
C
double precision, parameter :: AlphainstTempDep(13)= (/
1 0.0000088,
2 0.0000099,
3 0.0000100,
4 0.0000107,
5 0.0000111,
6 0.0000112,
7 0.0000117,
8 0.0000122,
9 0.0000123,
$ 0.0000124,
1 0.0000124,
2 0.0,
3 0.0 /)
double precision Alphainst, Temp_Initial, Temp_ref, thermal
call getvrm('TEMP',array,jarray,flgray,jrcd,
$ jmac, jmtyp, matlayo, laccflg)
temp = array(1)
thermal= STATEV(1)
i = 1
IF (cmname.EQ."Ti64two") THEN
Temp_Initial = 533
Temp_ref = 533
if (temp.le.296) then
Alphainst = 0.0000088
elseif (PowderRatio.EQ.1) then
Alphainst = 0
elseif (temp.ge.1973) then
Alphainst = 0
endif
else
do while (i.le.AlphaLen)
i= i+1
if (temp <= AlphainstTempMap(i+1) ) then
Alphainst = AlphainstTempDep(i-1) +(AlphainstTempDep(i)
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
$ / (AlphainstTempMap(i)- AlphainstTempMap(i-1))
expan(1)= Alphainst * (TEMP(1)-Temp_ref)+ thermal
thermal= expan(1)
exit
endif
enddo
endif
return
end
But I am getting the following errors while compiling my Fortran code:
2layernew.f(322): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: , )
Alphainst = AlphainstTempDep(i-1) +(AlphainstTempDep(i)
---------------------------------------------------------------------------^
2layernew.f(323): error #5276: Unbalanced parentheses
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
-----------------------------------------------^
2layernew.f(323): error #5276: Unbalanced parentheses
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
-------------------------------------------------------------------------------^
2layernew.f(323): error #5082: Syntax error, found '-' when expecting one of: => = . [ % ( :
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
------------------------^
2layernew.f(323): error #5082: Syntax error, found '*' when expecting one of: => = . [ % (
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
-------------------------------------------------^
2layernew.f(324): error #5082: Syntax error, found '/' when expecting one of: => = . [ % ( :
$ / (AlphainstTempMap(i)- AlphainstTempMap(i-1))
----------------^
2layernew.f(303): error #6410: This name has not been declared as an array or a function. [ARRAY]
temp = array(1)
-------------^
2layernew.f(310): error #6512: A scalar-valued expression is required in this context.
if (temp.le.296) then
--------------------^
2layernew.f(315): error #6512: A scalar-valued expression is required in this context.
elseif (temp.ge.1973) then
--------------------^
2layernew.f(321): error #6512: A scalar-valued expression is required in this context.
if (temp <= AlphainstTempMap(i+1) ) then
-----------------------^
2layernew.f(323): error #8524: The syntax of this data pointer assignment is incorrect: either 'bound spec' or 'bound remapping' is expected in this context.
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
------------------------^
2layernew.f(323): error #6410: This name has not been declared as an array or a function. [$]
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
---------^
2layernew.f(324): error #6678: When the target is an expression it must deliver a pointer result.
$ / (AlphainstTempMap(i)- AlphainstTempMap(i-1))
--------------------------------------^
Please help me.
subroutine uexpan(expan,dexpandt,temp,time,dtime,predef,dpred,
1 statev,cmname,nstatv,noel)
c
include 'aba_param.inc'
c
character*80 cmname
C
dimension expan(*),dexpandt(*),temp(2),time(2),predef(*),
1 dpred(*),statev(nstatv)
c
integer, parameter:: AlphaLen = 13
double precision, parameter :: AlphainstTempMap(13)= (/
1 296.,
2 533.,
3 589.,
4 700.,
5 755.,
6 811.,
7 933.,
8 1073.,
9 1098.,
$ 1123.,
1 1877.,
2 1882.,
3 1973. /)
C
double precision, parameter :: AlphainstTempDep(13)= (/
1 0.0000088,
2 0.0000099,
3 0.0000100,
4 0.0000107,
5 0.0000111,
6 0.0000112,
7 0.0000117,
8 0.0000122,
9 0.0000123,
$ 0.0000124,
1 0.0000124,
2 0.0,
3 0.0 /)
double precision Alphainst, Temp_Initial, Temp_ref, thermal
call getvrm('TEMP',array,jarray,flgray,jrcd,
$ jmac, jmtyp, matlayo, laccflg)
temp = array(1)
thermal= STATEV(1)
i = 1
IF (cmname.EQ."Ti64two") THEN
Temp_Initial = 533
Temp_ref = 533
if (temp.le.296) then
Alphainst = 0.0000088
elseif (PowderRatio.EQ.1) then
Alphainst = 0
elseif (temp.ge.1973) then
Alphainst = 0
endif
else
do while (i.le.AlphaLen)
i= i+1
if (temp <= AlphainstTempMap(i+1) ) then
Alphainst = AlphainstTempDep(i-1) +(AlphainstTempDep(i)
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
$ / (AlphainstTempMap(i)- AlphainstTempMap(i-1))
expan(1)= Alphainst * (TEMP(1)-Temp_ref)+ thermal
thermal= expan(1)
exit
endif
enddo
endif
return
end
But I am getting the following errors while compiling my Fortran code:
2layernew.f(322): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: , )
Alphainst = AlphainstTempDep(i-1) +(AlphainstTempDep(i)
---------------------------------------------------------------------------^
2layernew.f(323): error #5276: Unbalanced parentheses
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
-----------------------------------------------^
2layernew.f(323): error #5276: Unbalanced parentheses
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
-------------------------------------------------------------------------------^
2layernew.f(323): error #5082: Syntax error, found '-' when expecting one of: => = . [ % ( :
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
------------------------^
2layernew.f(323): error #5082: Syntax error, found '*' when expecting one of: => = . [ % (
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
-------------------------------------------------^
2layernew.f(324): error #5082: Syntax error, found '/' when expecting one of: => = . [ % ( :
$ / (AlphainstTempMap(i)- AlphainstTempMap(i-1))
----------------^
2layernew.f(303): error #6410: This name has not been declared as an array or a function. [ARRAY]
temp = array(1)
-------------^
2layernew.f(310): error #6512: A scalar-valued expression is required in this context.
if (temp.le.296) then
--------------------^
2layernew.f(315): error #6512: A scalar-valued expression is required in this context.
elseif (temp.ge.1973) then
--------------------^
2layernew.f(321): error #6512: A scalar-valued expression is required in this context.
if (temp <= AlphainstTempMap(i+1) ) then
-----------------------^
2layernew.f(323): error #8524: The syntax of this data pointer assignment is incorrect: either 'bound spec' or 'bound remapping' is expected in this context.
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
------------------------^
2layernew.f(323): error #6410: This name has not been declared as an array or a function. [$]
$ - AlphainstTempDep(i-1)) *(temp - AlphainstTempMap(i-1))
---------^
2layernew.f(324): error #6678: When the target is an expression it must deliver a pointer result.
$ / (AlphainstTempMap(i)- AlphainstTempMap(i-1))
--------------------------------------^
Please help me.