* Alternating Circuit is a simple L and C lossless oscillating circuit. * Modify this so the change in permittivity is what is in a gravity field. * Also test Planck's equation to see if energy and frequency track the equation. * The code has not been added yet. 9/20/2022 * We will impose a varying permittivity and permeability on the circuit. * VOLTAGE, CURRENT, ENERGY IN C, ENERGY IN L, TIME IN SECONDS, DELTA TIME STEP * CAPACITANCE, INDUCTANCE, DELTA V, DELTA V OLD, PERIOD OF ONE AC SWING, ENERGY, CURRENT MAX REAL*8 V,I,IM,EC,EC0,EL,T,DT,C,L,DV,DVO,TP,E,DL,DC PRINT *,'AN LC CIRCUIT IS LOWERED TO A LOWER GRAVITY POTENTIAL' PRINT *,'ENTER DELTA L AND DELTA C MULTIPLIERS TO SEE THE EFFECT' PRINT *,'WE ARE TESTING TO SEE IF GRAVITY IS MORE CONSISTENT WITH' PRINT *,'PERMITTIVITY OR PERMITTIVITY CHANGING.' V=1. T=0. DT=.0001 C=1. * DC=1.000001 ! LET THE CAPACITANCE SLOWLY INCREASE AS WE ENTER A HIGHER PERMITTIVITY REGION WRITE(*,*)'ENTER DC MULTIPLIER, 1 IS NO CHANGE, 1.00001 SLOW INCR' READ *,DC L=.01 WRITE(*,*)'ENTER DL MULTIPLIER, 1 IS NO CHANGE, 1.00001 SLOW INCR' READ *,DL I=0. TP=0. DVO=0. ! START OUT AS NEITHER INCREASING NOR DECREASING DV=0. IM=0. WRITE(*,*)' V C EC I EL ', &'SEC HZ' 1 DVO=DV I=I+V*DT/L IF(ABS(I).GT.IM) THEN IM=DABS(I) EL=.5*L*IM**2 ENDIF EC=.5*C*V*V IF(T.LE.0.) WRITE(*,'(10F10.6)') V,C,EC,IM,EL DV=-I*DT/C V=V+DV T=T+DT IF(DVO.GT.0..AND.DV.LT.0..AND.TP.LE.0.) TP=T ! CAPTURE THE FIRST AC WAVE PERIOD IF(TP.LE.0.) GOTO 1 WRITE(*,'(10F10.6)') V,C,EC,IM,EL,T,1/TP EC0=EC ! remember the initial energy in the capacitor F0=1/TP ! remenber the initial frequency TP=0. T=0. 2 DVO=DV L=L*DL C=C*DC ! WE LET THE CAPACITANCE CHANGE A SMALL AMOUNT V=V/DC ! TO HOLD CHARGE CONSTANT AS THE CAPACITANCE CHANGES OVER THE TIME STEP I=I+V*DT/L IF(ABS(I).GT.IM) THEN IM=DABS(I) EL=.5*L*IM**2 ENDIF EC=.5*C*V*V DV=-I*DT/C V=V+DV T=T+DT IF(DVO.GT.0..AND.DV.LT.0..AND.TP.LE.0.) TP=T ! CAPTURE THE FIRST AC WAVE PERIOD IF(TP.LE.0.) GOTO 2 WRITE(*,'(10F10.6)') V,C,EC,IM,EL,T,1/TP IF(1/TP.GE.1.) THEN T=0. TP=0. IM=0. GOTO 2 ENDIF PRINT *,'RATIOS OF ENERGY CHANGE AND FREQUENCY CHANGE' WRITE(*,'(19H ENERGY RATIO =,F20.6)') EC0/EC WRITE(*,'(19H FREQUENCY RATIO =,F20.6)') F0/(1/TP) WRITE(*,'(19H ENERGY/FREQUENCY =,F20.6)') (EC0/EC)/(F0/(1/TP)) STOP END