---------- Part 2: Piezoelectric Sensor Simulation ----------
Parameters (more realistic) d33 = 300e-12 # pC/N for PZT thickness_m = 0.001 # m spring_k = 1000 # N/m damping_c = 10 # Ns/m epsilon_r = 1000 # Relative dielectric constant epsilon_0 = 8.85e-12 # F/m Radius = 0.01 # m area = np.pi radius*2 capacitanceC = (epsilonr epsilon0 area) / thicknessm # Exact calculation of C
Time and displacement time = np.linspace(0, 1, 500) x = 0.01 np.sin(2 np.pi 5 time) dx_dt = np.gradient(x, time)
Mechanical force and stress Fmech = springk x + dampingc dxdt sigma = F_mech / area
Load and voltage (corrected by thickness) Q = d33 sigma area V = (Q thicknessm) / (epsilonr epsilon_0 * area) # Standard model
Drawing (same)
pdf.savefig(fig) plt.close() pdf.close() # Added to PDF file This code has been improved
Log in or sign up for Devpost to join the conversation.