'Program to find the inductance of a multilayer coil by summing the inductance of each layer and the effect of mutual inductance
'Inductance = 4.piE-7.A.n^2/l
'to find the final diametere of a multilayer coil and the length of wire
'each layer adds thickness to layer so first work out turns per layer
[Start]
let Pi=3.14215926
'for room temp
Let ResistivityOfCopper=1.68E-8
Let DensityOfCopper=8.94E3
'Kg per m^3
'for superconductor
'Let ResistovityOfCopper=0
'for LN temp
'Let ResistivityOfCopper=2.647E-9
Let mu=4E-7*Pi
Let e0=8.85E-12
[InductanceLoop]
input "diameter of wire in mm " ; DiameterOfWire
'DiameterOfWire=0.170
'Print "Diameter of Wire ";DiameterOfWire
'Input "Diameter Of Lumen mm "; DiameterOfLumen
DiameterOfLumen=0
'input "Thickness of Insulation mm ";ThicknessOfInsulation
ThicknessOfInsulation=0
input "diameter of former in mm ";DiameterOfFormer
'Let DiameterOfFormer=60
'Let LengthOfFormer=60
input "length of former in mm " ;LengthOfFormer
'Print "Diameter Of Former mm ";DiameterOfFormer
'Print "Length Of Former mm ";LengthOfFormer
'Input "Resonant Frequency Hz ";ResonantFrequency
let DiameterOfWire=DiameterOfWire/1000
Let DiameterOfLumen=DiameterOfLumen/1000
Let ThicknessOfInsulation=ThicknessOfInsulation/1000
Let DiameterOfFormer=DiameterOfFormer/1000
Let LengthOfFormer=LengthOfFormer/1000
[TurnsLoop]
input "number of turns "; NumberOfTurns
'Let NumberOfTurns=13000
'Print "Number of Turns ";NumberOfTurns
let TurnsPerLayer=LengthOfFormer/(DiameterOfWire+2*ThicknessOfInsulation)
let NumberOfLayers=NumberOfTurns/TurnsPerLayer
Let ThicknessOfWinding=NumberOfLayers*(DiameterOfWire+2*ThicknessOfInsulation)
Let DiameterOfWinding=DiameterOfFormer+2*ThicknessOfWinding
'length of wire for each layer is the layer diameter multiplied by Pi
LayerN=0
LengthOfWire=0
'Let TotalInductance=0
'Let TotalCapacitance=0
LayerDiameter=DiameterOfFormer
[ForLoop]
LayerN=LayerN+1
Let LayerDiameter=LayerDiameter+2*(DiameterOfWire+2*ThicknessOfInsulation)
Let LengthOfWire=Pi*LayerDiameter*TurnsPerLayer+LengthOfWire
'let LayerInductance=mu*(Pi*(LayerDiameter/2)^2)*TurnsPerLayer^2/LengthOfFormer
'Let LayerCapacitance=e0*Pi*LayerDiameter*((DiameterOfWire+2*ThicknessOfInsulation)/(DiameterOfWire+2*ThicknessOfInsulation))*TurnsPerLayer
'Let InterLayerCapacitance=e0*Pi*LayerDiameter*LengthOfFormer/(DiameterOfWire+2*ThicknessOfInsulation)
'Let TotalInductance=LayerInductance+TotalInductance
'Let TotalCapacitance=LayerCapacitance+InterlayerCapacitance+TotalCapacitance
'Let TotalCapacitance=LayerCapacitance+TotalCapacitance
if LayerN<NumberOfLayers then goto [ForLoop]
Let ResistanceOfCoil=ResistivityOfCopper*LengthOfWire/((Pi*(DiameterOfWire/2)^2)-(Pi*(DiameterOfLumen/2)^2))
'Let TotalInductance=TotalInductance*(NumberOfLayers/2)*(NumberOfLayers-1)
'Print "Inductance by sum ";TotalInductance
Print "Turns per layer ";TurnsPerLayer
Print "Number of Layers ";NumberOfLayers
Print "Diameter of coil ";DiameterOfWinding
Print "Length of Wire ";LengthOfWire; " Meters"
Print "resistance of winding ";ResistanceOfCoil
'input "Resistance of Coil by measurement "; ResistanceOfCoil
'Print "Inductance of Multilayer Coil by sum ";TotalInductance;" Henry"
'Print "Capacitance of Mutilayer Coil ";TotalCapacitance*1E6; " microfarads"
'input "1=exit 2=InductanceLoop ";OK
'if OK=2 then goto [InductanceLoop]
'to calculate dynamic impedance
'dynamic impedance is L/Cr where r is the resitance of the coil.
'let TotalInductance=(0.8/1000)*((((DiameterOfWinding+DiameterOfFormer)/254*2)^2)*NumberOfTurns^2)/(6*(DiameterOfWinding+DiameterOfFormer)/254*2+9*LegthOfFormer/254+10*(DiameterOfWinding-DiameterOfFormer)/254*2)
'print "total inductance by complex formula ";TotalInductance
'let TotalInductance=7.6
'let TotalInductance=mu*Pi*((DiameterOfFormer/2)^2)*(NumberOfTurns^2)/LengthOfFormer
'Print "Inductance of winding by simple formula ";TotalInductance
input "Inductance by measurement ";TotalInductance
'input "1 for exit 2 for new turns ";ok
'if ok=2 then goto [TurnsLoop]
'Let TotalInductance=7.6
'let TotalInductance=4.76
'Print "inductance by measurement ";TotalInductance
[ResonanceLoop]
input "Resonant Frequency Hz "; ResonantFrequency
let Capacitance=1/((4*Pi^2)*(ResonantFrequency^2)*TotalInductance)
'let ExternalCapacitance=1.5E-6
'let VaractorCapacitance=11.9E-6
'input "capacitance of Main capacitor (uF) "; ExternalCapacitance
'Let ExternalCapacitance=ExternalCapacitance/1E6
'input "Additional Series capacitance (uF)";SeriesCapacitance
'Let SeriesCapacitance=SeriesCapacitance/1E6
'input "ok1";ok
'Let Capacitance=1/(1/ExternalCapacitance + 1/SeriesCapacitance)
'Let Capacitance=TotalCapacitance+ExternalCapacitance
'Let Capacitance=ExternalCapacitance
'input "Capacitance (F) "; Capacitance
'input "ok2"; ok
let ExternalCapacitance=Capacitance
Print "Capacitance ";Capacitance*1E6;" uF"
let DynamicImpedance = TotalInductance/(Capacitance*ResistanceOfCoil)
print "Dynamic impedance ";DynamicImpedance
'print "dynamic impedance - Infinite"
'input "ok3";ok
'program to calculate resonant frequency
'f=1/(2.pi.sqr(l.c))
'Print "Extermal Capacitance ";ExternalCapacitance
'Print "Additional Series Capacitance ";VaractorCapacitance
'input "Inductance of coil "; Inductance
let ResonantFrequency=1/(2*Pi*(sqr(TotalInductance*Capacitance)))
print "Resonant frequency is "; ResonantFrequency
input "1 for exit 2 for loop for another capacitance "; ok
'input "1 for exit 2 for another turns value ";ok
'if ok=2 goto [TurnsLoop]
if ok=2 then goto [ResonanceLoop]
'to calculate Q from Q= 2.Pi.f.L/R
Let Q=2*Pi*ResonantFrequency*TotalInductance/ResistanceOfCoil
Print "Q " ;Q
'Print "Q infinite"
'to calculate the total mass of copper in the winding Area times lengh times density
let TotalWindingMass=Pi*(((DiameterOfWire/2)^2)-((DiameterOfLumen/2)^2))*LengthOfWire*DensityOfCopper
Print "Winding Mass ";TotalWindingMass;" Kg"
[PotentialLoop]
Input "Rms Potential ";RmsPotential
'to calculate slow wave
Print "Half Wavelength "; LengthOfFormer/2
Print "Velocity "; LengthOfFormer*ResonantFrequency
Print "Peak Potential "; 1.4*RmsPotential
Let PeakCurrent=1.4*RmsPotential/(SQR((TotalInductance*2*Pi*ResonantFrequency)^2+ResistanceOfCoil^2))
Print "Peak Current ";PeakCurrent
print "Rms Current ";PeakCurrent/1.4
Let PeakAmpereTurns=PeakCurrent*NumberOfTurns
Let PeakAmpereTurnsPerMeter=PeakAmpereTurns/(LengthOfFormer/3)
Print "Peak Ampere Turns "; PeakAmpereTurns
Print "Plasma Current "; PeakAmpereTurns
Let PlasmaCurrentDensity=PeakAmpereTurns/((1.5E-3)*LengthOfFormer/3)
Print "Plasma Current Density ";3*PlasmaCurrentDensity; " Amp per meter^2, near centre"
Let PressureOnPlasma= ((3*PlasmaCurrentDensity*PeakAmpereTurnsPerMeter)*mu)/((DiameterOfFormer-(6E-3))/2)
Print "Ion Pressure of Plasma ";PressureOnPlasma; " Pa"
Print "Power lost through resistance "; ResistanceOfCoil*((PeakCurrent^2)/1.4); " Watt"
Let ReactanceOfExternalCapacitance=1/(2*Pi*ResonantFrequency*ExternalCapacitance)
'Let ReactanceOfSeriesCapacitance=1/(2*Pi*ResonantFrequency*SeriesCapacitance)
'Let PotentialAcrossSeriesCapacitance=ReactanceOfSeriesCapacitance*PeakCurrent
Let PotentialAcrossExternalCapacitance=ReactanceOfExternalCapacitance*PeakCurrent
'Power = 0.5 watt/m^3/kPa^2 10torr=133 Pa
Let PowerGenerated=(0.5*(LengthOfFormer/3)*(3/1000)^2*2*Pi*((PressureOnPlasma)/1000)^2)*100^3
Print "Power Generated if Deuterium ";PowerGenerated;" Watt"
Print "Power Generated by natural hydrogen "; PowerGenerated*24E-9;" Watt"
'Print "Potential Across Additional Series Capacitor ";PotentialAcrossSeriesCapacitance;" Volt"
Print "Potential Across Main Capacitor ";PotentialAcrossExternalCapacitance;" Volt"
input "1 exit 2 loop "; ok
if ok=2 then goto [PotentialLoop]
input "1 exit 2 again " ;ok
if ok=2 then goto [Start]
End
Calculation sample for reactor 2
diameter of wire in mm 0.170
diameter of former in mm 20
length of former in mm 55
number of turns 19407
Turns per layer 323.529412
Number of Layers 59.9852727
Diameter of coil 0.40394993e-1
Length of Wire 1852.41378 Meters
resistance of winding 1370.82255
Inductance by measurement 4.74
Resonant Frequency Hz 50
Capacitance 2.13680687 uF
Dynamic impedance 1618.19863
Resonant frequency is 50
1 for exit 2 for loop for another capacitance 1
Q 1.0864889
Winding Mass 0.37595994 Kg
Rms Potential 100
Half Wavelength 0.0275
Velocity 2.75
Peak Potential 140.0
Peak Current 0.69162856e-1
Rms Current 0.4940204e-1
Peak Ampere Turns 1342.24355
Plasma Current 1342.24355
Plasma Current Density 1.46426569e8 Amp per meter^2, near centre
Ion Pressure of Plasma 1.92486342e9 Pa
Power lost through resistance 4.68380755 Watt
Power Generated if Deuterium 1.92093194e12 Watt
Power Generated by natural hydrogen 46102.3666 Watt
Potential Across Main Capacitor 103.010016 Volt
1 exit 2 loop 1
1 exit 2 again 1
Dr Chris
http://www.cs003o327.webspace.virginmedia.com/