## General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

#### ansys piezoelectric simulation help

• Caterina Azais
Subscriber

Hi everyone!

I am new to ansys and have been really struggling to get my code working.... I want to simulate the voltge output of a dielectic material under a uniform pressure acting on the top lectrode. Can someone please please please help me? Thanks !

! Geometry
l = 5e-3 ! beam length, m
w = 5e-3 ! electrode width, m
t = 100e-6 ! thickness, m

! Material properties
Y = 140e9 ! Young modulus, Pa
mu=0.358 ! Poisson ratio (nearly incompressible rubber)
eps=8.17 ! electrical permittivity, relative
eps0=8.854e-12 ! free-space permittivity, F/m

/VUP,1,z
/VIEW,1,1,1,1

/PREP7
ET, 1, 5, 3

! == Material parameters
! -- Elastic coefficients, MPa
c11 = 209.71e9
c12 = 121.14e9
c13 = 105.36e9
c33 = 210.9e9
c44 = 42.5e9
c66 = 44.28e9

tb,ANEL,1
tbdata, 1, c11, c12, c13
tbdata, 7, c11, c13
tbdata, 12, c33
tbdata, 16, c66
tbdata, 19, c44
tbdata, 21, c44

! -- Piezoelectric coefficients, pC/um2
e13 = -0.61
e33 = 1.14
e15 = -0.59

tb,PIEZ,1
tbdata, 3, e13
tbdata, 6, e13
tbdata, 9, e33
tbdata,14, e15
tbdata,16, e15

! -- Dielectric constants
emunit,EPZRO,8.854e-6 ! pF/um
mp,PERx,1, 7.57
mp,PERy,1, 7.57
mp,PERz,1, 8.31

! -- model and mesh block
block,-l/2,l/2,-w/2,w/2,0,t

! Set the merging tolerance (adjust as needed)
KETOL = 1.0e-5
vmesh,1

! Structural BC - fix the displacement of bottom face
nsel,s,loc,x,-l/2
d,all,ux,0
nsel,r,loc,y,-w/2
d,all,uy,0
nsel,r,loc,z,0
d,all,uz,0
nsel,all

! Electrical BC
nsel,s,loc,z,0
nsel,r,loc,x,-l/2,l/2
nsel,r,loc,y,-w/2,w/2
cp,1,volt,all
ng=ndnext(0) ! ground node

nsel,all
nsel,s,loc,z,t
cp,2,volt,all
nsel,all

/SOLU
antype,static
cnvtol,f,1,1.e-6
cnvtol,amps,1,1.e-6
cnvtol,volts,1,1.e-6
d,ng,volt,0 !put ground node to zero volts
nsel,s,loc,z,t
nsel,r,loc,x,-l/2,l/2
nsel,r,loc,y,-w/2,w/2
sf,all,PRES,0  !apply pressure

nsel, all
solve
fini

/POST1
nsel,all
pldisp,1 ! display deformed/undeformed shape
andscl ! animate deformed/undeformed shape
nsel,s,loc,x,l/2
nd=ndnext(0) ! pick node for display
nsel,r,node,,nd
prnsol,epel ! print strain
prnsol,volt ! print voltage
nsel,all
fini

• Erik Kostson
Ansys Employee

Hi

The restrains, do not seem to be very well defined perhaps – but one issue is the pressure load (sf) sf,all,PRES,0 applies a 0 pressure which is not what one uses as a load (zero loads), and it applies it to the sides as well as the top –

so go through the command reference (e.g., sf command) and some simple apdl examples and then try to understand what you want to do and then how to do it using apdl – I would suggest to do this in workbench, where it is much easier.

SF (ansys.com)

Finally go through one of our courses:

If you are not able to open the links, refer to this forum discussion: How to access the ANSYS Online Help

Guidelines for Posting on Ansys Learning Forum

Hope that helps

• Caterina Azais
Subscriber

thank you so much, that seems to be making much more sense now... I have changed the code as follows, however when i print the PRNSOL commands it says that the S, D, .. data are not available and hence its ignored. What is the problem? Thank you !

! Geometry
l = 5e-3 ! beam length, m
w = 5e-3 ! electrode width, m
t = 100e-6 ! thickness, m

! Material properties
Y = 140e9 ! Young modulus, Pa
mu=0.358 ! Poisson ratio (nearly incompressible rubber)
eps=8.17 ! electrical permittivity, relative
eps0=8.854e-12 ! free-space permittivity, F/m

/VUP,1,z
/VIEW,1,1,1,1

/PREP7
ET, 1, 5, 3

! == Material parameters
! -- Elastic coefficients, MPa
c11 = 209.71e9
c12 = 121.14e9
c13 = 105.36e9
c33 = 210.9e9
c44 = 42.5e9
c66 = 44.28e9

tb,ANEL,1
tbdata, 1, c11, c12, c13
tbdata, 7, c11, c13
tbdata, 12, c33
tbdata, 16, c66
tbdata, 19, c44
tbdata, 21, c44

! -- Piezoelectric coefficients, pC/um2
e13 = -0.61
e33 = 1.14
e15 = -0.59

tb,PIEZ,1
tbdata, 3, e13
tbdata, 6, e13
tbdata, 9, e33
tbdata,14, e15
tbdata,16, e15

! -- Dielectric constants
emunit,EPZRO,8.854e-6 ! pF/um
mp,PERx,1, 7.57
mp,PERy,1, 7.57
mp,PERz,1, 8.31

! -- model and mesh block
block,-l/2,l/2,-w/2,w/2,0,t

! Set the merging tolerance (adjust as needed)
KETOL = 1.0e-5
vmesh,1

! Structural BC
nsel,s,loc,z,0
d, all, volt, 0
d,all,ux,0
d,all,uy,0
d,all,uz,0
nsel,all

nsel,s,loc,z,t
NSEL,ALL
FINISH

/SOLVE
OUTPR,,LAST
/OUT,SCRATCH
SOLVE
FINISH
/POST1
/OUT,
PRNSOL,S,COMP
PRNSOL,EPEL,COMP
PRNSOL,EF,COMP
PRNSOL,D,COMP
• Erik Kostson
Ansys Employee

happy we could help.

See the video (post process) :