diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /24/DEPENDENCIES/electrostatics.sci | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '24/DEPENDENCIES/electrostatics.sci')
-rwxr-xr-x | 24/DEPENDENCIES/electrostatics.sci | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/24/DEPENDENCIES/electrostatics.sci b/24/DEPENDENCIES/electrostatics.sci new file mode 100755 index 000000000..ef708effe --- /dev/null +++ b/24/DEPENDENCIES/electrostatics.sci @@ -0,0 +1,16 @@ +//permitivity constant
+Eo = 8.85*10^-12 //in C^2/N.m^2
+//electric consatnt
+k = 1/(4*%pi*Eo)
+//charge on proton
+e = 1.6*10^-19 //in C
+
+//calculates coloumb force on two charged particle having charge q1, q2 seprated by distance equal to r
+function [F] = coulomb(q1, q2, r)
+ F = k*q1*q2/r^2
+endfunction
+
+//calculates the potential due to a particle having charge q at a distance d from the particle
+function [V] = EPotential(q, r)
+ V = k*q/r
+endfunction
\ No newline at end of file |