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

【求助】关于Patran 的neutral file的问题

[复制链接]
发表于 2003-3-5 12:52:14 | 显示全部楼层 |阅读模式 来自 北京
在我输出的out文件中,我可以比较清楚的看懂节点坐标,单元节点,节点力,节点约束,可是在施加pressure时输出有些问题,施加top/bot pressure在out中没有反应,施加edge pressure时输出了如下:
  6       3       1       2       0       0       0       0       0
00110000010010000 1      
  0.100000000E+06 0.100000000E+06
  那位老哥可以帮着解释解释!!!
最好是能贴一个所有关于patran neutral file format的说明
谢谢了!!
发表于 2003-3-5 21:39:24 | 显示全部楼层 来自 大连理工大学西山生活区

回复: 【求助】关于Patran 的neutral file的问题

Simdroid开发平台
edodo,我给你一个ansys中输出Patran 2 Neutral File 的资料吧!
只支持几种体单元,你可以做参考
  
!*
!* TITLE : ANSYS to Patran 2 Neutral File translator
!* FUNCTION: This macro translates element and nodal data FOR THE CURRENTLY
!* SELECTED SET OF ELEMENTS into Patran 2 Neutral File (PNF)
!* format
!*
!* LIMITATIONS: 1) only the following element types can be read/written:
!* * SOLID45 = 8-noded hexahedral element
!* * SOLID72 = 4-noded tetrahedral element
!* * SOLID73 = 8-noded hexahedral element
!* * SOLID92 = 10-noded tetrahedral element
!* * SOLID95 = 20-noded hexahedral element
!*
!* USAGE: *USE,kb14,arg1,arg2,arg3
!*
!* where arg1 : *** NOT USED ***
!* arg2 : output file name (extension is .mesh)
!* arg3 : element "domain" number [default=1]
!*
finish ! return to "BEGIN" level
/NOPR ! switch output OFF
/com,
/com,========================================================================
/com,= ANSYS to Patran 2 Neutral File translator =
/com,========================================================================
/com,
ar51 = 'X' !
ar52 = 'Y' ! define some useful parameters
ar53 = 'Z' !
*get,ar33,ACTIVE,0,DBASE,LTIME
ar34 = NINT(ar33/10000-0.5)
ar54='%ar34%:' $ *if,ar34,LT,10,THEN $ ar54='0%ar34%:' $ *endif
ar35 = NINT(MOD(ar33/100,100)-0.5)
ar55='%ar35%:' $ *if,ar35,LT,10,THEN $ ar55='0%ar35%:' $ *endif
ar36 = MOD(ar33,100)
ar56='%ar36%' $ *if,ar36,LT,10,THEN $ ar56='0%ar36%' $ *endif
*dim,month,CHAR,12
month(1) = 'Jan','Feb','Mar','Apr','May','Jun'
month(7) = 'Jul','Aug','Sep','Oct','Nov','Dec'
*get,ar44,ACTIVE,0,DBASE,LDATE
ar37 = MOD(ar44,100)
ar57=' %ar37%' $ *if,ar37,LT,10,THEN $ ar57='0%ar37%' $ *endif
ar58 = month(NINT(MOD(ar44/100,100)))
ar39 = NINT(ar44/10000)
ar59='%ar39%' $ *if,ar39,LT,10,THEN $ ar59='0%ar39%' $ *endif
*set,month ! delete temporary parameter
!
! process input parameters
!
*if,'%arg2%',EQ,'0',THEN
*msg,FATAL
Output file name (ARG2) undefined; exiting...
*endif
ar12 = '%arg2%'
*if,arg3,EQ,0,THEN $ ar13=1 $ *else $ ar13=arg3 $ *endif
/com,
/com, Size data (number of elements, number of nodes) to be written...
/com,
/com, * only elements which have all their nodes selected will be written
/com, * only nodes which are attached to the selected elements will be written
/com,
nsle,S ! select all nodes associated with selected elements
*get,ar70,NODE,,COUNT ! total number of nodes
*get,ar80,ELEM,,COUNT ! total number of elements
*msg,INFO,ar80,ar70,ar12
%/ &
%/ Writing %I elements and %I nodes &
%/ to Patran 2 Neutral File %C.mesh... %/
!
! open file for writing and write header cards...
!
/output,'%ar12%',mesh,,
/sys,printf "n * Writing header cards..."
*vwrite,
('25',2(7X,'0'),7X,'1',5(7X,'0'))
*msg,INFO,ar12,'%ar54%%ar55%%ar56%',ar57,ar58,'20%ar59%'
C %C.mesh: created at %C on %C %C %C
*vwrite,0,0,1,ar70,ar80,1,0
('26',7(1F9.0,TL1),7(' '),'0'/20X,'2.0A',8(' '))
!
! write nodal data cards:
!
/sys,printf "n * Writing nodal data cards..."
*get,ar77,NODE,,NUM,MAX ! highest node number in selected set
*dim,nlist,ARRAY,%ar77%,4 ! array to hold nodal data
*vget,nlist(1,4),NODE,1,NSEL ! mask to hide unselected nodes
*do,ar20,1,3,1
! get nodal x,y,z-coordinates
ar50 = ar5%ar20%
*vmask,nlist(1,4)
*vget,nlist(1,%ar20%),NODE,1,LOC,%ar50%
*enddo
/NOPR ! switch output OFF
*vmask,nlist(1,4)
*vwrite,SEQU,0,2,nlist(1,1),nlist(1,2),nlist(1,3)
(' 1',3(1F9.0,TL1),' ',TL1,5(7X,'0')/3E16.9/'1G',7X,'6',2(7X,'0'),2X,'000000')
*set,nlist ! delete temporary array
!
! write element data cards:
!
/sys,printf "n * Writing element data cards..."
*dim,en,ARRAY,10 ! array to hold element nodal topology
*get,ar88,ELEM,,NUM,MIN ! lowest element number in selected set
*do,ar20,1,ar80,1
*get,ar99,ELEM,%ar88%,ATTR,TYPE ! element type
*get,ar60,ETYPE,%ar99%,ATTR,ENAME ! element "name"
*if,ar60,EQ,95,THEN
! 20-noded hexahedra
ar61 = 8
ar62 = 20
*elseif,ar60,EQ,92,THEN
! 10-noded tetrahedra
ar61 = 5
ar62 = 10
*elseif,ar60,EQ,45,THEN
! 8-noded hexahedra without rotations
ar61 = 8
ar62 = 8
*elseif,ar60,EQ,73,THEN
! 8-noded hexahedra with rotations
ar61 = 8
ar62 = 8
*elseif,ar60,EQ,72,THEN
! 4-noded tetrahedra with rotations
ar61 = 5
ar62 = 4
*else
/output,
*msg,FATAL,ar60,ar88
Unsupported element type %I for element %I; exiting...
*endif
ar63 = NINT(0.5+(ar62+9)/10)
/NOPR ! switch output OFF
*vwrite,ar88,ar61,ar63,ar62,1,ar13,0,0,0,0
(' 2',3(1F9.0,TL1),' ',TL1,5(7X,'0')/4(1F9.0,TL1),3E16.9)
*vget,en(1),ELEM,%ar88%,NODE,1,,,4
*if,ar60,EQ,95,THEN
! 20-noded hexahedra
*vlen,1
*vwrite,en(1),en(2),en(3),en(4),en(5),en(6),en(7),en(8),en(9),en(10)
(10(1F9.0,TL1),' ')
*vget,en(1),ELEM,%ar88%,NODE,11,,,4
*vlen,1
*vwrite,en(1),en(2),en(7),en(8),en(9),en(10),en(3),en(4),en(5),en(6)
(10(1F9.0,TL1),' ')
*elseif,ar60,EQ,92,THEN
! 10-noded tetrahedra
*vlen,1
*vwrite,en(1),en(2),en(3),en(4),en(5),en(6),en(7),en(8),en(9),en(10)
(10(1F9.0,TL1),' ')
*elseif,ar60,EQ,72,THEN
! 4-noded tetrahedra
*vlen,1
*vwrite,en(1),en(2),en(3),en(4)
(4(1F9.0,TL1),' ')
*else
! 8-noded hexahedra
*vlen,1
*vwrite,en(1),en(2),en(3),en(4),en(5),en(6),en(7),en(8)
(8(1F9.0,TL1),' ')
*endif
ar88 = ELNEXT(ar88) ! next element number is selected set
*enddo
*set,en ! delete temporary array
!
! write end-of-file card and close file
!
*vwrite,
('99',2(7X,'0'),7X,'1')
/output,
/com,complete!
finish ! return to "BEGIN" level
/GOPR ! switch output ON
/com,
/com,========================================================================
/com,= finished =
/com,========================================================================
/com,

评分

1

查看全部评分

 楼主| 发表于 2003-3-6 08:54:34 | 显示全部楼层 来自 北京

回复: 【求助】关于Patran 的neutral file的问题

太感谢了!!
不过我现在主要需要的是对于面载荷输出的信息!!
比如,面载荷加在哪个单元的哪个单元面上!!谢谢了!!
  
你的那份资料我也有!!
发表于 2003-3-6 09:42:52 | 显示全部楼层 来自 大连理工大学

回复: 【求助】关于Patran 的neutral file的问题

哪你为什么用中性文件呢?用bdf不是就解决了么、
 楼主| 发表于 2003-3-6 09:49:38 | 显示全部楼层 来自 北京

回复: 【求助】关于Patran 的neutral file的问题

噢!
中性文件如何得到?
发表于 2003-3-6 13:26:52 | 显示全部楼层 来自 陕西西安

回复: 【求助】关于Patran 的neutral file的问题

Neutral File 并非是中性文件的意思!他是femap文件格式!
关于neutral文件格式,在nastran for windows 2.0 版里面有详细的介绍。
发表于 2003-3-6 14:02:17 | 显示全部楼层 来自 陕西西安

回复: 【求助】关于Patran 的neutral file的问题

如果你找不到,把的文件信息给多一点,我帮你看看
发表于 2003-3-6 14:07:51 | 显示全部楼层 来自 陕西西安

回复: 【求助】关于Patran 的neutral file的问题

自己看吧,呵呵!
Data Block 407 - Loads
  
Record  Field  Description  Size
1  setID  ID of load set  4 byte, long integer
2  title  Load set title (max 25 char)  character string
3  CSys  ID of coordinate system  4 byte, long integer
Def_temp  Default temperature  8 byte, double precision
temp_on  Default temperature flag (0=off, 1=on)  2 byte, boolean
grav_on  Global acceleration flag (0=off, 1=on)  
omega_on  Global rotation flag (0=off, 1=on)  
4  grav[0..2]  Translational acceleration  8 byte, double precision
5  grav[3..5]  Rotational acceleration  
6  origin[0..2]  Origin for rotational loads  
7  omega[0..2]  Rotational velocity  
8  stef_boltz  Stefan-Boltzmann Constant  8 byte,
double precision
abs_temp  Offset of Temperatures from Absolute Zero  
free_cnv_exp  Free Convection Exponent  
9  fc_flu_cond  Forced Convection Fluid Conductivity  
fc_flu_cp  Forced Convection Fluid Specific Heat  
fc_flu_vis  Forced Convection Fluid Viscosity  
fc_flu_dens  Forced Convection Fluid Density  
10  fc_cons_coeff  Forced Convection Equation Constant Coefficient  8 byte,
double precision
fc_reynolds  Forced Convection Reynolds Exponent  
fc_pran_in  Forced Convection Prandtl Exponent Into Fluid  
fc_pran_out  Forced Convection Prandtl Exponent Out of Fluid  
11  tfc_flu_cond  Forced Convection Fluid Conductivity Function ID  4 byte,
long integer
tfc_flu_cp  Forced Convection Fluid Specific Heat Function ID  
tfc_flu_vis  Forced Convection Fluid Viscosity Function ID  
12  alt_free_conv  Flag for Alternate Free Convection Formulation  2 byte, boolean
fc_flu_flag  Flag for Alternate Forced Convection Formulation  
fc_conv_flow  Flag for Forced Convection Convective Energy Flow  
1 record for each struct-ural load plus final  loadID  Node or element ID where load is applied. loadID must be -1 for the last record.  4 byte, long integer
loadtype  Type of load (1=Nodal Force, 2=Nodal Displacement, 3=Nodal Accel, 5=Nodal Heat Generation, 6=Nodal Heat Flux, 10=Distributed Line Load, 11=Element Face Pressure, 13=Element Heat Generation, 14=Element Heat Flux, 15=Element Convection, 16=Element Radiation)  
color  ID of color  
layer  ID of layer  
define_sys  Definition coordinate system for load  
sl_funcID  ID of function for load  4 byte,  long integer
1 record for each struct-ural load  phase  Load phase (view factor for radiation)  8 byte, double precision
coefficient  Unused except for convection and radiation, then ambient temperature  
6 records per struct-ural load, one for each DOF  dof_face  Degree of freedom flag (0=off, 1=on), or element face for pressure. For Distributed Line Load, record 1, 0=Elem X Dir, 1=Elem Y Dir, 2=Elem Z Dir, 3=Global X Dir, 4=Global Y Dir, 5=Global Z Dir  4 byte, long integer
value  Load Value for this DOF. For Distributed Line Load, the first value is the value at end 1.  8 byte, double precision
1 record per load  addl_coeff  Absorptivity, or Diameter for Forced Convection. For Distributed Line Load, this is the value at end 2.  8 byte,
double precision
addl_fnc[0..2]  [0]=Temp vs Time, [1]=Absorptivity vs Temp, [2]=View Factor vs Time  4 byte, long integer
1 record per load  can_shade, can_be_shade  Flags for View Factor Shading Calculations  2 byte, boolean
subtype  Flag that indicates Forced Convection, Vector Flux or Enclosure Radiation if nonzero  4 byte,
long integer
1 record per load  dir_func[0..2]  Vector Flux Time Dependence Functions  
1 record per load  direction[0..2]  Vector Flux Initial Directions  8 byte,
double precision
1 record for each nodal temp plus last  ndtempID  ID for nodal temperature. Must be -1 for last record.  4 byte, long integer
color  ID of color  
layer  ID of layer  
ndtemp  Nodal Temperature  8 byte, double precision
ndtemp_co  Unused  
ndt_funcID  ID of function for Node Temp  4 byte,
long integer
1 record for each element temp plus last  eltempID  ID for elemental temperature. Must be -1 for last record.  4 byte, long integer
color  ID of color  
layer  ID of layer  
eltemp  Elemental Temperature  8 byte, double precision
eltemp_co  Unused  
elt_funcID  ID of function for ElemTemp  4 byte,
long integer
Record  Field  Description  Size
1  setID  ID of load set  4 byte,
long integer
2  title  Load set title (max 25 char)  character string
3  CSys  ID of coordinate system  4 byte,
long integer
Def_temp  Default temperature  8 byte,
double precision
temp_on  Default temperature flag(0=off, 1=on)  2 byte, boolean
grav_on  Global acceleration flag (0=off,1=on)  
omega_on  Global rotation flag (0=off,1=on)  
4  grav[0..2]  Translational acceleration  8 byte,
double precision
5  grav[3..5]  Rotational acceleration  
6  origin[0..2]  Origin for rotational loads  
7  omega[0..2]  Rotational velocity  
1 record for eachstruct-ural load plusfinal  loadID  Node or element ID where loadis applied. loadID must be -1for the last record.  4 byte,
long integer
loadtype  Type of load (1=Force,2=Displacement, 3=Accel,11=Pressure)  
color  ID of color  
layer  ID of layer  
define_sys  Definition coordinate systemfor load  
1 record for eachstruct-ural load  phase  Load phase  8 byte,
double precision
coefficient  Unused value  
6 records perstruct-ural load, onefor each DOF  dof_face  Degree of freedom flag (0=off,1=on), or element face forpressure.  4 byte,
long integer
value  Load Value for this DOF.  8 byte,
double precision
1 record for eachnodal temp plus last  ndtempID  ID for nodal temperature. Mustbe -1 for last record.  4 byte,
long integer
color  ID of color  
layer  ID of layer  
ndtemp  Nodal Temperature  8 byte,
double precision
ndtemp_co  Unused  
1 record for eachelement temp pluslast  eltempID  ID for elemental temperature.Must be -1 for last record.  4 byte,
long integer
color  ID of color  
layer  ID of layer  
eltemp  Elemental Temperature  8 byte,
double precision
eltemp_co  Unused  
Data Block 408 - Groups
  
Record  Field  Description  Size
1  ID  ID of group  4 byte,
long integers
need_eval  Evaluation Flag (0=alreadyevaluated, 1=needs evaluationbefore next use)  
2  title  Group title (max 25 char)  character string
3  layer[0..1]  Min and Max layers in group  4 byte,
long integers
layer_method  Type of layer usage (0=Off,1=Greater, 2=Less,3=Between, 4=Outside,5=Single Layer)  
4  coclip_on  1 if coordinate clipping is on, 0otherwise  
coclip_dof  Coordinate clipping DOF(0=X, 1=Y, 2=Z)  
coclip_meth  Coordinate clipping method(0=Greater, 1=Less,2=Between, 3=Outside)  
coclip_csys  Coordinate clipping CSys ID  
coclip_min  Lower limit for coordinateclipping  8 byte,
double precision
coclip_max  Upper limit for coordinateclipping  
5  plclip_meth &nbsplane clipping method (0=Off,1=Screen, 2=Plane, 3=Volume)  4 byte,
long integers
plclip_in  If 1, clip inside planes, if 0, clipoutside  2 byte, boolean
6 records, 1 perplane (repeat as agroup with next 2records)  plclip_on  1 if respective plane is on  
plclip_neg  1 if clipping negative side ofplane  
6 records  plclip_base
[0..2]  Coordinates of base of plane  8 byte,
double precision
6 records  plclip_norm
[0..2]  Components of plane normal  
1 record  max_rules  Max number of types of rules  4 byte,
long integers
repeat for each ruletype, followed bynext records  rule_type  Type of rule. Must be -1 forlast record.  
repeat for each entryin rule  startID  Minimum entity ID in rule.Must be -1 to end this rule.  
stopID  Maximum entity ID in rule  
incID  ID increment  
include  Include Flag (0=Remove,1=Add, -1=Exclude)  
1 record  max_lists  Max number of entity lists  
repeat for each listtype, followed bynext records  list_type  Type of list. Must be -1 forlast record.  
repeat for each entryin list  entityID  ID of entity included intogroup. Must be -1 to end thisrule.
 楼主| 发表于 2003-3-12 10:29:18 | 显示全部楼层 来自 北京

回复: 【求助】关于Patran 的neutral file的问题

据说可以在 Patran lus user manual,chapter 中找到。但是我不是正版用户,所以……。哪位行行好!!!
还有那位有bdf文件格式的说明文档?
谢谢了!
发表于 2003-3-16 22:32:24 | 显示全部楼层 来自 大连理工大学西山生活区

回复: 【求助】关于Patran 的neutral file的问题

你看看长春汽车厂的那本黄皮书,再有,就是Nastran 百科全书的光盘
发表于 2003-3-17 10:29:33 | 显示全部楼层 来自 LAN

回复: 回复: 【求助】关于Patran 的neutral file的问题

blueangel wrote:
你看看长春汽车厂的那本黄皮书,再有,就是Nastran 百科全书的光盘

  
哪里有这个资料下载呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-24 01:32 , Processed in 0.076992 second(s), 18 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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