Skip to content

Instantly share code, notes, and snippets.

@kenwebb
Created February 16, 2012 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenwebb/1844542 to your computer and use it in GitHub Desktop.
Save kenwebb/1844542 to your computer and use it in GitHub Desktop.
Magnetism 2
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/wb/ (C) Ken Webb Sun Feb 19 2012 12:39:03 GMT-0500 (EST)-->
<XholonWorkbook>
<Notes><![CDATA[
Khan Academy
------------
Title: Magnetism 2
Description: Magnetic fields and their effects on moving electrical charges
Url: http://www.khanacademy.org/video/magnetism-2
InternalName: magnetism-2
YoutubeId: NnlAI4ZiUrQ
Keywords: physics, magnetic, field, cross, product
My Notes
--------
Magnetic fields
visualization
field lines
bar magnet with N pole and S pole
convention is to draw lines from the N pole to the S pole
imagine a hypothetical monopole trying to escape from N to get to S
another way to think about it 2:30
a compass pointer would be tangent to the field lines
N pole of compass pointer points to S pole of magnet
magnitude of a magnetic field at any point
defined in terms of the effect it has on a moving charge
a magnetic field is an electromagnetic field moving at a high/relativistic speed
example
B (B⃗) is a vector that's a magntic field
the force (F) on a moving charge (proton, electron, etc.)
= the magnitude of charge
* (the velocity of the charge CROSS the magnetic field)
F = Q · (v × B) where F, v and B are vectors( F⃗ v⃗ B⃗ ) and Q is a scalar
the cross product is concerned with vectors that are perpendicular to each other
if v is exactly perpendicular to B, then F has a value
if they are parallel, then there is no impact
F is perpendicular to both v and B
magnitude of the force F
|F⃗| = Q * |v⃗| * |B⃗| * sin θ
where θ is the angle between v and B
units of the magnetic field B
sin θ has no units
F is Newtons (N)
Q is Coulombs (C)
N = C * m/s * (Bunits)
N*s/(C*m) = Bunits
Newton seconds per Coulomb meter
1 Bunit is 1 Tesla (T)
Stuff to do::
write code to draw a bar magnet, with field lines between the poles
SVG (use JavaScript, Raphael, etc.)
write code to do the various calculations
]]></Notes>
<script implName="lang:python:inline:"><![CDATA[
print "height = 12.34 m"
]]></script>
<script implName="lang:javascript:inline:"><![CDATA[
print("height = 56.78 meters\n");
]]></script>
<_-.XholonClass>
<!-- domain objects -->
<PhysicalSystem/>
<Block/>
<!-- quantities -->
<Height superClass="Length"/>
</_-.XholonClass>
<xholonClassDetails>
<Block>
<port name="height" connector="#xpointer(Height)"/>
</Block>
</xholonClassDetails>
<PhysicalSystem>
<Block>
<Height>0.1 m</Height>
<ElectricCharge>0.0 C</ElectricCharge>
<MagneticFluxDensity>0.0 T</MagneticFluxDensity>
</Block>
</PhysicalSystem>
<Blockbehavior implName="lang:python:inline:"><![CDATA[
# This works if pasted in as a last child of Block.
height.incVal(0.02)
print("Python wants something to do. Height:" + str(height))
]]></Blockbehavior>
<Blockbehavior implName="lang:javascript:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
print("JavaScript wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:bsh:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
System.out.print("Java/Beanshell wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<Blockbehavior implName="lang:jruby:inline:"><![CDATA[
require 'java'
# This works if pasted in as a last child of Block.
$height.incVal(0.02)
puts "Ruby wants something to do. Height: #{$height}"
]]></Blockbehavior>
<Blockbehavior implName="lang:groovy:inline:"><![CDATA[
// This works if pasted in as a last child of Block.
height.incVal(0.02);
System.out.print("Groovy wants something to do. Height:" + height + "\n");
]]></Blockbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<?xml version="1.0" standalone="yes"?>
<!--
"Bar Magnet with N and S" created using Google Docs; it doesn't know about SVG rect
https://docs.google.com/drawings/d/1PSWaxBhufGAjxSx9MSgV4XdcESBfUN6NOa-aEh66V3I/edit
-->
<svg version="1.1" viewBox="0.0 0.0 189.0 462.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" clip-path="url(#p.0)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="p.0">
<path d="M0 0L189.0 0L189.0 462.0L0 462.0L0 0Z" clip-rule="nonzero"></path></clipPath><path fill="#cfe2f3" stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="M35.199474 34.133858L153.59317 34.133858L153.59317 422.38583L35.199474 422.38583Z" fill-rule="nonzero"></path>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="M35.199474 228.25984L35.199474 228.25984" fill-rule="nonzero"></path>
<path stroke="#000000" stroke-width="2.0" stroke-linejoin="round" stroke-linecap="butt" d="M35.199474 228.25984L153.59317 228.25984" fill-rule="nonzero"></path>
<path fill="#073763" d="M69.03749 115.750145L69.03749 50.666668L77.775314 50.666668L111.584984 101.76563L111.584984 50.666668L119.752 50.666668L119.752 115.750145L111.014175 115.750145L77.204506 64.60678L77.204506 115.750145L69.03749 115.750145Z" fill-rule="nonzero"></path><path fill="#073763" d="M69.03749 383.94986L77.07278 383.23953Q77.64359 388.12302 79.729256 391.25287Q81.81491 394.38275 86.20578 396.31393Q90.59665 398.24512 96.08523 398.24512Q100.95909 398.24512 104.69133 396.7801Q108.42356 395.31503 110.24577 392.7623Q112.06798 390.2096 112.06798 387.1907Q112.06798 384.12744 110.31164 381.84106Q108.55529 379.55472 104.51569 378.0009Q101.92508 376.9798 93.055534 374.82663Q84.18598 372.67346 80.62938 370.76447Q76.018974 368.32272 73.757675 364.7045Q71.496376 361.08627 71.496376 356.60236Q71.496376 351.67447 74.26263 347.39035Q77.02887 343.1062 82.34182 340.88644Q87.65477 338.66666 94.15325 338.66666Q101.310356 338.66666 106.776985 340.9974Q112.243614 343.3282 115.18549 347.85648Q118.12738 352.3848 118.346924 358.1118L110.17991 358.73334Q109.52128 352.56238 105.72318 349.4103Q101.92508 346.25827 94.50452 346.25827Q86.776596 346.25827 83.24194 349.12177Q79.7073 351.98526 79.7073 356.0252Q79.7073 359.53244 82.21009 361.7966Q84.668976 364.06076 95.053375 366.4359Q105.437775 368.81107 109.301735 370.58688Q114.92204 373.20618 117.60047 377.22397Q120.2789 381.24173 120.2789 386.48038Q120.2789 391.67462 117.33702 396.26953Q114.39514 400.86444 108.884605 403.41718Q103.37407 405.9699 96.48041 405.9699Q87.742584 405.9699 81.83687 403.395Q75.93115 400.82007 72.57214 395.648Q69.21313 390.47595 69.03749 383.94986Z" fill-rule="nonzero"></path>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment