<jupyter_start><jupyter_text>Universidade Federal do Rio Grande do Sul (UFRGS)   Programa de Pós-Graduação em Engenharia Civil (PPGEC)    PEC00144: Experimental Methods in Civil Engineering Estimating Young's Module through axial vibration frequency  ---_Prof. <NAME>, Dr.techn._ [(ORCID)](https://orcid.org/0000-0001-5640-1020)  _Porto Alegre, RS, Brazil_<jupyter_code># Importing Python modules required for this notebook
# (this cell must be executed with "shift+enter" before any other Python cell)

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>1. Theoretical background<jupyter_code>L = 1.00
n = 1024

x     =  np.linspace(0, L, n)
alpha =  np.linspace(0, 1, n)
beta  =  np.array([0.001, 0.1, 0.3, 0.5, 1.0, 2.0, 5.0, 10., 20., 50., 100.])

phi1  =  lambda x:  np.sin(np.pi*x/L/2)
phi2  =  lambda x:  x/L

eps1  =  lambda x: (np.pi/L/2)*np.cos(np.pi*x/L/2)
eps2  =  lambda x:  np.ones(x.shape)/L

f     =  np.empty((len(beta), len(alpha)))
fk    =  np.empty( len(beta) )
ak    =  np.empty( len(beta) )

plt.figure(1, figsize=(12,8), clear=True)

for kb, b in enumerate(beta):

    for ka, a in enumerate(alpha):

        phi  =  a*phi1(x) + (1 - a)*phi2(x)
        eps  =  a*eps1(x) + (1 - a)*eps2(x)

        V    =  np.trapz(eps**2, x)
        Tr   =  np.trapz(phi**2, x) + b*L

        f[kb,ka] =  L*np.sqrt(V/Tr)/2/np.pi
        
    ik     =  np.argmin(f[kb,:]) 
    fk[kb] =  f[kb,ik]
    ak[kb] =  alpha[ik]
    
    plt.semilogy(alpha, f[kb,:], lw=0.5)
    plt.semilogy(ak[kb], fk[kb], 'rx')

plt.semilogy(ak, fk, 'r', lw=2)
plt.grid(True)
plt.axis([0, 1, 1e-2, 4e-1])
plt.xlabel('alpha')
plt.ylabel('frequency by (1/L).sqrt(E/rho)')

2*np.pi*fk<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17586795674445077, 'fraction_numerical': 0.05008537279453614, 'mean_word_length': 3.136470588235294, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '326471', 'license': 'MIT', 'n_tokens_mistral': 840, 'n_tokens_neox': 769, 'n_words': 173, 'path': 'Youngs_module_estimation.ipynb', 'repo_name': 'AlvaritoMoscoso/PEC00144', 'size': '1767'}