我用ansys10.0建模求解电场的分布,在meshing气体时出现了一下错误:
an allocation was made with a negative length requested
请问是什么原因啊?
哪位高手知道望不吝赐教!
谢谢!
附源程序:
FINISH
/CLEAR,START
/PREP7
! No polynomial elements
/PMETH,OFF,1
! Set electric preferences
KEYW,PR_ELMAG,1
KEYW,MAGELC,1
! Select element
ET,1,SOLID123
! Material properties
MP,PERX,1,1e10 ! Metal
MP,RSVX,1,0.0 !
MP,PERX,2,1.0 ! Gas
MP,PERX,3,4.0 ! Permittivity of the FR4
! Construct the strips in mm
w = 0.5 ! Strip width
l = 25 ! Length modeled along the wire
pitch = 30 ! Wire pitch
h = 0.10 ! Strip thickness
open = 1 ! Gap between strips
gap = 5 ! Gap between strip and wire
d = 0.050 ! Wire diameter
sub = 2 ! Substrate thickness
BLOCK, -pitch/2, pitch/2, 0, h, -w/2, w/2 ! 1: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+2*w, w/2+2*w ! 2: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+4*w, w/2+4*w ! 3: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+6*w, w/2+6*w ! 4: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+8*w, w/2+8*w ! 5: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+10*w, w/2+10*w ! 6: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+12*w, w/2+12*w ! 7: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+14*w, w/2+14*w ! 8: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+16*w, w/2+16*w ! 9: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+18*w, w/2+18*w ! 10: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+20*w, w/2+20*w ! 11: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+22*w, w/2+22*w ! 12: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2+24*w, w/2+24*w ! 13: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-2*w, w/2-2*w ! 14: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-4*w, w/2-4*w ! 15: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-6*w, w/2-6*w ! 16: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-8*w, w/2-8*w ! 17: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-10*w, w/2-10*w ! 18: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-12*w, w/2-12*w ! 19: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-14*w, w/2-14*w ! 20: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-16*w, w/2-16*w ! 21: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-18*w, w/2-18*w ! 22: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-20*w, w/2-20*w ! 23: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-22*w, w/2-22*w ! 24: Strip
BLOCK, -pitch/2, pitch/2, 0, h, -w/2-24*w, w/2-24*w ! 25: Strip
BLOCK, -pitch/2, pitch/2, -sub, 0, -l/2, l/2 ! 26: Substrate
WPOFFS,,,-l/2
CYL4, 0, gap, d/2, , , ,l ! 27: Anode wire
WPOFFS,,,l/2
BLOCK, -pitch/2, pitch/2, -sub, 2*gap, -l/2, l/2 ! 28: Gas
! Subtract the strips and wires from the gas
VSEL, ALL
VSBV,28,ALL,,,KEEP ! gas becomes 29
! Glue everything together, 1 = strip, 28 = Substrate, 1-25 = strip, 29 = gas
VSEL,ALL
VGLUE, ALL
! Colour the parts
/COLOR, VOLU, YELLOW, 1,25,1 ! strips
/COLOR, VOLU, RED, 28 ! Substrate
! Assign material attributes
VSEL, S, VOLU, , 28 ! FR4
VATT, 3
VSEL, S, VOLU, , 1,25,1 ! strip
VSEL, A, VOLU, , 27 ! wire
VATT, 1
VSEL, S, VOLU, , 29 ! gas
VATT, 2
! Voltage boundaries
VSEL,S,,,1,250,1
ASLV, S
DA, ALL, VOLT, 0 ! strip
VSEL,S,,,27
ASLV, S
DA, ALL, VOLT, 100 ! wire
VSEL,S,,,29
ASLV, S
ASEL, R, LOC, Y, 2*gap
DA, ALL, VOLT, 0 ! Cathode plane without strips
VSEL,S,,,29
ASLV, S
ASEL, R, LOC, X, +pitch/2
DA, ALL, SYMM ! Continuity
VSEL,S,,,29
ASLV, S
ASEL, R, LOC, Z, -l/2
DA, ALL, SYMM ! Continuity
VSEL,S,,,29
ASLV, S
ASEL, R, LOC, Z, +l/2
DA, ALL, SYMM ! Continuity
VSEL,S,,,28
ASLV, S
ASEL, R, LOC, Y, -sub
DA, ALL, VOLT, 0 ! Backplane
! Meshing
VSEL, ALL
ASLV, S
MSHKEY,0
SMRT, 6
VMESH, 29
! Display the solution
/POST1
/EFACET,1
PLNSOL, VOLT,, 0
! Write the solution to files
/OUTPUT, PRNSOL, lis
PRNSOL
/OUTPUT
/OUTPUT, NLIST, lis
NLIST,,,,COORD
/OUTPUT
/OUTPUT, ELIST, lis
ELIST
/OUTPUT
/OUTPUT, MPLIST, lis
MPLIST
/OUTPUT
附上结构图
|
|