File:VFPt charged-sheet uniform-potential+contour.svg
Original file (SVG file, nominally 800 × 600 pixels, file size: 148 KB)
Captions
Summary
[edit]DescriptionVFPt charged-sheet uniform-potential+contour.svg |
English: Electric field lines around an infinite flat positively electrically charged sheet at uniform potential. The shape of the field is computed accurately. The charge distribution was computed on small segments of linear charge ramps, whose charge density was then computed by solving an equation system for the potential values. The background color map shows the electric potential together with equipotential lines. |
Date | |
Source | Own work |
Author | Geek3 |
Other versions | VFPt charged-sheet potential+contour.svg VFPt capacitor-infinite-plate uniform-potential+contour.svg |
SVG development InfoField | This plot was created with VectorFieldPlot. |
Source code InfoField | Python code# paste this code at the end of VectorFieldPlot 3.3
# https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot
doc = FieldplotDocument('VFPt_charged-sheet_uniform-potential+contour',
width=800, height=600, commons=True)
P0, P1 = array((-2, 0.)), array((2, 0.))
N = 20
def stretch(x):
#return sc.tanh(5 * x) / sc.tanh(5)
return (315*x - 420*x**3 + 378*x**5 - 180*x**7 + 35*x**9) / 128
points = P0 + sc.outer((stretch(sc.linspace(-1, 1, N)) + 1) / 2, P1 - P0)
lengths = array([vabs(points[i+1] - points[i]) for i in range(N - 1)])
weights = [0.5 * (vabs(points[i] - points[max(0, i-1)]) + vabs(points[min(i+1, len(points)-1)] - points[i])) for i in range(len(points))]
# compute surface charges
def Efield(points, charge_densities):
charge_fields = []
for ip in range(len(points) - 1):
p0, p1 = points[ip:ip+2]
l = vabs(p1 - p0)
q0, q1 = charge_densities[ip] * l/2, charge_densities[ip+1]*l/2
if (q0, q1) != (0., 0.):
charge_fields.append(['charged_ramp', {'q0':q0, 'q1':q1,
'x0':p0[0], 'y0':p0[1], 'x1':p1[0], 'y1':p1[1]}])
return charge_fields
# probe potential at each segment at several points
testpoints = interpolate.interp1d(sc.linspace(0, 1, len(points)),
points, axis=0)(sc.linspace(0, 1, 4 * (len(points) - 1) + 1))
Nt = len(testpoints)
M = sc.zeros((Nt + 1, N))
for ic in range(N):
charge_fields = Efield(points, sc.eye(1, N, ic).flatten())
Fi = Field(charge_fields)
for it in range(Nt):
M[it, ic] = Fi.V(testpoints[it])
U_mean = sc.mean(M[:Nt,:], axis=0)
for it in range(Nt):
M[it, :] -= U_mean
M[-1,:] = weights # condition for fixed total charge
b = sc.concatenate((sc.zeros(Nt), [1.]))
charge_densities,*_ = sc.linalg.lstsq(M, b)
print('charge densities', charge_densities)
field = Field(Efield(points, charge_densities))
U0 = sc.mean([field.V(p) for p in testpoints])
U1 = field.V((4, 3))
U2 = field.V((0, 0.06))
doc.draw_scalar_field(func=field.V, cmap=doc.cmap_AqYlFs, vmin=2*U1-U2, vmax=U2)
doc.draw_contours(func=field.V, linewidth=1, linecolor='#111111',
levels=sc.linspace(U1, U0, 10)[1:-1], attributes={'opacity':'0.7'})
g = doc.draw_object('g', {'id':'sheet',
'style':'fill:none; stroke:#000; stroke-width:0.02; stroke-linecap:square'})
pt = '{},{} {},{}'.format(P0[0], P0[1], P1[0], P1[1])
doc.draw_object('polyline', {'stroke':'#000000', 'stroke-width':0.12,
'points':pt, 'stroke-linecap':'round'}, group=g)
doc.draw_object('polyline', {'stroke':'#ff3333', 'stroke-width':0.08,
'points':pt, 'stroke-linecap':'round'}, group=g)
plus = 'M 0,-0.02 v 0.04 M -0.02,0 h 0.04'
startpath = Startpath(field, lambda t: array((3*cos(2*pi*t), 1.5*sin(2*pi*t))))
nlines = 28
for iline in range(nlines):
p0 = startpath.startpos((iline + 0.5) / nlines)
line = FieldLine(field, p0, directions='both', maxr=5)
doc.draw_line(line, linewidth=2.4, arrows_style={'potential':field.V,
'at_potentials':[(5.5*U0 + 3.5*U1)/9, (1.8*U0 + 7.2*U1)/9]})
# draw little plus-signs
if line.nodes[-1]['p'][1] > 0:
doc.draw_object('path', {'d':plus,
'transform':'translate({:.4f},{:.4f})'.format(*line.nodes[0]['p'])}, group=g)
doc.write()
|
Licensing
[edit]- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 11:51, 18 December 2020 | 800 × 600 (148 KB) | Geek3 (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Short title | VFPt_charged-sheet_uniform-potential+contour |
---|---|
Image title | VFPt_charged-sheet_uniform-potential+contour
created with VectorFieldPlot 3.3 https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot about: https://commons.wikimedia.org/wiki/File:VFPt_charged-sheet_uniform-potential+contour.svg rights: Creative Commons Attribution ShareAlike 4.0 |
Width | 800 |
Height | 600 |