Ohmův zákon pro celý obvod

Následující aplet umožňuje názorně pochopit Ohmův zákon pro celý obvod. Ve čtyřech oknech apletu je zobrazeno:
	voltampérová charakteristika zdroje;
	hodnoty veličin z obvodu;
	schéma elektrického obvovudu;
	elektrický obvod s "pohyblivými prvky".

U zdroje elektrického napětí lze měnit elektromotorické napětí (Subscript[U, e]) a jeho vnitřní odpor (Subscript[R, i]). U reostatu zařazeného do obvodu lze měnit jeho odpor R a u žárovky její napětí (Subscript[U, žárovky]) a maximální proud (Subscript[I, žárovky]). V případě, že není žárovka zobrazena, nemají veličiny (Subscript[U, žárovky]) a (Subscript[I, žárovky]) žádný význam a jejich změny se v obvodu neprojeví.
Pracovním bodem se pro účely apletu rozumí zobrazení svorkového napětí zdroje a proudu, který obvodem prochází.

Tlačítkem Ulož obrázek se uloží právě zobrazené "bílé" okno do aktuální složky (složka, v níž je uložen tento notebook) pod jménem, které je uloženo v proměnné jmenosouboru. K tomuto jménu souboru je při opakovaném ukládání grafu přidáváno pořadové číslo.
Pozor! Při každém spuštění tohoto apletu se začínají soubory číslovat opět od jedné! Tak může dojít k přepsání minule uložených obrázků.

© Jaroslav Reichl, 2008

Příprava pro vykreslení grafu

jmenosouboru="ohm_cely_obvod_.jpg";
cesta=NotebookDirectory[];
pocetulozeni=0;

rozmerobrazku=230;

pocetknoflikuzdroje=5;
pocetknoflikupristroje=3;
x1=-10;x2=-x1;
y1=-10;y2=-y1;
stredx=((x2+x1)/2);stredy=((y2+y1)/2);
Ue0=5;Uemin=1;Uemax=20;deltaUe=0.5;
Ri0=2;Rimin=0.5;Rimax=5;deltaRi=0.5;
R0=5;Rmin=0;Rmax=20;deltaR=0.1;
Uz0=4.5;Uzmin=1;Uzmax=15;deltaUz=0.5;
Iz0=0.5;Izmin=0.1;Izmax=2;deltaIz=0.1;
Ikmax=(Uemax/Rimin);

tloustka=0.005;
velikostbodu=0.02;

barva=Black;
barvaue=Darker[Green];
barvari=Darker[Orange,0.15];
barvar=Black;
barvagrafu=Blue;
barvapracovnibod=Red;
barvaik=Magenta;
barvaobvod=Black;
barvaobvodneaktivni=Lighter[Black,0.7];
barvazarovka=Brown;

voltmetr={
Circle[{0.35x1,0.6y2},0.1x2],
Text[Style["V",18,barvapracovnibod,FontFamily->Times,Bold],{0.34x1,0.58y2},{Center,Center}]};
vodicevoltmetr={
Line[{{0.45x1,0.6y2},{0.9x1,0.6y2},{0.9x1,0.3y2}}],
Line[{{0.25x1,0.6y2},{0.2x2,0.6y2},{0.2x2,0.3y2}}]};
uzly={
Point[{0.9x1,0.3y2}],
Point[{0.2x2,0.3y2}]};
zdroj={
Line[{{0.7x1,0.2y2},{0.7x1,0.4y2}}],
Line[{{0.65x1,0.1y2},{0.65x1,0.5y2}}]};
rezistorvnitrni=Line[{{0.5x1,0.22y2},{0.5x1,0.38y2},{0.2x1,0.38y2},{0.2x1,0.22y2},{0.5x1,0.22y2}}];
reostat=Line[{{0.7x1,0.52y1},{0.7x1,0.68y1},{0.4x1,0.68y1},{0.4x1,0.52y1},{0.7x1,0.52y1}}];
zarovka={
Circle[{0.1x1,0.6y1},0.1x2],
Line[{{0.1x1+0.1x2 Cos[(π/4)],0.6y1+0.1x2 Sin[(π/4)]},{0.1x1+0.1x2 Cos[((5π)/4)],0.6y1+0.1x2 Sin[((5π)/4)]}}],
Line[{{0.1x1+0.1x2 Cos[((3π)/4)],0.6y1+0.1x2 Sin[((3π)/4)]},{0.1x1+0.1x2 Cos[((7π)/4)],0.6y1+0.1x2 Sin[((7π)/4)]}}]};
vodicmistozarovky={
Line[{{0.2x1,0.6y1},{stredx,0.6y1}}]};
vodice={
Line[{{0.65x1,0.3y2},{0.5x1,0.3y2}}],
Line[{{0.7x1,0.3y2},{0.9x1,0.3y2},{0.9x1,0.8y1},{0.7x1,0.8y1}}],
Arrowheads[{0,0.05}],Arrow[{{0.7x1,0.8y1},{0.4x1,0.4y1}}],
Line[{{0.4x1,0.6y1},{0.2x1,0.6y1}}],
Line[{{stredx,0.6y1},{0.2x2,0.6y1}}],
Line[{{0.2x2,0.3y2},{0.2x1,0.3y2}}]};
vodicebezA=Line[{{0.2x2,0.6y1},{0.2x2,0.3y2}}];
ampermetr={
Circle[{0.2x2,0.15y1},0.1x2],
Text[Style["A",18,barvapracovnibod,FontFamily->Times,Bold],{0.21x2,0.15y1},{Center,Center}]};
vodiceampermetr={
Line[{{0.2x2,0.6y1},{0.2x2,0.25y1}}],
Line[{{0.2x2,0.05y1},{0.2x2,0.3y2}}]};

zdroj21={
Line[{{0.7x1,0.35y2},{0.1x2,0.35y2},{0.1x2,0.1y2},{0.7x1,0.1y2},{0.7x1,0.35y2}}]};
zdroj22={
Line[{{0.65x1,0.3y2},{0.05x2,0.3y2},{0.05x2,0.15y2},{0.65x1,0.15y2},{0.65x1,0.3y2}}]};
voltmetr21={
Line[{{0.6x1,0.75y2},{stredx,0.75y2},{stredx,0.45y2},{0.6x1,0.45y2},{0.6x1,0.75y2}}]};
voltmetr22={
Line[{{0.55x1,0.7y2},{0.05x1,0.7y2},{0.05x1,0.55y2},{0.55x1,0.55y2},{0.55x1,0.7y2}}]};
voltmetr23={
Table[Circle[{0.55x1+((0.5x2)/(pocetknoflikupristroje+1))i,0.5y2},0.015x2],{i,0,pocetknoflikupristroje+1,1}]};
ampermetr21={
Line[{{stredx,stredy},{0.6x2,stredy},{0.6x2,0.3y1},{stredx,0.3y1},{stredx,stredy}}]};
ampermetr22={
Line[{{0.05x2,0.05y1},{0.55x2,0.05y1},{0.55x2,0.2y1},{0.05x2,0.2y1},{0.05x2,0.05y1}}]};
ampermetr23={
Table[Circle[{0.05x2+((0.5x2)/(pocetknoflikupristroje+1))i,0.25y1},0.015x2],{i,0,pocetknoflikupristroje+1,1}]};
vodicevoltmetr2={
Line[{{0.6x1,0.6y2},{0.9x1,0.6y2},{0.9x1,0.2y2}}],
Line[{{stredx,0.6y2},{0.3x2,0.6y2},{0.3x2,0.2y2}}]};
uzly2={
Point[{0.9x1,0.2y2}],
Point[{0.3x2,0.2y2}]};
vodiceampermetr2={
Line[{{0.3x2,0.2y2},{0.3x2,stredy}}],
Line[{{0.3x2,0.3y1},{0.3x2,0.6y1}}]};
vodicebezA2=Line[{{0.3x2,0.6y1},{0.3x2,0.2y2}}];
zarovka2={
Circle[{0.15x1,0.4y1},0.1x2,{0,((4π)/3)}],
Circle[{0.15x1,0.4y1},0.1x2,{((5π)/3),2π}],
Line[{{0.15x1+0.1x2 Cos[((4π)/3)],0.4y1+0.1x2 Sin[((4π)/3)]},{0.15x1+0.1x2 Cos[((4π)/3)],0.6y1},{0.15x1+0.1x2 Cos[((5π)/3)],0.6y1},{0.15x1+0.1x2 Cos[((5π)/3)],0.4y1+0.1x2 Sin[((5π)/3)]}}]};
zarovka2vlakno1={
Line[{{0.13x1,0.6y1},{0.13x1,0.4y1-0.04x2},{0.15x1+0.1x2 Cos[((5π)/3)],0.37y1}}],
Line[{{0.17x1,0.6y1},{0.17x1,0.4y1-0.04x2},{0.15x1+0.1x2 Cos[((4π)/3)],0.37y1}}]};
zarovka2vlakno2={
Line[{{0.15x1+0.1x2 Cos[((4π)/3)],0.37y1},{0.15x1+0.1x2 Cos[((4π)/3)]+((0.1x2)/4)(Cos[((5π)/3)]-Cos[((4π)/3)]),0.4y1},{0.15x1+0.1x2 Cos[((4π)/3)]+((0.2x2)/4)(Cos[((5π)/3)]-Cos[((4π)/3)]),0.37y1},{0.15x1+0.1x2 Cos[((4π)/3)]+((0.3x2)/4)(Cos[((5π)/3)]-Cos[((4π)/3)]),0.4y1},{0.15x1+0.1x2 Cos[((5π)/3)],0.37y1}}]};
vodice2={
Line[{{0.7x1,0.2y2},{0.9x1,0.2y2},{0.9x1,0.8y1}}],
Line[{{0.1x2,0.2y2},{0.3x2,0.2y2}}],
Line[{{0.4x1,0.6y1},{0.15x1+0.1x2 Cos[((4π)/3)],0.6y1}}],
Line[{{0.15x1+0.1x2 Cos[((5π)/3)],0.6y1},{0.3x2,0.6y1}}]};

OhmuvZakonCelyObvod=Manipulate[Deploy[
If[zobrazitzarovku,
Rzarovky=(Uzarovky/Izarovky),
Rzarovky=0];
U[proud_]=Ue-Ri proud;
Rcelkovy=Ri+R+Rzarovky;
Iaktualni=(Ue/Rcelkovy);
Ik=(Ue/Ri);
pracovnibod=Point[{Iaktualni,U[Iaktualni]}];

vodicreostatu={
Line[{{0.9x1,0.8y1},{0.41x1+((R 0.28x1)/Rmax),0.8y1}}],
Arrowheads[{0,0.05}],Arrow[{{0.41x1+((R 0.28x1)/Rmax),0.8y1},{0.41x1+((R 0.28x1)/Rmax),0.68y1}}],
Rectangle[{0.41x1+((R 0.28x1)/Rmax),0.65y1},{0.41x1,0.55y1}]};
jaszarovky={
Disk[{0.15x1,0.4y1},0.1x2(Iaktualni/Izarovky)]};
barvajaszarovky=Lighter[Orange,1.35-4(Iaktualni/Izarovky)];

grafik=Grid[{
{Show[
Plot[U[proud],{proud,0,Ik},PlotRange->{{0,1.1Ikmax},{0,1.1Uemax}},PlotStyle->{barvagrafu,Thickness[tloustka]},AxesLabel->{"(I/A)","(U/V)"}],
Graphics[{
If[zobrazitpracovnibod,
If[zobrazitzarovku,
If[Iaktualni≤Izarovky,
{barvapracovnibod,PointSize[1.25velikostbodu],pracovnibod},
Text[""]],
{barvapracovnibod,PointSize[1.25velikostbodu],pracovnibod}],
Text[""]]
}],
FormatType->StandardForm,AspectRatio->Automatic,ImageSize->1.1rozmerobrazku
],
Show[
Graphics[{
Text[Style[StringJoin["(Subscript[U, e]) = ",ToString[Ue]," V"],15,barvaue,FontFamily->Times],{0.9x1,0.9y2},{Left,Center}],
Text[Style[StringJoin["(Subscript[R, i]) = ",ToString[Ri]," Ω"],15,barvari,FontFamily->Times],{0.9x1,0.8y2},{Left,Center}],
If[zobrazitIk,
Text[Style[StringJoin["(Subscript[I, k]) = ",ToString[Round[Ik,0.01]]," A"],15,barvaik,FontFamily->Times],{0.4x1,0.8y2},{Left,Center}],
Text[""]],
Text[Style[StringJoin["R = ",ToString[R]," Ω"],15,barva,FontFamily->Times],{0.9x1,0.65y2},{Left,Center}],
If[zobrazitzarovku,
{Text[Style[StringJoin["(Subscript[U, z]) = ",ToString[Uzarovky]," V"],15,barvazarovka,FontFamily->Times],{0.9x1,0.55y2},{Left,Center}],
Text[Style[StringJoin["(Subscript[I, z]) = ",ToString[Izarovky]," A"],15,barvazarovka,FontFamily->Times],{0.9x1,0.45y2},{Left,Center}],
If[Iaktualni≤Izarovky,
Text[Style[StringJoin["(Subscript[R, z]) = ",ToString[Round[Rzarovky,0.01]]," Ω"],15,barvazarovka,FontFamily->Times],{0.4x1,0.45y2},{Left,Center}],
Text[Style["(Subscript[R, z]) -> ∞",15,barvazarovka,FontFamily->Times],{0.4x1,0.45y2},{Left,Center}]]},
Text[""]],
If[zobrazitzarovku,
If[Iaktualni≤Izarovky,
Text[Style[StringJoin["(Subscript[R, celkový]) = ",ToString[Round[Rcelkovy,0.01]]," Ω"],15,barva,FontFamily->Times],{0.9x1,0.3y2},{Left,Center}],
Text[Style["(Subscript[R, celkový]) -> ∞",15,barva,FontFamily->Times],{0.9x1,0.3y2},{Left,Center}]],
Text[Style[StringJoin["(Subscript[R, celkový]) = ",ToString[Round[Rcelkovy,0.01]]," Ω"],15,barva,FontFamily->Times],{0.9x1,0.3y2},{Left,Center}]],
If[zobrazitpracovnibod,
If[zobrazitzarovku,
If[Iaktualni≤Izarovky,
{Text[Style[StringJoin["I = ",ToString[Round[Iaktualni,0.01]]," A"],15,barvapracovnibod,FontFamily->Times],{0.9x1,0.15y2},{Left,Center}],
Text[Style[StringJoin["U = ",ToString[Round[U[Iaktualni],0.01]]," V"],15,barvapracovnibod,FontFamily->Times],{0.4x1,0.15y2},{Left,Center}]},
{Text[Style["I = 0 A",15,barvapracovnibod,FontFamily->Times],{0.9x1,0.15y2},{Left,Center}],
Text[Style[StringJoin["U = ",ToString[Ue]," V"],15,barvapracovnibod,FontFamily->Times],{0.4x1,0.15y2},{Left,Center}]}],
{Text[Style[StringJoin["I = ",ToString[Round[Iaktualni,0.01]]," A"],15,barvapracovnibod,FontFamily->Times],{0.9x1,0.15y2},{Left,Center}],
Text[Style[StringJoin["U = ",ToString[Round[U[Iaktualni],0.01]]," V"],15,barvapracovnibod,FontFamily->Times],{0.4x1,0.15y2},{Left,Center}]}],
Text[""]]
}],
FormatType->StandardForm,AspectRatio->Automatic,PlotRange->{{x1,0.1x2},{0.1y1,y2}},ImageSize->0.8rozmerobrazku
]},
{Show[
Graphics[{
Text[Style["Schéma obvodu",15,barva,FontFamily->Times,Underlined],{0.9x1,0.8y2},{Left,Center}],
{barvaue,Thickness[tloustka],zdroj},
{barvaobvod,Thickness[tloustka],vodice},
{barvari,Thickness[tloustka],rezistorvnitrni},
{barvaobvod,Thickness[tloustka],reostat},
If[zobrazitzarovku,
{barvazarovka,Thickness[tloustka],zarovka},
{barvaobvod,Thickness[tloustka],vodicmistozarovky}],
If[zobrazitpracovnibod,
{{barvapracovnibod,Thickness[tloustka],voltmetr},
{barvaobvod,PointSize[1.4velikostbodu],uzly},
{barvaobvod,Thickness[tloustka],vodicevoltmetr},
{barvapracovnibod,Thickness[tloustka],ampermetr},
{barvaobvod,Thickness[tloustka],vodiceampermetr}},
{barvaobvod,Thickness[tloustka],vodicebezA}]
}],
FormatType->StandardForm,AspectRatio->Automatic,PlotRange->{{x1,x2},{y1,y2}},ImageSize->rozmerobrazku
],
Show[
Graphics[{
Text[Style["Obvod",15,barva,FontFamily->Times,Underlined],{0.9x1,0.8y2},{Left,Center}],
{barvaobvod,Thickness[2.5tloustka],zdroj21},
{barvaobvod,Thickness[tloustka],zdroj22},
{barvaobvod,Thickness[1.5tloustka],vodice2},
{barvaobvod,Thickness[1.5tloustka],vodicreostatu},
{barvaobvodneaktivni,Thickness[2tloustka],reostat},
If[zobrazitzarovku,
If[Iaktualni≤Izarovky,
{Text[Style[StringJoin[ToString[Ue]," V"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x1,0.21y2},{Center,Center}],
{barvajaszarovky,jaszarovky},
{barvazarovka,Thickness[1.5tloustka],zarovka2},
{barvaobvod,Thickness[1tloustka],zarovka2vlakno1},
{barvaobvod,Thickness[1tloustka],zarovka2vlakno2},
If[zobrazitpracovnibod,
{Text[Style[StringJoin[ToString[Round[U[Iaktualni],0.01]]," V"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x1,0.61y2},{Center,Center}],
Text[Style[StringJoin[ToString[Round[Iaktualni,0.01]]," A"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x2,0.14y1},{Center,Center}]},
Text[""]]},
{Text[Style["Žárovka poškozena!",15,barvapracovnibod,FontFamily->Times,Bold],{0.28x1,0.83y1},{Center,Top}],
Text[Style[StringJoin[ToString[Ue]," V"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x1,0.21y2},{Center,Center}],
{barvazarovka,Thickness[1.5tloustka],zarovka2},
{barvaobvod,Thickness[1tloustka],zarovka2vlakno1},
If[zobrazitpracovnibod,
{Text[Style[StringJoin[ToString[Ue]," V"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x1,0.61y2},{Center,Center}],
Text[Style["0 A",16,barvapracovnibod,FontFamily->Times,Bold],{0.3x2,0.14y1},{Center,Center}]},
Text[""]]}],
{Text[Style[StringJoin[ToString[Ue]," V"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x1,0.21y2},{Center,Center}],
{barvaobvod,Thickness[1.5tloustka],vodicmistozarovky},
If[zobrazitpracovnibod,
{Text[Style[StringJoin[ToString[Round[U[Iaktualni],0.01]]," V"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x1,0.61y2},{Center,Center}],
Text[Style[StringJoin[ToString[Round[Iaktualni,0.01]]," A"],16,barvapracovnibod,FontFamily->Times,Bold],{0.3x2,0.14y1},{Center,Center}]},
Text[""]]}],
If[zobrazitpracovnibod,
{{barvaobvod,Thickness[2.5tloustka],voltmetr21},
{barvaobvod,Thickness[tloustka],voltmetr22},
{barvaobvod,Thickness[1.5tloustka],voltmetr23},
{barvaobvod,PointSize[1.4velikostbodu],uzly2},
{barvaobvod,Thickness[1.5tloustka],vodicevoltmetr2},
{barvaobvod,Thickness[2.5tloustka],ampermetr21},
{barvaobvod,Thickness[tloustka],ampermetr22},
{barvaobvod,Thickness[1.5tloustka],ampermetr23},
{barvaobvod,Thickness[1.5tloustka],vodiceampermetr2}},
{barvaobvod,Thickness[1.5tloustka],vodicebezA2}]
}],
FormatType->StandardForm,AspectRatio->Automatic,PlotRange->{{x1,x2},{y1,y2}},ImageSize->rozmerobrazku
]}
}]],

{{Ue,Ue0,Style["(Subscript[U, e])",15,barvaue]},Uemin,Uemax,deltaUe},
{{Ri,Ri0,Style["(Subscript[R, i])",15,barvari]},Rimin,Rimax,deltaRi},
{{R,R0,Style["R",15,barvar]},Rmin,Rmax,deltaR},
Delimiter,
Item[Style["Jmenovité charakteristiky žárovky",15,barva,FontFamily->Times,Bold,Underlined],Alignment->Left],
{{Uzarovky,Uz0,Style["\!\(\*SubscriptBox[\(U\), \(žárovky\)]\)",15,barvazarovka]},Uzmin,Uzmax,deltaUz},
{{Izarovky,Iz0,Style["\!\(\*SubscriptBox[\(I\), \(žárovky\)]\)",15,barvazarovka]},Izmin,Izmax,deltaIz},
Delimiter,
Item[Style["Zobrazit",15,barva,FontFamily->Times,Bold,Underlined],Alignment->Left],
{{zobrazitzarovku,True,Style["žárovku v obvodu",15,barvazarovka,FontFamily->Times]},{True,False},ControlType->Checkbox},
{{zobrazitpracovnibod,True,Style["pracovní bod",15,barvapracovnibod,FontFamily->Times]},{True,False},ControlType->Checkbox},
{{zobrazitIk,True,Style["zkratový proud",15,barvaik,FontFamily->Times]},{True,False},ControlType->Checkbox},
Delimiter,
Button[" Ulož obrázek ",{pocetulozeni=pocetulozeni+1,Export[StringInsert[StringJoin[cesta,jmenosouboru],ToString[pocetulozeni],-5],grafik]},ImageSize->{100,Automatic}],
ControlPlacement->Left,
FrameLabel->{Style["© Jaroslav Reichl, 2008",10,Black,FontFamily->Times],"",Style["Ohmův zákon pro celý obvod",25,Black,FontFamily->Times],""}];

Spuštění animace
Zpracujte běžným způsobem následující buňku a na dotaz, který se objeví, odpovězte ANO.

OhmuvZakonCelyObvod