C
C User subroutine VDLOAD
subroutine vdload (
C Read only -
* nblock, ndim, stepTime, totalTime, amplitude,
* curCoords, velocity, dircos, jltyp, sname,
C Write only -
* value )
C
include 'vaba_param.inc'
parameter ( const = 1.d5 )
C
dimension curCoords(nblock,ndim), velocity(nblock,ndim),
* dircos(nblock,ndim,ndim), value(nblock)
*
character*80 sname
*
integer ::i
c character(len=20)::filename="duxie.txt"
REAL::ta
real ::ta1
real::tz
open(93,FILE="D:\abaqus2016\SIMULIA\duxie.txt",status="old")
do
read(93,*,iostat = ios) ta,ta1
if ( ios == -1 ) exit
end do
backspace(93)
backspace(93)
ta=ta+2*stepTime
ta1=ta1+5*stepTime
tz=0.5*ta
tx=0.5*ta1
write(93,*) ta,ta1
close(93)
open(89,FILE="D:\abaqus2016\SIMULIA\duxiet.txt",position="append")
write(89,*) ta,ta1,stepTime, tz
close(89)
if( jltyp .eq. 2 ) then
do k = 1, nblock
value(k) =tz
end do
end if
if( jltyp .eq. 1 ) then
do k = 1, nblock
value(k) =tx
end do
end if
return
end
fcode 发表于 2019-1-2 09:17
这与你的代码逻辑有关。
对你来说,这样不对。但对机器来说,是正确的“执行了你的意图”
subroutine vdload (
C Read only -
* nblock, ndim, stepTime, totalTime, amplitude,
* curCoords, velocity, dircos, jltyp, sname,
C Write only -
* value )
C
include 'vaba_param.inc'
parameter ( const = 1.d5 )
C
dimension curCoords(nblock,ndim), velocity(nblock,ndim),
* dircos(nblock,ndim,ndim), value(nblock)
*
character*80 sname
*
REAL::ta
open(93,FILE="D:\abaqus2016\SIMULIA\duxie.txt",status="old")
read(93,*) ta
rewind(93)
ta=ta+4*stepTime
write(93,*) ta
close(93)
open(89,FILE="D:\abaqus2016\SIMULIA\duxiet.txt",position="append")
write(89,*) ta,stepTime
close(89)
if( jltyp .eq. 2 ) then
do k = 1, nblock
value(k) =-ta/4 !体积是4, value(k)表示体力,体力X体积等于施加的反力( value(k)是给到abaqus里的体力,abaqus能识别,cae里面后处理得到的反力等于 value(k)X4)
end do
end if
return
end
31.jpg (10.02 KB, 下载次数: 487)
32.jpg (5.43 KB, 下载次数: 469)
fcode 发表于 2019-1-3 09:33
stepTime 来源于调用者,我并不知道调用者是怎样的。(可能是另一个fortran函数,或者 abaqus?) ...
pasuka 发表于 2019-1-3 22:20
碰撞或者冲击计算?
或许前一步迭代不收敛,自动缩小步长重来呗
h08x24h08 发表于 2019-1-5 22:18
就一个简单的算例,固定,加了一个体力
那这种还能控制吗?
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |