File:VFPt charged-wires alternating-grid potential+contour.svg
Original file (SVG file, nominally 800 × 600 pixels, file size: 235 KB)
Captions
Summary
[edit]DescriptionVFPt charged-wires alternating-grid potential+contour.svg |
English: Electric field and potential around a linear grid of infinitely long charged wires with alternating charges. |
Date | |
Source | Own work |
Author | Geek3 |
SVG development InfoField | This plot was created with VectorFieldPlot. |
Source code InfoField | Python code# paste this code at the end of VectorFieldPlot 3.1
# https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot
doc = FieldplotDocument('VFPt_charged-wires_alternating-grid_potential+contour',
width=800, height=600, commons=True)
nw = 4
L = 8 / 3
rods1 = [{'x':(i+0.5-nw/2) * L, 'y':0,
'q':1-2*((i+nw//2)%2)} for i in range(nw)]
field1 = Field([ ['charged_wire', rod] for rod in rods1])
doc.draw_charged_wires(field1, scale=2)
# We use an approximate wire configuration with fitted charges, instead of
# an analytic solution or a huge number of wires
nextra = 4
rods_extra = []
for iextra in range(nextra):
rods_extra.append([{'x':(nw/2+iextra+0.5)*(2*i-1) * L, 'y':0,
'q':-1+2*((i+nw//2+iextra)%2)} for i in range(2)])
sample_points = [[L, 0], [2*L, 0], [L, 3], [2*L,3]]
M, b = [], []
for p in sample_points:
M.append([Field([ ['charged_wire', rod] for rod in rods]).V(p) for rods in rods_extra])
b.append(-field1.V(p))
charge_factors = sc.linalg.solve(M, b)
print(charge_factors)
for iextra in range(nextra):
for rod in rods_extra[iextra]:
rod['q'] *= charge_factors[iextra]
field = Field([ ['charged_wire', rod] for rod in rods1 + [r for l in rods_extra for r in l]])
U0 = field.V([(0.5-nw/2) * L, 0.3])
U1 = field.V([(0.5-nw/2) * L, 0.295])
spath = Startpath(field, lambda t: sc.array([
(0.5-nw/2) * L + L/2 * cos(2*pi*t), L/2 * sin(2*pi*t)]), t0=0, t1=1)
nl = 24
for i in range(nl):
for m in range(0, nw, 2):
p0 = spath.startpos((i + 0.5) / nl) + array([m * L, 0])
line = FieldLine(field, p0, directions='both')
doc.draw_line(line, linewidth=2.4, arrows_style={'scale':1.2,
'potential':field.V, 'at_potentials':[-0.25*U0, 0.25*U0]})
doc.draw_scalar_field(func=field.V, cmap=doc.cmap_AqYlFs,
vmin=-U0, vmax=U0)
doc.draw_contours(func=field.V, linewidth=1, linecolor='#111111',
levels=sc.linspace(-U1, U1, 21)[1:-1], attributes={'opacity':'0.7'})
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 | 12:47, 5 June 2020 | 800 × 600 (235 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-wires_alternating-grid_potential+contour |
---|---|
Image title | VFPt_charged-wires_alternating-grid_potential+contour
created with VectorFieldPlot 3.1 https://commons.wikimedia.org/wiki/User:Geek3/VectorFieldPlot about: https://commons.wikimedia.org/wiki/File:VFPt_charged-wires_alternating-grid_potential+contour.svg rights: Creative Commons Attribution ShareAlike 4.0 |
Width | 800 |
Height | 600 |