John Baez on Electrical Circuits and related things
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/wb/ (C) Ken Webb Sun Jun 03 2012 11:29:57 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: John Baez on Electrical Circuits and related things
Description:
Url: http://www.primordion.com/Xholon/wb/
InternalName:
YoutubeId:
Keywords:
My Notes
--------
Mathematician John Baez has authored numerous "This Week's Finds in Mathematical Physics" posts. Some of these have dealt with electrical circuits and other "physical systems built from interacting components". He states that "there's a big mathematically precise analogy relating a bunch of them". [2] In this workbook I'll try to engage with some of these ideas.
The Week 296 post includes a table of analogies [2] ::
displacement flow momentum effort
q qʹ p pʹ
------------ -------- ----------- ------------
Mechanics position velocity momentum force
(translation)
Mechanics angle angular angular torque
(rotation) velocity momentum
Electronics charge current flux voltage
linkage
Hydraulics volume flow pressure pressure
momentum
Thermodynamics entropy entropy temperature temperature
flow momentum
Chemistry moles molar chemical chemical
flow momentum potential
John then discusses a real mouthful - linear classical dissipative static open systems. Each of these terms is a choice ::
linear vs nonlinear
classical vs quantum-mechanical
conservative vs dissipative
static vs dynamical
closed vs open
There's a sixth choice ::
lumped vs distributed
The following quote highlights the key concept that category theory is about combining two or more systems, for example two electrical circuits, or maybe an electrical circuit with a hydraulic system that generates electricity? ::
'"open" brings category theory into the game, since we can combine two open systems by feeding the outputs of one into the inputs of the other - and this can be seen as composing morphisms'
This implies that a closed system can't be explored using category theory. But aren't closed systems often composed of other systems that might themselves be open?
"To make things more concrete, let's think of these systems as electrical circuits made of linear resistors."
In this workbook, I try to capture the content of John's posts as hierarchically-organized network structures. Scroll down to the various editors on this page. In this way I hope to better understand how the various concepts in the posts are connected. To run the associated app ::
Click the Run button at the top of this page.
This opens a runtime overlay.
Expand the nodes in the tree structure.
Each system has an equation involving seven components. The equations use ports to reference these. To see these references graphically ::
Make sure the tree is fully expanded.
Click the TreeGui button in the overlay.
This hides the tree representation.
Click the ContourGui button.
This shows a contour representation of the same tree structure.
Hover the mouse over the RockSpringEquation rectangle.
The seven components of the equation will be highlighted in a different color.
In the PhysicalSystem structure ::
* the algebraic components (Mass, Resistance, etc) are all leaf nodes (they have no children)
* the domain-specific components (Rock, Resistor, etc) all have algebraic components as children
* the algebraic components are attributes of the domain-specific components (in an Object-Oriented (OO) and UML paradigm)
Some points about the app implementation ::
* The equations that the app prints out are not complete. It should be (1/C) rather than C , and -c rather than c .
* The app uses special characters to represent prime and double prime, rather than using the apostrophe (') and double quote (") characters. This is because apostrophe and double quote are reserved characters in HTML and JavaScript.
ʹ rather than '
ʹʹ rather than "
References ::
(1) http://math.ucr.edu/home/baez/week288.html
(2) http://math.ucr.edu/home/baez/week296.html
(3) http://en.wikipedia.org/wiki/Hydraulic_analogy
(4) http://math.ucr.edu/home/baez/week294.html
(5) http://math.ucr.edu/home/baez/week289.html
(6) http://math.ucr.edu/home/baez/week290.html
(7) http://math.ucr.edu/home/baez/week291.html
(8) http://math.ucr.edu/home/baez/week292.html (bond graphs)
]]></Notes>
<script implName="lang:python:inline:"><![CDATA[
print ""
]]></script>
<script implName="lang:javascript:inline:"><![CDATA[
print("\n");
]]></script>
<_-.XholonClass>
<!-- types of domain objects -->
<PhysicalSystem/>
<Equation>
<RockSpringEquation/>
<RLCEquation/>
</Equation>
<!-- RockSpringSystem components -->
<Rock/>
<Spring/>
<!-- RLCSystem components -->
<Resistor/>
<Inductor/>
<Capacitor/>
<VoltageSource>
<Battery/>
</VoltageSource>
<!-- types of "physical systems built from interacting parts"[2] -->
<GeneralSystems>
<MechanicsTranslation>
<RockSpringSystem/>
</MechanicsTranslation>
<MechanicsRotation/>
<Electronics>
<RLCSystem/>
</Electronics>
<Hydraulics/>
<Thermodynamics/>
<Chemistry/>
</GeneralSystems>
<!-- quantities -->
<!-- q -->
<Displacement symbol="q">
<PositionQ symbol="q(t)"/>
<AngleQ/>
<ChargeQ symbol="q(t)"/>
<VolumeQ/>
<EntropyQ/>
<MolesQ/>
</Displacement>
<!-- qʹ -->
<Flow symbol="qʹ">
<VelocityQʹ symbol="qʹ(t)"/>
<AngularVelocityQʹ/>
<CurrentQʹ symbol="qʹ(t)"/>
<FlowQʹ/>
<EntropyFlowQʹ/>
<MolarFlowQʹ/>
</Flow>
<!-- p -->
<Momentum symbol="p">
<MomentumP/>
<AngularMomentumP/>
<FluxLinkageP/>
<PressureMomentumP/>
<TemperatureMomentumP/>
<ChemicalMomentumP/>
</Momentum>
<!-- pʹ -->
<Effort symbol="pʹ(t)">
<ForcePʹ/>
<TorquePʹ/>
<VoltagePʹ symbol="V(t)"/>
<PressurePʹ/>
<TemperaturePʹ/>
<ChemicalPotentialPʹ/>
</Effort>
<Mass symbol="m"/>
<Acceleration symbol="qʹʹ(t)"/>
<DampingCoefficient symbol="c"/>
<SpringConstant symbol="k"/>
<ExternallyAppliedForce symbol="F(t)"/>
<Resistance symbol="R"/>
<Inductance symbol="L"/>
<Capacitance symbol="C"/>
<CurrentPerSecond symbol="qʹʹ(t)"/>
</_-.XholonClass>
<xholonClassDetails>
<RockSpringEquation>
<port name="port0" connector="#xpointer(../Rock/Mass)"/>
<port name="port1" connector="#xpointer(../Rock/Acceleration)"/>
<port name="port2" connector="#xpointer(../Rock/DampingCoefficient)"/>
<port name="port3" connector="#xpointer(../Rock/VelocityQʹ)"/>
<port name="port4" connector="#xpointer(../Spring/SpringConstant)"/>
<port name="port5" connector="#xpointer(../Rock/PositionQ)"/>
<port name="port6" connector="#xpointer(../ExternallyAppliedForce)"/>
</RockSpringEquation>
<RLCEquation>
<port name="port0" connector="#xpointer(../Inductor/Inductance)"/>
<port name="port1" connector="#xpointer(../CurrentPerSecond)"/> <!-- ??? -->
<port name="port2" connector="#xpointer(../Resistor/Resistance)"/>
<port name="port3" connector="#xpointer(../CurrentQʹ)"/>
<port name="port4" connector="#xpointer(../Capacitor/Capacitance)"/>
<port name="port5" connector="#xpointer(../ChargeQ)"/>
<port name="port6" connector="#xpointer(../Battery/VoltagePʹ)"/>
</RLCEquation>
</xholonClassDetails>
<PhysicalSystem>
<!-- m qʹʹ(t) = - c qʹ(t) - k q(t) + F(t) -->
<RockSpringSystem>
<RockSpringEquation/>
<Rock>
<PositionQ>0.0 m</PositionQ> <!-- q(t) is the height of the rock at time t -->
<VelocityQʹ>0.0 m/s</VelocityQʹ> <!-- qʹ(t) is the velocity of the rock at time t -->
<Acceleration>0.0 m/s^2</Acceleration> <!-- qʹʹ(t) is the acceleration of the rock at time t -->
<Mass>1.0 kg</Mass> <!-- "m is the mass of the rock" -->
<DampingCoefficient>0.0</DampingCoefficient> <!-- "c is the damping coefficient" -->
</Rock>
<Spring>
<SpringConstant>1.0</SpringConstant> <!-- "k is the spring constant" -->
</Spring>
<ExternallyAppliedForce>0.0 N</ExternallyAppliedForce> <!-- F(t) "e.g. if you push on the rock" -->
</RockSpringSystem>
<!-- L qʹʹ(t) = - R qʹ(t) - (1/C) q(t) + V(t) -->
<RLCSystem>
<RLCEquation/>
<ChargeQ/> <!-- q(t) -->
<CurrentQʹ/> <!-- qʹ(t) -->
<CurrentPerSecond/> <!-- ??? qʹʹ(t) -->
<Resistor>
<Resistance>0.0</Resistance> <!-- R -->
</Resistor>
<Inductor>
<Inductance>0.0</Inductance> <!-- L -->
</Inductor>
<Capacitor>
<Capacitance>0.0</Capacitance> <!-- C -->
</Capacitor>
<Battery>
<VoltagePʹ>0.0</VoltagePʹ> <!-- V -->
</Battery>
</RLCSystem>
</PhysicalSystem>
<Blockbehavior implName="lang:python:inline:"><![CDATA[
]]></Blockbehavior>
<Blockbehavior implName="lang:javascript:inline:"><![CDATA[
]]></Blockbehavior>
<PhysicalSystembehavior implName="lang:webEditionjs:inline:"><![CDATA[
function postConfigure() {
$("textarea#btstrp_console").css("font-size", "12px");
$("textarea#btstrp_console").attr("rows", "3");
$("textarea#btstrp_console").attr("cols", "50");
// getSymbol
// test: print("\n" + getSymbol($(".Mass")));
getSymbol = function(node) {
return node.getXhc().attr("symbol");
}
// showEquation
showEquation = function(a,b,c,d,e,f,g) {
print("\n" + getSymbol(a)
+ " " + getSymbol(b)
+ " = " + getSymbol(c)
+ " " + getSymbol(d)
+ " + " + getSymbol(e)
+ " " + getSymbol(f)
+ " + " + getSymbol(g)
);
}
}
]]></PhysicalSystembehavior>
<RockSpringEquationbehavior implName="lang:webEditionjs:inline:"><![CDATA[
function act() {
this.bindPorts(this.parent());
showEquation(this.port0, this.port1, this.port2, this.port3, this.port4, this.port5, this.port6);
}
]]></RockSpringEquationbehavior>
<RLCEquationbehavior implName="lang:webEditionjs:inline:"><![CDATA[
function act() {
this.bindPorts(this.parent());
showEquation(this.port0, this.port1, this.port2, this.port3, this.port4, this.port5, this.port6);
}
]]></RLCEquationbehavior>
<Blockbehavior implName="lang:bsh:inline:"><![CDATA[
]]></Blockbehavior>
<Blockbehavior implName="lang:jruby:inline:"><![CDATA[
]]></Blockbehavior>
<Blockbehavior implName="lang:groovy:inline:"><![CDATA[
]]></Blockbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="150" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Rock Spring System</title>
<rect id="PhysicalSystem/RockSpringSystem" fill="#98FB98" height="50" width="50" x="25" y="0"/>
</g>
<g>
<title>RLC System</title>
<rect id="PhysicalSystem/RLCSystem" fill="#98FB98" height="50" width="50" x="100" y="0"/>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>