You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							44 lines
						
					
					
						
							1.1 KiB
						
					
					
				
			
		
		
	
	
							44 lines
						
					
					
						
							1.1 KiB
						
					
					
				'''
 | 
						|
Calculo de bending y stretching sobre datos en una circunferencia (se asume equiespaciamiento angular)
 | 
						|
Ultima Fecha Modificacion: 30/03/25
 | 
						|
'''
 | 
						|
 | 
						|
# %% LIBRERIAS
 | 
						|
 | 
						|
import numpy as np
 | 
						|
import matplotlib.pyplot as plt
 | 
						|
import Codigo2D_Base as c7
 | 
						|
import Codigo2D_AjusteHelfrich as c8
 | 
						|
 | 
						|
# %% CONSTANTES
 | 
						|
kb = 1.380649e-23  # J/K
 | 
						|
 | 
						|
# %% FUNCION TEORICA
 | 
						|
def fx(x, stretch, bend, T):
 | 
						|
    kbT = kb * T
 | 
						|
    y = kbT * (0.5 / stretch) * ((1 / x) - (stretch / bend + x**2) ** -0.5)
 | 
						|
    return y
 | 
						|
 | 
						|
# %% CODIGO
 | 
						|
def calculatecoefs(MSph, nmin, nmax, T):
 | 
						|
    """
 | 
						|
    Se utiliza el método de trapecios
 | 
						|
    """
 | 
						|
 | 
						|
    qx, u = c7.f2(MSph, 21, positive="Yes")  # TODOS LOS COEFICIENTES (U) del 1 al 20
 | 
						|
 | 
						|
    # El bending solo se calcula para ciertos modos
 | 
						|
    qxnew = qx[nmin:nmax]
 | 
						|
    unew = u[nmin:nmax]
 | 
						|
 | 
						|
    bend, stretch = c8.aproxHelfrich(qxnew, unew, T)
 | 
						|
    qxcont = np.linspace(qxnew[0], qxnew[-1], 100)
 | 
						|
    Ycont = fx(qxcont, stretch, bend, T)
 | 
						|
 | 
						|
    kbT = kb * T
 | 
						|
    print("----------------")
 | 
						|
    print(f"Para modos entre {nmin+1} y {nmax+1} se obtiene:")
 | 
						|
    print("Bending (en uds kbT): ", bend / kbT)
 | 
						|
    print("Stretching [N/m]: ", stretch)
 | 
						|
 | 
						|
    return qx, u, qxcont, Ycont, bend, stretch
 | 
						|
 |