|
这个代码是我在ansys help里找到的例子,标红部分是自己写的,FORCE 函数是POSITION函数前后差值取绝对值的累加,但是在AQWA中计算出来的结果数据不对,正确的应该相邻前后两次的FORCE和POSITION的差值相等才对。
很急很急,可以有偿解决,希望有相关经验的大佬回复!!!!!谢谢谢谢!!
SUBROUTINE USER_FORCE(MODE,I_CONTROL,R_CONTROL,NSTRUC,TIME,TIMESTEP,STAGE, &
POSITION,VELOCITY,COG, &
FORCE,ADDMASS,ERRORFLAG)
!DECLARATION TO MAKE USER_FORCE PUBLIC WITH UN-MANGLED NAME
!DEC$ attributes dllexport , STDCALL , ALIAS : "USER_FORCE" :: user_force
!DEC$ ATTRIBUTES REFERENCE :: I_CONTROL, R_CONTROL
!DEC$ ATTRIBUTES REFERENCE :: POSITION, VELOCITY, COG, FORCE, ADDMASS
!DEC$ ATTRIBUTES REFERENCE :: MODE, NSTRUC, TIME, TIMESTEP, STAGE
!DEC$ ATTRIBUTES REFERENCE :: ERRORFLAG
IMPLICIT NONE
INTEGER MODE, NSTRUC, STAGE, ERRORFLAG, n
REAL TIME, TIMESTEP
INTEGER, DIMENSION (100) :: I_CONTROL
REAL, DIMENSION (100) :: R_CONTROL
REAL, DIMENSION (3,NSTRUC) :: COG
REAL, DIMENSION (6,NSTRUC) :: POSITION, VELOCITY, FORCE
REAL, DIMENSION (6,6,NSTRUC) :: ADDMASS
real :: dx=0.0, a1=0.0, x=0.0
IF (MODE.EQ.0) THEN
|
|