27 lines
1019 B
Python
27 lines
1019 B
Python
#in V
|
|
data_10g = [0.412, 0.284, 0.360, 0.548, 0.280, 0.304, 0.380, 0.312, 0.278, 0.444]
|
|
data_20g = [0.960, 0.960, 0.992, 0.968, 0.936, 0.952, 1.160, 1.200, 1.010, 1.000]
|
|
data_50g = [1.180, 2.020, 1.120, 1.260, 1.240, 1.580, 1.140, 2.340, 1.700, 1.060]
|
|
data_100g = [4.080, 5.280, 5.160, 5.080, 3.520, 4.280, 4.800, 5.120, 4.400, 4.240]
|
|
|
|
# in kg
|
|
weights = [0.010, 0.020, 0.050,0.100]
|
|
|
|
# in pC/V
|
|
k_L = 2e-10
|
|
|
|
# calculate d33 in C/N
|
|
def calculate_d33(voltage_list, weight):
|
|
charge_list = [(voltage) * k_L for voltage in voltage_list]
|
|
charge_list = [charge * 0.5 for charge in charge_list]
|
|
pC_charges=[charge * 1e12 for charge in charge_list]
|
|
return (sum(pC_charges) / len(pC_charges)) / (weight * 9.81)
|
|
|
|
# calculate d33 per weight list (mittelwert)
|
|
def calculate_d33_for_weights():
|
|
d33_list = [calculate_d33(data_10g, 0.010), calculate_d33(data_20g, 0.020), calculate_d33(data_50g, 0.050), calculate_d33(data_100g, 0.100)]
|
|
return (sum(d33_list) / len(d33_list))
|
|
|
|
print(calculate_d33_for_weights())
|
|
|