我对abaqus和fortran编程都很陌生。我正在做一个项目,在这个项目中,我将相场与裂缝扩展联系在一起,其中空洞相被纳入裂缝扩展的运动学中。我不会讲太多的细节!
我在这里附上了我的问题的3个代码/消息:
a) umat_sdvini3.f (我的用户子例程文件,其中包含sdvini和umat ) b) Job- user -mod-9.inp (我在Abaqus CAE的帮助下创建的.inp输入文件) c) Job-User-15.msg (包含错误消息的文件!)
当我告诉Abaqus使用用户子例程运行作业时,作业因为某种原因而中止了!在前面的作业运行中(11到14),当子例程文件中状态变量的if/else语句被注释掉时,一切都运行得很好!
在附加的fortran文件中,如果第二个if/else语句未注释,则会出现错误,作业将中止!
我的用户子例程的fortran 77代码:(这是第二个if/else语句命令块不能正常运行!我想我可以通过坐标(1)访问依赖于解的状态变量的值,它是x坐标!
subroutine sdvini(statev,coords,nstatv,ncrds,noel,npt,layer,kspt)
include 'aba_param.inc'
dimension statev(nstatv), coords(ncrds)
statev(1)=5.d0
return
end
subroutine umat(stress,statev,ddsdde,sse,spd,scd,
1 rpl,ddsddt,drplde,drpldt,
2 stran,dstran,time,dtime,temp,dtemp,predef,dpred,cmname,
3 ndi,nshr,ntens,nstatv,props,nprops,coords,drot,pnewdt,
4 celent,dfgrd0,dfgrd1,noel,npt,layer,kspt,kstep,kinc)
include 'aba_param.inc'
character*80 cmname
dimension stress(ntens),statev(nstatv)
dimension ddsdde(ntens,ntens),ddsddt(ntens),drplde(ntens)
dimension stran(ntens),dstran(ntens),time(2),predef(1),dpred(1)
dimension props(nprops),coords(3),drot(3,3),dfgrd0(3,3),dfgrd1(3,3)
C real E, xnu, bulk, shear
integer i, j
ddsdde = 0.d0
E = props(1)
xnu = props(2)
statev(1)=5.d0
shear = E/2.d0/(1.d0+xnu)
bulk = E/3.d0/(1.d0-2.d0*xnu)
real f_i=1.0e-10
real w_bar=0.25d0
real walpha=2.d0
a_1 = (-2)*(1.d0-f_i)/0.25d0
a_2 = (1.d0-f_i)/(0.25**2)
C omega = statev(1)
if(ndi.eq.2 .and. nshr.eq.1) then
ddsdde(1,1) = bulk + (10.d0/9.d0)*shear
ddsdde(1,2) = bulk - (8.d0/9.d0)*shear
ddsdde(2,1) = bulk - (8.d0/9.d0)*shear
ddsdde(2,2) = bulk + (10.d0/9.d0)*shear
ddsdde(3,3) = 2.d0*shear
ddsdde = ddsdde*statev(1)
end if
do i=1,ntens
do j=1,ntens
stress(i) = stress(i) + ddsdde(i,j)*dstran(j)
end do
end do
if(coords(1).le.0 .and. coords(2).eq.0) then
statev(1) = (w_bar*(1-tanh(w_alpha*coords(1))))
statev(1)=1.d0+a_1*(statev(1))+a_2*(statev(1)**2)
elseif(coords(1).gt.0 .and. coords(2).eq.0) then
statev(1) = (w_bar*(1+tanh(w_alpha*coords(1))))
statev(1)=1.d0+a_1*(statev(1))+a_2*(statev(1)**2)
else
statev(1)=0.d0
end if
statev(1)=state(1) + kinc
write(6,*) ddsdde
return
end这是Abaqus (标准)的.inp文件:
*Heading
** Job name: Job-User-9 Model name: Model-1
** Generated by: Abaqus/CAE 6.14-2
*Preprint, echo=NO, model=NO, history=NO, contact=NO
**
** PARTS
**
*Part, name=Plate
*Node
1, 0., 100.
2, 0., 99.5
3, 0., 99.
4, 0., 98.5
5, 0., 98.
6, 0., 97.5
7, 0., 97.
8, 0., 96.5
9, 0., 96.
10, 0., 95.5
11, 0., 95.
12, 0., 94.5
13, 0., 94.
14, 0., 93.5
15, 0., 93.
16, 0., 92.5
17, 0., 92.
18, 0., 91.5
19, 0., 91.
20, 0., 90.5
21, 0., 90.
22, 0., 89.5
23, 0., 89.
24, 0., 88.5
25, 0., 88.
26, 0., 87.5
27, 0., 87.
28, 0., 86.5
29, 0., 86.
30, 0., 85.5
31, 0., 85.
32, 0., 84.5
33, 0., 84.
34, 0., 83.5
35, 0., 83.
36, 0., 82.5
37, 0., 82.
38, 0., 81.5
39, 0., 81.
40, 0., 80.5
41, 0., 80.
42, 0., 79.5
43, 0., 79.
44, 0., 78.5
45, 0., 78.
46, 0., 77.5
47, 0., 77.
48, 0., 76.5
49, 0., 76.
50, 0., 75.5
...
...
...
*Element, type=CPS4R
1, 1, 2, 203, 202
2, 2, 3, 204, 203
3, 3, 4, 205, 204
4, 4, 5, 206, 205
5, 5, 6, 207, 206
6, 6, 7, 208, 207
7, 7, 8, 209, 208
8, 8, 9, 210, 209
9, 9, 10, 211, 210
10, 10, 11, 212, 211
11, 11, 12, 213, 212
12, 12, 13, 214, 213
13, 13, 14, 215, 214
14, 14, 15, 216, 215
15, 15, 16, 217, 216
16, 16, 17, 218, 217
17, 17, 18, 219, 218
18, 18, 19, 220, 219
19, 19, 20, 221, 220
20, 20, 21, 222, 221
21, 21, 22, 223, 222
22, 22, 23, 224, 223
23, 23, 24, 225, 224
24, 24, 25, 226, 225
25, 25, 26, 227, 226
26, 26, 27, 228, 227
27, 27, 28, 229, 228
28, 28, 29, 230, 229
29, 29, 30, 231, 230
30, 30, 31, 232, 231
31, 31, 32, 233, 232
32, 32, 33, 234, 233
33, 33, 34, 235, 234
34, 34, 35, 236, 235
35, 35, 36, 237, 236
36, 36, 37, 238, 237
37, 37, 38, 239, 238
38, 38, 39, 240, 239
39, 39, 40, 241, 240
40, 40, 41, 242, 241
41, 41, 42, 243, 242
42, 42, 43, 244, 243
43, 43, 44, 245, 244
44, 44, 45, 246, 245
45, 45, 46, 247, 246
46, 46, 47, 248, 247
47, 47, 48, 249, 248
48, 48, 49, 250, 249
49, 49, 50, 251, 250
50, 50, 51, 252, 251
...
...
...
*Nset, nset=Set-1, generate
1, 40401, 1
*Elset, elset=Set-1, generate
1, 40000, 1
** Section: Section-1
*Solid Section, elset=Set-1, controls=EC-1, material=Material-1
1.,
*Hourglass Stiffness
100., , 0., 0.
*End Part
**
**
** ASSEMBLY
**
*Assembly, name=Assembly
**
*Instance, name=Plate-1, part=Plate
*End Instance
**
*Nset, nset=Left_edge, instance=Plate-1, generate
1, 201, 1
*Elset, elset=Left_edge, instance=Plate-1, generate
1, 200, 1
*Nset, nset=bottom-edge, instance=Plate-1, generate
2211, 40401, 201
*Elset, elset=bottom-edge, instance=Plate-1, generate
2200, 40000, 200
*Elset, elset=_Surf-1_S3, internal, instance=Plate-1, generate
39801, 40000, 1
*Elset, elset=_Surf-1_S4, internal, instance=Plate-1, generate
1, 39801, 200
*Surface, type=ELEMENT, name=Surf-1
_Surf-1_S3, S3
_Surf-1_S4, S4
*End Assembly
**
** ELEMENT CONTROLS
**
*Section Controls, name=EC-1, hourglass=STIFFNESS
1., 1., 1.
**
** MATERIALS
**
*Material, name=Material-1
*Depvar
1,
*User Material, constants=2
1e+06, 0.3
**
*INITIAL CONDITIONS, TYPE=SOLUTION,USER
** BOUNDARY CONDITIONS
**
** Name: BC-1 Type: Displacement/Rotation
*Boundary
Left_edge, 1, 1
** Name: BC-2 Type: Displacement/Rotation
*Boundary
bottom-edge, 2, 2
** ----------------------------------------------------------------
**
** STEP: Step-1
**
*Step, name=Step-1, nlgeom=NO
*Static
1., 1., 1e-05, 1.
**
** LOADS
**
** Name: Load-1 Type: Pressure
*Dsload
Surf-1, P, -100.
**
** OUTPUT REQUESTS
**
*Restart, write, frequency=0
**
** FIELD OUTPUT: F-Output-1
**
*Output, field
*Node Output
CF, COORD, RF, U
*Element Output, directions=YES
E, S, SDV
**
** FIELD OUTPUT: F-Output-2-bottomEdge
**
*Node Output, nset=bottom-edge
COORD, U
*Element Output, elset=bottom-edge, directions=YES
S, SDV
**
** HISTORY OUTPUT: H-Output-1
**
*Output, history, variable=PRESELECT
*End Step.msg文件如下:(我不太理解这个错误!一点也不!)
Abaqus JOB Job-User-15
Abaqus 6.14-2
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 5 tokens from Flexnet server lm.rcc.psu.edu.
<255 out of 300 licenses remain available>.
Begin Compiling Abaqus/Standard User Subroutines
Thu 13 Jul 2017 02:38:34 PM EDT
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on
Intel(R) 64, Version 15.0.0.090 Build 20140723
Copyright (C) 1985-2014 Intel Corporation. All rights reserved.
Intel(R) Fortran 15.0-1684
End Compiling Abaqus/Standard User Subroutines
Begin Linking Abaqus/Standard User Subroutines
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on
Intel(R) 64, Version 15.0.0.090 Build 20140723
Copyright (C) 1985-2014 Intel Corporation. All rights reserved.
ifort: command line remark #10148: option '-i-dynamic' not supported
GNU ld version 2.20.51.0.2-5.36.el6 20100205
End Linking Abaqus/Standard User Subroutines
Thu 13 Jul 2017 02:38:35 PM EDT
Begin Analysis Input File Processor
Thu 13 Jul 2017 02:38:35 PM EDT
Run pre
Thu 13 Jul 2017 02:38:39 PM EDT
End Analysis Input File Processor
Begin Abaqus/Standard Analysis
Thu 13 Jul 2017 02:38:39 PM EDT
Run standard
/gpfs/apps/x86_64-rhel6/abaqus/6.14-2/6.14-2/code/bin/standard: symbol
lookup error: /tmp/mfg5310_Job-User-15_1727/libstandardU.so: undefined
symbol: state_
Thu 13 Jul 2017 02:38:43 PM EDT
Abaqus Error: Abaqus/Standard Analysis exited with an error - Please see the
message file for possible error messages if the file exists.
Abaqus/Analysis exited with errors你们中有谁能帮我解决这个问题吗?请!
谢谢,Mousumi
发布于 2017-07-14 07:32:22
如错误消息所示,您在未定义的变量state处有一个拼写错误。
statev(1)=state(1) + kinc
!! Should be:
statev(1)=statev(1) + kinc由于您使用的是隐式类型(也就是说,在使用变量类型之前没有显式定义变量类型),编译器可能在运行前的编译过程中没有捕捉到这个错误。也许你可以自己验证一下。
https://stackoverflow.com/questions/45089395
复制相似问题