<jupyter_start><jupyter_text>Electrostatic Force  , $  F = K\frac{q_1 q_2} {r^2}  $ Electrostatic Potential  , $  V = K\frac{q_1} {r}  $ Elecrostatic Intensity  , $  E = K\frac{q_1} {r^2}  $<jupyter_code>class Coulomb():
    def __init__ (self,K,q1,q2):
        self.K = K
        self.q1 = q1
        self.q2 = q2
        
    def Force(self,r):
        F = self.K*self.q1*self.q2/r**2
        return F
    def Potential(self,r):
        V = self.K*self.q1/r
        return V
    def Intensity(self,r):
        E = self.K*self.q1/r**2
        return E
C1 = Coulomb(K = 9*10e9, q1 = 1e-9, q2 = 1e-15)
q1 = 1e-9
q2 = 1e-15
R = [] # empty list to collect Distance
F = [] # empty list to collect Force
V = [] # empty list to collect Potential
E = [] # empty list to collect Intensity
for r in range(1,10000):
    ff = C1.Force(r)
    vv = C1.Potential(r)
    ee = C1.Intensity(r)
    R.append(r)
    F.append(ff)
    V.append(vv)
    E.append(ee)
import matplotlib.pyplot as plt
%matplotlib inline
plt.figure(figsize = [15,13])

plt.subplot(2,2,1)
plt.plot(R,F,label = 'force')
plt.plot(R,V,label = 'potential')
plt.plot(R,E,label = 'intensity')
plt.legend()
plt.xlabel('r')
plt.ylabel('F,V,E')

plt.subplot(2,2,2)
plt.semilogy(R,F,label = 'force')
plt.semilogy(R,V,label = 'potential')
plt.semilogy(R,E,label = 'intensity')
plt.legend()
plt.xlabel('r')
plt.ylabel('lnF,lnV,lnE')

plt.subplot(2,2,3)
plt.loglog(R,F,label = 'force')
plt.loglog(R,V,label = 'potential')
plt.loglog(R,E,label = 'intensity')
plt.xlabel('r')
plt.ylabel('lnF,lnV,lnE')

data = {} # empty dictionary
data.update({"Distance": R, "Force": F, "Potential": V , "Intensity": E})

import pandas as pd
DF = pd.DataFrame(data)
DF
DF.to_csv('FVE.csv')

df=pd.read_csv('FVE.csv')
df.head()
    
plt.semilogy(df.Distance,df.Force)
plt.semilogy(df.Distance,df.Potential)
plt.semilogy(df.Distance,df.Intensity)
plt.semilogy(df.Distance,df.Force,'r')
plt.semilogy(df.Distance,df.Potential,'g')
plt.semilogy(df.Distance,df.Intensity,'b')
plt.loglog(df.Distance,df.Force,'r')
plt.loglog(df.Distance,df.Potential,'g')
plt.loglog(df.Distance,df.Intensity,'b')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1865671641791045, 'fraction_numerical': 0.02751865671641791, 'mean_word_length': 3.8529411764705883, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '552512', 'license': 'MIT', 'n_tokens_mistral': 1001, 'n_tokens_neox': 921, 'n_words': 161, 'path': 'Class/Electrostatic Circle/Electrostatic Circle .ipynb', 'repo_name': 'Sabin63/Python-Jupyter_Notebook', 'size': '2144'}