P

@profecamor

Análisis experimental de un MRU

Python
1 year ago
import matplotlib.pyplot as plt import numpy as np # Datos proporcionados tiempos = np.array([0, 3.22, 5.87, 8.83, 11.63, 14.39, 17.19, 19.76, 22.94, 25.92, 29.13, 32.17]) distancias = np.array([0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44]) # Calcular las velocidades promedio por tramo velocidades = (distancias[1:] - distancias[:-1]) / (tiempos[1:] - tiempos[:-1])

Péndulo doble con 2 resortes

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt # Parámetros g = 9.81 # aceleración debido a la gravedad (m/s^2) m1 = 0.1 # masa del primer péndulo (kg) m2 = 0.1 # masa del segundo péndulo (kg) k1 = 10 # constante del resorte entre los dos péndulos k2 = 10 # constante del resorte entre el primer péndulo y el soporte

QUADRATIC FRICTION - Magnitude of the radius vector as a function of time - RK4

Python
1 year ago
#To run the program with greater precision, for example with dt=0.0001, #it is recommended to run this file in JupyterLab. import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi, sqrt # Parámetros constantes m = 1 # masa en kg b = 0.1 # coeficiente de arrastre g = 9.81 # aceleración debida a la gravedad

QUADRATIC FRICTION - Toltal Energy - RK4

Python
1 year ago
#To run the program with greater precision, for example with dt=0.0001, #it is recommended to run this file in JupyterLab. import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros constantes m = 1 # masa en kg b = 0.1 # coeficiente de arrastre g = 9.81 # aceleración debida a la gravedad

QUADRATIC FRICTION - Potential Energy - RK4

Python
1 year ago
#To run the program with greater precision, for example with dt=0.0001, #it is recommended to run this file in JupyterLab. import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m = 1 # masa kg b = 0.1 # coeficiente de arrastre g = 9.81 # gravedad

QUADRATIC FRICTION - Kinetic Energy - RK4

Python
1 year ago
#To run the program with greater precision, for example with dt=0.0001, #it is recommended to run this file in JupyterLab. import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m = 1 # masa kg b = 0.1 # coeficiente de arrastre g = 9.81 # gravedad

QUADRATIC FRICTION - Trajectories - RK4

Python
1 year ago
#To run the program with greater precision, for example with dt=0.0001, #it is recommended to run this file in JupyterLab. import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros constantes m = 1 # masa en kg b = 0.1 # coeficiente de arrastre g = 9.81 # aceleración debida a la gravedad

Chaos in SAM - Poincaré Secction.

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt from decimal import Decimal, getcontext # Establecer precisión a 30 decimales getcontext().prec = 30 # Parameters g = 9.81 # acceleration due to gravity (m/s²) mu = 1.1 # reduced mass

Energy - double pendulum

Python
1 year ago
def ET(l1, l2, m1, m2, th1, th2, o1, o2, g): # Energía cinética T1 = 0.5*m1*(l1**2)*(o1**2) T2 = 0.5*m2*(l1**2*o1**2 + l2**2*o2**2 + 2*l1*l2*o1*o2*np.cos(th1 - th2)) # Energía potencial U1 = -m1*g*l1*np.cos(th1) U2 = -m2*g*(l1*np.cos(th1) + l2*np.cos(th2)) # Energía total

Chaos in SAM - Graphics

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt from decimal import Decimal, getcontext # Establecer precisión a 30 decimales getcontext().prec = 40 # Parameters mu = 16 # reduced mass

Chaos in a double pendulum - Bifurcation Diagrams

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt # Parameters g = 9.81 # aceleración debido a la gravedad (m/s^2) l1 = 0.2 # longitud del primer péndulo (m) l2 = 0.5 # longitud del segundo péndulo (m) m1 = 0.2 # masa del primer péndulo (kg) m2 = 0.3 # masa del segundo péndulo (kg)

Chaos in a double pendulum - Poincaré Secction.

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt # Parameters g = 9.81 # aceleración debido a la gravedad (m/s^2) l1 = 0.24 # longitud del primer péndulo (m) m1 = 1.5753 # masa del primer péndulo (kg) l2 = 0.137 # longitud del segundo péndulo (m) m2 = 0.5753 # masa del segundo péndulo (kg)

QUADRATIC FRICTION - Safety parabola - RK4

Python
1 year ago
#To run the program with greater precision, for example with dt=0.0001, #it is recommended to run this file in JupyterLab. import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parameters m = 1 # mass kg b = 0.1 # drag coefficient g = 9.81 # acceleration due to gravity

QUADRATIC FRICTION - Graphs - Runge-Kutta 4 METHOD

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parameters m=1 # mass kg b=0.5 # drag coefficient g=9.81 # acceleration due to gravity te=60*pi/180 # angle vo=100 # initial velocity m/s

QUADRATIC FRICTION - Runge-Kutta 4 METHOD

Python
1 year ago
import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parameters m=1 # mass kg b=0.5 # drag coefficient g=9.81 # acceleration due to gravity te=60*pi/180 # angle vo=100 # initial velocity m/s

Oscilación radial - Método de Euler

Python
1 year ago
#QUADRATIC FRICTION - EULER METHOD (Security parable) import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m=1 # masa kg b=0.1 # coeficiente de arrastre g=9.81 # aceleración debido a la gravedad vo=100 # velocidad m/s

Time of flight as a function of angle - Heun

Python
1 year ago
#Time of flight as a function of angle - Heun import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m=1 # masa b=0.1 # coeficiente de fricción g=9.81 # gravedad vo=100 # velocidad m/s

QUADRATIC FRICTION - HEUN METHOD (Security parable)

Python
1 year ago
#QUADRATIC FRICTION - HEUN METHOD (Security parable) import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m=1 # masa b=0.1 # coeficiente de fricción g=9.81 # gravedad vo=100 # velocidad m/s

QUADRATIC FRICTION - HEUN METHOD

Python
1 year ago
#QUADRATIC FRICTION - HEUN METHOD import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m=1 # masa b=0.1 # coeficiente de fricción g=9.81 # gravedad θ=60*pi/180 #angulo

QUADRATIC FRICTION - EULER METHOD (Security parable)

Python
1 year ago
#QUADRATIC FRICTION - EULER METHOD (Security parable) import numpy as np import matplotlib.pyplot as plt from math import cos, sin, pi # Parámetros m=1 # masa kg b=0.1 # coeficiente de arrastre g=9.81 # aceleración debido a la gravedad vo=100 # velocidad m/s