# Parameters electronDensity = 1.0 * 10**13 electronTemp = 1.0 cellCt = 2000.0 length = .5 injectRate = 7.12 * 10**13 timeStep = .01 #in ns # Quantities electronPlasFreq = 5.64 * 10**4 * electronDensity**(.5) debyeLength = 7.43 * 10**2 * electronTemp**(.5) * electronDensity**(-.5) cellSize = length / cellCt maxTimeStep = 1.0 / 2.0 / (electronPlasFreq * 10**(-9)) fluxTS = injectRate * 10**(-9) * timeStep oneStepDist = (electronTemp * 1.60217657 * 10**(-19) * 2 / ( 9.10938291*10**(-31) ) )**(.5) * 100 * timeStep * 10**(-9) # Output print "Electron Plasma Frequency: " print electronPlasFreq print print "Debye Length: " print ("%.4f" % debyeLength) print print "max time step: " print ("%.4f" % maxTimeStep) print print "flux rate: " print fluxTS print print "one step dist: " print oneStepDist print print "Cell Size: " print ("%.8f" % cellSize) if cellSize < .55*debyeLength: print "less than half of Debye length: SUCCESS" else: print "not less than half of Debye length: FAILURE" print
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question