The document describes a Fortran 90 program that simulates an oscillator. It defines variables like arrays to store time, position, and velocity values. It initializes the oscillator at t=0.1, x=0.3, and y=0.1. In a loop, it calculates the next time step and updates position and velocity values based on the oscillator equations. The values are written to a file and screen at each step. Graphs are shown of position vs time for different values of the Z parameter, showing the oscillator behavior changes as Z increases above 1.
1 of 5
Downloaded 12 times
More Related Content
Oscilador de duffing forzado - coficacin en fortran 90
1. Jose Luis Leon Aguirre
Cdigo fortran 90
PROGRAM OSCILADOR
INTEGER::I
REAL::X(10000),Y(10000),T(100000),H,E,F,Z
OPEN(1,FILE='DATA4.TXT')
X(0)=0.3
Y(0)=0.1
T(0)=0.1
H=0.01
E=1.0
F=1.3
Z=0.6
DO I=1,10000
T(I+1)=T(I)+H
Y(I+1)=Y(I)+(-X(I)-E*(X(I)**3)+F*SIN(Z*T(I)))*H
X(I+1)=X(I)+Y(I)*H
WRITE(*,*)T(I),X(I),Y(I)
WRITE(1,*)T(I),X(I),Y(I)
END DO
END