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

[二次开发及其理论] 请问umat41中,如何得到当前单元的编号,节点等信息

[复制链接]
发表于 2012-11-14 11:53:17 | 显示全部楼层 |阅读模式 来自 安徽合肥
二次开发的时候
请问umat41中,如何得到当前单元的编号,节点等信息
发表于 2015-10-27 11:10:10 | 显示全部楼层 来自 重庆沙坪坝区
Simdroid开发平台
把子程序写成:
      subroutine umat41 (cm,eps,sig,epsp,hsv,dt1,capa,etype,tt,
     1 temper,failel,crv,cma,i,ixs,x,k,j)
然后将子程序 urmathn 中,调用umat41的调用格式:
44     call umat41 (cm(mx+1),eps,sig,epsp,hsv,dt1,
     1   capa,eltype,tt,temper,failel,crv,a(lcma))
改为
44     call umat41 (cm(mx+1),eps,sig,epsp,hsv,dt1,capa,eltype,tt,
     1   temper,failel,crv,a(lcma),nnm1+i,a(lc1h),r_mem(dm_x),9,i)
即可
回复 1 不支持 0

使用道具 举报

发表于 2015-4-25 10:28:59 | 显示全部楼层 来自 上海
本帖最后由 shichuts 于 2015-4-28 22:27 编辑
阿毛wangjh 发表于 2015-4-22 16:43
yna971。R511二次开发编程时,怎么获取节点坐标啊?
下面是970的获取方法:
ip=ixs(1,i)

总版主gdyu_yu发的链接压缩包里的程序可以用,可以得到单元节点,节点坐标,我在971,r511上已经试成功。只是程序里有个小错误,subroutine lqfnode中,if (itype.eq.2) then原程序itype中少个e。
此外,原程序中单元内部ID与外部ID转换函数在971,r511中不能运行。umat41中可直接承接函数urmathn中的(i+nnm1)作为单元内部ID,故不用单元内外ID转换程序
回复 1 不支持 0

使用道具 举报

发表于 2012-11-14 12:42:13 | 显示全部楼层 来自 浙江杭州
Question:
How do I obtain element IDs, element connectivity, nodal coordinates, etc. from within my user-defined material subroutine?
Answer:
Functions that will return node IDs and element IDs:

Internal node or element ID = lqfint(a,b,c) where
a = external ID
b = data type:
   1 = node
   2 = brick
   3 = beam
   4 = shell
   5 = thick shell
c = returned error flag:
  0 = ID found
  1 = ID not found

Exteral element ID =  lqfinvf(internal_element_ID,ityp)
c
c     ityp=2 solid
c     ityp=3 beam
c     ityp=4 shell
c     ityp=5 thick shell

External node ID =  lqfinv(internal_node_id, 1)

-------------------------------
Shortly after the release of 971 R5.0, Chen prepared a subroutine lqfnode which returns nodal coordinates and internal element ID if the external element ID is known.
That subroutine, along with a subroutine umat41v that demonstrates its use, are included in  dyn21.extIDin.f.  The print statements therein are specific to the test case 2x_sphere2plate.k.

I made some slight modifications to subroutine lqfnode and the aforementioned umat41v so that nodal coordinates and external element ID will be returned if the internal element ID is known. Those modifications are included in dyn21.intIDin.f.
Note that the argument nnm1 was added to subroutine umat41v and to the calls to umat41v in subroutines urmats and urmathn.

For reference,  dyn21.f from ls971_d_R5_0_intel64_redhat54.tar.gz is the standard source code from which dyn21.extIDin.f and dyn21.intIDin.f sprang.

All aforementioned files are in http://ftp.lstc.com/anonymous/ou ... node_example.tar.gz

For older releases of LS-DYNA (than 971 R5.0), read on. Subroutine umat41 in dyn21.f of version 970 or subroutine userrrefin in dyn21.f of version 971
illustrates how to access IDs, coords, connectivity.

Here's an excerpt from 970 source code...

  From within umat41-calling subroutine urmathn:
      include 'mema.inc'
      integer i_mem
      common/dynmem/i_mem(1)
      real r_mem(1)
      equivalence (i_mem,r_mem)
      integer*4 dm_x, dm_v, dm_xms, dm_me1
      integer*4 dm_x0,dm_v0,dm_xms0,dm_me10
      common /dynmem1/ dm_x, dm_v, dm_xms, dm_me1,
     &                 dm_x0,dm_v0,dm_xms0,dm_me10
      common/bk13/lc0,lc1h,lc1b,lc1s,lc1t,lc2,lc3,lc4,lc5,lc6,lc7,lc9,
     1 lc10,lc11,lc12,lc13,lc14,lc15,lc16,lc17,lc18,lb0,lb1,lb2,
     2 lc7a,lc7b,lc7c,lc7d,lc7e,lc7f,lc7g,lc7h,lc7i,lc7j,lc7k,lc7l
...
   41 call umat41 (cm(mx+1),eps,sig,hsv,dt1,capa,'shell',tt,
     . temper,nnm1+i,a(lc1s),r_mem(dm_x),5,i)

  Then in umat41:
      subroutine umat41 (cm,eps,sig,hisv,dt1,capa,etype,time,
     . temp,i,ixs,x,k,j)
...
c       i                = internal element ID
c       iext             = external element ID
c       ip               = internal part ID
c       ipext            = external part ID
c       n1,n2,...        = internal node ID for element connectivity
c       next1, next2,... = external node ID for element connectivity
c       x1,y1,z1         = coordinates of first node in the connectivity
c       x2,y2,z2         = coordinates of second node in the connectivity
c       etc.
...
      dimension ixs(k,*),x(3,*)
...
c  2nd argument of function nelmntid is 0 for solids, 1 for beams, 2 for shells,
c    3 for tshells
        iext=nelmntid(i,0)
        ip=ixs(1,i)
        n1=ixs(2,i)
        n2=ixs(3,i)
        n3=ixs(4,i)
        n4=ixs(5,i)
        n5=ixs(6,i)
        n6=ixs(7,i)
        n7=ixs(8,i)
        n8=ixs(9,i)
c       external part and node ids
        ipext=lqfmiv(ip)
        next1=lqfinv(n1,1)
        next2=lqfinv(n2,1)
        next3=lqfinv(n3,1)
        next4=lqfinv(n4,1)
        next5=lqfinv(n5,1)
        next6=lqfinv(n6,1)
        next7=lqfinv(n7,1)
        next8=lqfinv(n8,1)
c       spot check coordinates
        x8=x(1,n8)
        y8=x(2,n8)
        z8=x(3,n8)
...


评分

1

查看全部评分

回复 1 不支持 0

使用道具 举报

 楼主| 发表于 2012-11-14 20:43:17 | 显示全部楼层 来自 安徽合肥
      subroutine lqfnode(iext,ityp,ie,node,xyz,ierr)
c
c     give element external id and
c     return internal element id, node internal id's and
c     coordinates of element connectivity
c
c Input:
c     iext  I        external element id
c     ityp  I        type
c                     2- solid
c                     3- beam
c                     4- shell
c                     5- thick shell
c Output:
c     ie    I        internal id of the element
c     node  I(*)     internal node id's
c                     solid-8 nodes beam-2 nodes shell-4 nodes tshell-8 nodes
c     xyz   r*8(3,*) coordinates of nodes
c     ierr  I        error flag  0-ok 1-error

那么这个element external id怎么得到?

在dyna21.extidin.f中,有
do ii=3039,5096     -----------------------------------------------------到底怎么来的?
        call lqfnode(ii,2,ie,node,xyz,ierr)
...
end do

在dyna21.intidin.f中,有
do i=lft,llt
...
call lqfnode(i+nnm1,2,iext,node,xyz,ierr)            -----------------------------这个i+nnm1又是什么意思?
...
end do
回复 不支持

使用道具 举报

发表于 2013-6-4 13:30:47 | 显示全部楼层 来自 天津
ahoux 发表于 2012-11-14 20:43
subroutine lqfnode(iext,ityp,ie,node,xyz,ierr)
c
c     give element external id and

楼主你好,我现在也需要在UMAT里面用到当前积分点所在单元的节点坐标和节点位移来插值计算应变梯度,请教一下,怎么获取节点信息?
回复 不支持

使用道具 举报

发表于 2013-8-20 00:33:27 | 显示全部楼层 来自 陕西西安
本帖最后由 liyunliang_zi 于 2013-8-20 00:37 编辑
gdyu_yu 发表于 2012-11-14 12:42
Question:
How do I obtain element IDs, element connectivity, nodal coordinates, etc. from within my  ...

谢谢!
但是
subroutine umat41 (cm,eps,sig,hisv,dt1,capa,etype,time,
     . temp,i,ixs,x,k,j)
这个文件在论坛里常用的5.1.1版本中,传参已经改变了呀!
加入iext=nelmntid(i,0)语句,调试通不过!

假如已知六面体单元的外部编号:1901,我想监视这个单元内的等效应力与屈服强度的关系,适时的输出到指定文件中,如何实现?


回复 不支持

使用道具 举报

发表于 2014-3-14 22:26:36 | 显示全部楼层 来自 四川成都
liyunliang_zi 发表于 2013-8-20 00:33
谢谢!
但是
subroutine umat41 (cm,eps,sig,hisv,dt1,capa,etype,time,

付楼上同问,我也试过,确实不同。971版本改动了
回复 不支持

使用道具 举报

发表于 2014-4-4 10:45:52 | 显示全部楼层 来自 天津
gdyu_yu 发表于 2012-11-14 12:42
Question:
How do I obtain element IDs, element connectivity, nodal coordinates, etc. from within my  ...

请问下版主这个外部单元号和内部单元号是什么概念?
回复 不支持

使用道具 举报

发表于 2014-10-13 11:20:02 | 显示全部楼层 来自 陕西西安
zb580504 发表于 2014-4-4 10:45
请问下版主这个外部单元号和内部单元号是什么概念?

外部单元编号,是指你划分单元时,单元编号,在前处理软件中能直接看到。
内部,是指程序计算时,重新给单元编号
回复 不支持

使用道具 举报

发表于 2014-10-13 11:30:53 | 显示全部楼层 来自 陕西西安
用传统编程思想来对待二次开发,还是有一些问题的。
想监视某单元内,某参数的变化,其实可以通过历史变量来实现。
这个问题已经不算问题了
回复 不支持

使用道具 举报

发表于 2015-4-22 16:43:51 | 显示全部楼层 来自 江苏南京
yna971。R511二次开发编程时,怎么获取节点坐标啊?
下面是970的获取方法:
ip=ixs(1,i)
       n1=ixs(2,i)
       n2=ixs(3,i)
       n3=ixs(4,i)
       n4=ixs(5,i)
       n5=ixs(6,i)
       n6=ixs(7,i)
       n7=ixs(8,i)
       n8=ixs(9,i)
       x8=x(1,n8)
       y8=x(2,n8)
       z8=x(3,n8)
dyna971这样做,可以生成求解器,但不能运算,求各位大神相助!!!!!!!
回复 不支持

使用道具 举报

发表于 2017-11-16 17:12:48 | 显示全部楼层 来自 贵州贵阳
liyunliang_zi 发表于 2014-10-13 11:30
用传统编程思想来对待二次开发,还是有一些问题的。
想监视某单元内,某参数的变化,其实可以通过历史变量 ...

请问梁单元的历史变量能不能输出到后处理?这个关键字*DATABASE_EXTENT_BINARY,应该只能输出实体和壳单元的历史变量
回复 不支持

使用道具 举报

发表于 2022-4-4 23:28:10 | 显示全部楼层 来自 江苏南京
gdyu_yu 发表于 2012-11-14 12:42
Question:
How do I obtain element IDs, element connectivity, nodal coordinates, etc. from within my  ...

伟大的版主大人,我测试了R13的开发,用了2个solid单元作为测试对象,发现lclh,ia和r_mem这个三个量的值都不对,请问能否告知新版本中应该如何得到单元对应的节点信息以及节点对应的坐标信息?
回复 不支持

使用道具 举报

发表于 2022-6-18 23:46:23 | 显示全部楼层 来自 江苏
笑_simo 发表于 2022-4-4 23:28
伟大的版主大人,我测试了R13的开发,用了2个solid单元作为测试对象,发现lclh,ia和r_mem这个三个量的值 ...

那里可以下载到R13 的二次开发包呀,可以分享一下经验吗?
回复 不支持

使用道具 举报

发表于 2022-7-9 09:31:16 | 显示全部楼层 来自 中国
xwteamobj007 发表于 2022-6-18 23:46
那里可以下载到R13 的二次开发包呀,可以分享一下经验吗?

学研谷里有开发包链接
回复 不支持

使用道具 举报

发表于 2022-7-31 10:58:39 | 显示全部楼层 来自 江苏镇江
笑_simo 发表于 2022-7-9 09:31
学研谷里有开发包链接

多谢,找到了,一直在用R12在做二次开发,R13还没有试过,需要安装新的编译器和vs,挺麻烦的。
回复 不支持

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-3-28 22:44 , Processed in 0.044553 second(s), 13 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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