Please try the listing below. In electrostatic analyses, one models/meshes the domain enclosing the electrodes (not the electrodes themselves). The electrodes are usually represented by voids in a mesh of the domain that encloses them. I didn't bother to add the INFIN111 elements (it's a little tedious - pardon me for getting cheap on you). You can increase the value of parameter d_dmn in successive runs until the value of the calculated capacitance stops changing significantly.
If memory serves, INFIN111 will not account for additional electrostatic energy of the infinite domain that extends beyond the boundaries of the SOLID122/123 mesh. So if you do use them, my second approach for assessing the capacitance would be, I believe, the more accurate way (divide the charge reaction on one of the electrodes by the applied voltage difference).
Cheers,
Bill
fini
/cle
/vie,1,1,1,1
/sys,del file*.png
/PREP7
C*** Plate dimensions (we'll assume this is in meters)
eps0=8.854e-12 ! FREE SPACE PERMITTIVITY
width = 0.1
height = 0.02
thickness = 0.003
separation = 0.002 !0.010
d_dmn = 0.010 ! DEPTH SURROUNDING DOMAIN EXTENDS BEYOND ELECTRODES
d_inf = 0.005 ! DEPTH OF INFINITE BOUNDARY ELEMENT MESH
esz = 0.003 ! MESH SIZE
V = 1 ! APPLIED VOLTAGE
C*** Configured for electrostatic analysis of 3D 8-node elements
ET,1,SOLID123
C*** Define infinite element
ET,2,111,2,1
C*** Material properties (relative dielectric constant in vacuum)
!MP,PERX,1,8.854e-12 ! THIS IS ABSOLUTE PERMITTIVITY IN MKS, WHICH WORKS OK, BUT...
MP,PERX,1,1 ! WE GENERALLY USE RELATIVE PERMITTIVITY INSTEAD
C*** Create your first plate
BLOCK,0,width,0,height,0,-thickness
cm,electrode1_a,area
C*** Create second plate
asel,none
BLOCK,0,width,0,height,separation,separation+thickness
cm,electrode2_a,area
C*** SURROUNDING DOMAIN
alls
cm,scrap1_v,volu
*get,xmin,kp,,mnloc,x
*get,xmax,kp,,mxloc,x
*get,ymin,kp,,mnloc,y
*get,ymax,kp,,mxloc,y
*get,zmin,kp,,mnloc,z
*get,zmax,kp,,mxloc,z
vsel,none
bloc,xmin-d_dmn,xmax+d_dmn,ymin-d_dmn,ymax+d_dmn,zmin-d_dmn,zmax+d_dmn
cm,scrap2_v,volu
alls
vsbv,scrap2_v,scrap1_v
C*** MESH
esiz,esz
vmes,all
C*** ELECTRODE VOLTAGE
da,electrode1_a,volt
da,electrode2_a,volt,V
fini
C*** SOLVE
/solu
alls
save
solv
fini
C*** POST PROCESS
/post1
set ! READ RESULTS INTO MADL DATABASE
etab,w,sene ! BASED ON ENERGY
ssum
*get,Wnet,ssum,,item,w
C1 = 2*Wnet/(V**2)
nsel,s,d,volt ! BASED ON CHARGE & VOLTAGE
fsum
*get,q,fsum,,item,chrg
c2 = q/v
C_nominal=eps0*(height*width)/separation ! NOMINAL FRINGE FREE VALUE
/tla,-0.35,0.90,Capacitance (ANSYS, energy) = %C1% Fd ! ANNOTATION
/tla,-0.35,0.85,Capacitance (ANSYS, Q/V) = %C2% Fd
/tla,-0.35,0.80,Capacitance (nominal fringe-free) = %C_nominal% Fd
alls ! CAPPED SECTION PLOTS
wpro,,,90
wpof,,,width/2
/type,1,7
/cpl,1
plns,volt
/sho,png $plns,volt $/sho,close $/wait,2
plve,ef,,,,vect,,on
/sho,png $plve,ef,,,,vect,,on $/sho,close $/wait,2
/eof