找回密码
 注册
Simdroid-非首页
查看: 100|回复: 2

[子程序/二次开发] 关于书上一个子程序的问题。

[复制链接]
发表于 2015-3-11 20:50:27 | 显示全部楼层 |阅读模式 来自 北京
悬赏2仿真币未解决
本帖最后由 yy03101050233 于 2015-3-12 09:04 编辑

请问,按照书上录入子程序后,不能计算出结果。请大家帮忙分析一下原因。谢谢。
子程序如下:
      subroutine forcem(press,th1,th2,nn,n)
c
      implicit real*8(a-h, o-z)
c
c...  define non-uniform distributed force on an element
c
c...  press       distributed load(increment)magnitude
c...  th1         (x,y,z)position of the integration point
c...  th2         vector describing direction of load
c...  nn          integration point number
c...  n(1)        elment number
c...  n(2)        parameter identifying the type of load
c...  n(3)        not used
c...  n(4)        not used
c...  n(5)        distributed load index
c
c...  Programmed to simulate a moving distributed load
c...  The load is assumed to have a square shape with edge
c...  lengths b. The center of the load is moving in the
c...  (x,y)-plane with a constant velocity v along the line
c...  x=y.
c...  Since use will be made of the FOLLOW FORCE option together
c...  with AUTO LOAD,the total load at the end of the increment
c...  must be specified
c
      dimension th1(3),th2(3),n(7)
c
c...  include common block creeps to obtain total time (cptim)
c...  and time increment (timinc)
      include '../common/creeps'
c
c...  define b and v
      b=1.0
      v=1.414
c
c...  determine current centre of load
      distan=v*(cptim+timinc)
      xc=0.5*v*distan
      yc=xc
c
c...  boundaries of loaded area
      xmin=xc-0.5
      xmax=xc+0.5
      ymin=yc-0.5
      ymax=yc+0.5
c
c...  define non-zero load only if integration point is
c...  located within boundaries of loaded area
      press=0.0
      if(th1(1)<=xmax.and.th1(1)>=xmin.and.th1(2)<=ymax.and.th1(2)>=ymin)
      press=2.0
c...  define direction of load
      th2(1)=0.0
      th2(2)=0.0
      th2(3)=-1.0
c
      return
      end

附件: 您需要 登录 才可以下载或查看,没有账号?注册
 楼主| 发表于 2015-3-11 20:51:27 | 显示全部楼层 来自 北京
Simdroid开发平台
补充说明,日志如下:
MSC.Marc 2005 Windows_NT version
--------------------------------
                     :         
Program name         : marc  
Job ID               : e1_job1   
User subroutine name : plate1  
Restart file job ID  :   
Substructure file ID :   
Post file job ID     :   
Defaults file ID     :   
View factor file ID  :   
Save generated module: no
Auto restart         : 0  
Contact decoupling   : 0
Number of tasks      : 0
Host file            :   
Distributed i/o      :   
Run directory        : d:\training
Scratch directory    : d:\training
Default bin directory: d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\bin
Material database    : d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\AF_flowmat\   
                     :            
ifort /c  /I"d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\common" /I"d:\MSC.Software\MSC.Marc\2005\marc2005\tools\..\bcssolver\common" /I"d:\MSC.Software\MSC.Marc\2005\marc2005\nt_mpich\include" /O2 /Qip /Qsave /W0  /object:"d:\training\plate1.obj"  "d:\training\plate1.f"
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.5.221 Build 20110719
Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.

d:\training\plate1.f(50): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: )
      if(th1(1)<=xmax.and.th1(1)>=xmin.and.th1(2)<=ymax.and.th1(2)>=ymin)
-------------------------------------------------------------------------^
compilation aborted for d:\training\plate1.f (code 1)
compile failed for d:\training\plate1.f
         MSC.Marc Exit number 3

回复

使用道具 举报

发表于 2016-3-31 23:58:12 | 显示全部楼层 来自 台湾
本帖最后由 x38517489 于 2016-4-1 00:04 编辑

您好,您的退出號為3
是個子程序施加壓力簡單的範例是嗎?

代表可能
1.你並無連接子程序
2.子程序有錯

----------------------------------
給你的解決方法
步驟1.先確定是否裝配連接子程序了(環境變數等等,或重裝)
步驟2.先用簡單子程序例子演練
步驟3.檢單子程序成功再檢查你書上之子程序是否錯誤

-----------------------------------
信件:x38517489@gmail.com
仿真論壇:x38517489
歡迎交流,為msc marc 使用者

-----------------------------------
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-4-27 17:41 , Processed in 0.031059 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表