新安装了Marc2013,编译器采用VC2010和Intel.Visual.Fortran.Composer.XE.2011.5.221.ISO-TBE,进行焊接模拟测试,采用的子程序EEE.f内容如下:
subroutine flux(f,temflu,mibody,time)
c implicit real*8 (a-h,o-z)
c ** Start of generated type statements **
c real*8 f
c integer mibody
c real*8 temflu, time
c ** End of generated type statements **
dimension f(2),mibody(10),temflu(6)
c* * * * * *
c
c user subroutine for non-uniform flux input.
c
c f(1) flux value (to be defined)
c f(2) derivative of flux with respect to temperature
c (to be defined; optional, this might improve the
c convergence behavior)
c
c temflu(1) estimated temperature
c temflu(2) previous volumetric flux
c temflu(3) temperature at beginning of increment
c temflu(4,5,6)integration point coordinates
c mibody(1) element number
c mibody(2) flux type
c mibody(3) integration point number
c mibody(4) flux index - not used if table input
c mibody(5) not used
c mibody(6) =1 : heat transfer
c =2 : joule
c =3 : bearing
c =4 : electrostatic
c =5 : magnetostatic
c =6 : acoustic
c mibody(7) internal element number
c mibody(8) layer number for heat transfer shells elements
c and volume flux
c mibody(9) Not used
c mibody(10) boundary condition number if table input
c time time
c
c* * * * * *
OPEN(UNIT=10,FILE='HELLO.TXT')
WRITE(10,*) "HELLLLL!"
a=0.005
b=0.005
c=0.005
v=0.02
d0=0
d=v*time
q=3000*0.7
pi=3.14
x=temflu(4)
y=temflu(5)
z=temflu(6)
mibody(6)=1
y0=0.01
x0=0
heat=6*sqrt(3.0)*q/(a*b*c*pi)
ex=exp(-3*(z-d)**2/c**2-3*(y-y0)**2/b**2-3*(x-x0)**2/a**2)
f(1)=heat*ex
return
end
建模的模型及坐标系如下:
热源加载的边界条件如下图:
上图中,有些疑问:我明明已经选择了那个子程序选项,为何dimension和motion框中还有热源参数的值?这些值还起作用吗?(从计算结果看,没有起作用)
job的check结果是正确的,信息如下:
INFO: Analysis dimension is derived from element class hex8.
INFO: Assuming 3-D analysis!
INFO: Found 0 errors and 0 warnings.
INFO: Job check complete.
结果设置及运行提示如下图:
可以看到,提示框中是选择的EEE.f的子程序,并且参与编译,运行代码3004也是对的。
运行log文件前部分如下:
Marc 2013.1.0 , Build 230727 Windows_NT version
--------------------------------
:
Program name : marc
Job ID : C:\Users\xxxxxxxxx\model3_job1
Version type : i8
User subroutine name : EEE
User objects/libs :
Restart file job ID :
Substructure file ID :
Post file job ID :
Defaults file ID :
View factor file ID :
Save generated module: no
MPI library : intel-mpi
Auto restart : 0
Contact decoupling : 0
DDM processes :
Element loop threads :
Solver processes :
Solver threads :
GPGPU option :
Host file :
Distributed i/o :
Run directory : C:\Users\xxxxxxxxx
Scratch directory : C:\Users\xxxxxxxxx
Default bin directory: E:\software\special\mar2013\marc2013.1\bin\win64i8
Material database : E:\software\special\mar2013\marc2013.1\AF_flowmat\
:
ifort /fpp /c /DWIN32_intel -D_IMPLICITNONE /nologo /integer_size:64 -DI64 -DMKL -DOPENMP -DOMP_COMPAT -D_MSCMARC -DWIN64 /I"E:\software\special\mar2013\marc2013.1\common" /I"E:\software\special\mar2013\marc2013.1\bcsgpusolver\common" /I"E:\software\special\mar2013\marc2013.1\mumpssolver\include" /I"E:\software\special\mar2013\marc2013.1\intelmpi\win64\include" /O2 /Qip /Qvec- /Qsafe-cray-ptr /switch:fe_old_modvar /W0 /Qopenmp /Qopenmp-threadprivate:compat -DCASI -DPARDISO -DMUMPS -DBCSGPU -DCUDA /MD -DDDM /object:"C:\Users\xxxxxxxxx\EEE.obj" "C:\Users\xxxxxxxxx\EEE.f"
经过修改后,若采用weld tool,采用uweldflux子函数,其子函数内容为:
subroutine uweldflux(f,temflu,mibody,welddim,time)
c f(1) flux value (to be defined)
c f(2) derivative of flux with respect to temperature
c (to be defined; optional, this might improve the
c convergence behavior)
c
c temflu(1) estimated temperature
c temflu(2) previous volumetric flux
c temflu(3) temperature at beginning of increment
c temflu(4,5,6)integration point coordinates
c mibody(1) element number
c mibody(2) flux type
c mibody(3) integration point number
c mibody(4) flux index - not used if table input
c mibody(5) not used
c mibody(6) =1 : heat transfer
c =2 : joule
c =3 : bearing
c =4 : electrostatic
c =5 : magnetostatic
c =6 : acoustic
c mibody(7) internal element number
c mibody(8) layer number for heat transfer shells elements
c and volume flux
c mibody(9) Not used
c mibody(10) boundary condition number if table input
c time time
c
dimension mibody(*),temflu(*),welddim(*)
real*8 f
integer mibody
real*8 temflu,time,welddim
c* * * * * *
OPEN(UNIT=10,FILE='HELLO.TXT')
a=0.003
b=0.003
c=0.003
v=0.02
d=v*time
q=7000*0.7
pi=3.14
x=temflu(4)
y=temflu(5)
z=temflu(6)
mibody(6)=1
y0=0.009
x0=0.05
heat=6*sqrt(3.0)*q/(a*b*c*pi)
ex=exp(-3*(z-d)**2/c**2-3*(y-y0)**2/b**2-3*(x-x0)**2/a**2)
f=heat*ex
return
end
计算结果为:
若采用普通的volume flux加载,采用子函数flux为:
subroutine flux(f,temflu,mibody,time)
c implicit real*8 (a-h,o-z)
c ** Start of generated type statements **
real*8 f,time
integer mibody
real*8 temflu
c ** End of generated type statements **
dimension f(2),mibody(10),temflu(6)
c* * * * * *
c
c user subroutine for non-uniform flux input.
c
c f(1) flux value (to be defined)
c f(2) derivative of flux with respect to temperature
c (to be defined; optional, this might improve the
c convergence behavior)
c
c temflu(1) estimated temperature
c temflu(2) previous volumetric flux
c temflu(3) temperature at beginning of increment
c temflu(4,5,6)integration point coordinates
c mibody(1) element number
c mibody(2) flux type
c mibody(3) integration point number
c mibody(4) flux index - not used if table input
c mibody(5) not used
c mibody(6) =1 : heat transfer
c =2 : joule
c =3 : bearing
c =4 : electrostatic
c =5 : magnetostatic
c =6 : acoustic
c mibody(7) internal element number
c mibody(8) layer number for heat transfer shells elements
c and volume flux
c mibody(9) Not used
c mibody(10) boundary condition number if table input
c time time
c
c* * * * * *
OPEN(UNIT=10,FILE='HELLO.TXT')
a=0.003
b=0.003
c=0.003
v=0.02
d0=0
d=v*time
q=7000*0.7
pi=3.14
x=temflu(4)
y=temflu(5)
z=temflu(6)
y0=0.009
x0=0.05
heat=6*sqrt(3.0)*q/(a*b*c*pi)
ex=exp(-3*(z-d)**2/c**2-3*(y-y0)**2/b**2-3*(x-x0)**2/a**2)
f(1)=heat*ex
WRITE(10,*) time
return
end
计算结果为:
可以看到,趋势基本上是正确的.
很幸运,看到了这个帖子,我是个marc二次开发的初学者,我刚刚装了VC2010+Intel.Visual.Fortran.Composer.XE.2011.5.221.ISO-TBE+Marc2013,运行了楼主的附件1,但是出现了这样的问题,log文件是这样的:
'LINK' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
link failed for eee.obj
Marc 2013.0.0 Exit number 3
不知道是不是我装子程序装的不对,还是什么原因(我的电脑是32位的),请楼主帮看看,十分谢谢!