%% Thermal physics and heat-transfer apparatus. Monochrome native nodes. \usetikzlibrary{tikzphysics.core} \usetikzlibrary{arrows.meta,calc} \makeatletter \tikzset{thermal liquid color/.initial=black} \def\tikzphysics@thermal@arrow#1#2#3#4{% \pgfsetarrowsend{>}% \tikzphysics@component@move{#1}{#2}% \tikzphysics@component@line{#3}{#4}% \pgfusepath{stroke}% } %% conduction slab \tikzset{ conduction width/.initial=3cm, physics conduction width/.style={conduction width={#1}}, conduction height/.initial=2cm, physics conduction height/.style={conduction height={#1}}, } \pgfdeclareshape{physicsconductionslabnode}{ \savedmacro\tikzphysics@component@physicsconductionslabnodestate{% \tikzphysics@component@length\cw{conduction width} \tikzphysics@component@length\ch{conduction height} \tikzphysics@component@check{\cw>0 && \ch>0}{Thermal slab dimensions must be positive} \addtosavedmacro\cw \addtosavedmacro\ch } \anchor{center}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{heat-left}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{-\cw/2}{0}} \anchor{heat-right}{\tikzphysics@component@physicsconductionslabnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{bottom}{\tikzphysics@component@physicsconductionslabnodestate}{(-\cw/2+\tikzphysics@percent*\cw)*1cm}{(-\ch/2)*1cm} \tikzphysics@declarepercentanchors{right}{\tikzphysics@component@physicsconductionslabnodestate}{(\cw/2)*1cm}{(-\ch/2+\tikzphysics@percent*\ch)*1cm} \tikzphysics@declarepercentanchors{top}{\tikzphysics@component@physicsconductionslabnodestate}{(\cw/2-\tikzphysics@percent*\cw)*1cm}{(\ch/2)*1cm} \tikzphysics@declarepercentanchors{left}{\tikzphysics@component@physicsconductionslabnodestate}{(-\cw/2)*1cm}{(\ch/2-\tikzphysics@percent*\ch)*1cm} \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicsconductionslabnodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsconductionslabnodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicsconductionslabnodestate \tikzphysics@component@move{-\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{\ch/2} \tikzphysics@component@line{-\cw/2}{\ch/2} \pgfpathclose } } \tikzphysics@declarehook{conduction slab} \tikzphysics@registerdisplayname{physicsconductionslabnode}{conduction slab} \tikzphysics@registeranchors{physicsconductionslabnode}{center,north,south,east,west,heat-left,heat-right} \tikzphysics@registerfamilies{physicsconductionslabnode}{bottom,right,top,left,axis} \tikzphysics@registerkeys{physicsconductionslabnode}{conduction width,conduction height} \tikzphysics@registerkeydefaults{physicsconductionslabnode}{conduction width/3cm,conduction height/2cm} \tikzset{physicsconductionslabnode/.style={shape=physicsconductionslabnode,physics logical shape=physicsconductionslabnode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every conduction slab},conduction slab/.style={physicsconductionslabnode}} %% composite wall \tikzset{ composite width/.initial=3cm, physics composite width/.style={composite width={#1}}, composite height/.initial=2cm, physics composite height/.style={composite height={#1}}, composite split/.initial=.45, physics composite split/.style={composite split={#1}}, } \pgfdeclareshape{physicscompositewallnode}{ \savedmacro\tikzphysics@component@physicscompositewallnodestate{% \tikzphysics@component@length\cw{composite width} \tikzphysics@component@length\ch{composite height} \pgfmathsetmacro\cp{\pgfkeysvalueof{/tikz/composite split}} \tikzphysics@component@check{\cw>0 && \ch>0}{Thermal slab dimensions must be positive} \tikzphysics@component@check{\cp>0 && \cp<1}{Composite split must lie strictly between 0 and 1} \addtosavedmacro\cw \addtosavedmacro\ch \addtosavedmacro\cp } \anchor{center}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{heat-left}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{-\cw/2}{0}} \anchor{heat-right}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{layer-1-center}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{(-.5+.5*\cp)*\cw}{0}} \anchor{layer-2-center}{\tikzphysics@component@physicscompositewallnodestate\tikzphysics@component@point{.5*\cp*\cw}{0}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{bottom}{\tikzphysics@component@physicscompositewallnodestate}{(-\cw/2+\tikzphysics@percent*\cw)*1cm}{(-\ch/2)*1cm} \tikzphysics@declarepercentanchors{right}{\tikzphysics@component@physicscompositewallnodestate}{(\cw/2)*1cm}{(-\ch/2+\tikzphysics@percent*\ch)*1cm} \tikzphysics@declarepercentanchors{top}{\tikzphysics@component@physicscompositewallnodestate}{(\cw/2-\tikzphysics@percent*\cw)*1cm}{(\ch/2)*1cm} \tikzphysics@declarepercentanchors{left}{\tikzphysics@component@physicscompositewallnodestate}{(-\cw/2)*1cm}{(\ch/2-\tikzphysics@percent*\ch)*1cm} \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicscompositewallnodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(0)*1cm} \tikzphysics@declarepercentanchors{interface}{\tikzphysics@component@physicscompositewallnodestate}{((-.5+\cp)*\cw)*1cm}{((-.5+\tikzphysics@percent)*\ch)*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicscompositewallnodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicscompositewallnodestate \tikzphysics@component@move{-\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{\ch/2} \tikzphysics@component@line{-\cw/2}{\ch/2} \pgfpathclose \tikzphysics@component@move{(-.5+\cp)*\cw}{-\ch/2} \tikzphysics@component@line{(-.5+\cp)*\cw}{\ch/2} } } \tikzphysics@declarehook{composite wall} \tikzphysics@registerdisplayname{physicscompositewallnode}{composite wall} \tikzphysics@registeranchors{physicscompositewallnode}{center,north,south,east,west,heat-left,heat-right,layer-1-center,layer-2-center} \tikzphysics@registerfamilies{physicscompositewallnode}{bottom,right,top,left,axis,interface} \tikzphysics@registerkeys{physicscompositewallnode}{composite width,composite height,composite split} \tikzphysics@registerkeydefaults{physicscompositewallnode}{composite width/3cm,composite height/2cm,composite split/.45} \tikzset{physicscompositewallnode/.style={shape=physicscompositewallnode,physics logical shape=physicscompositewallnode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every composite wall},composite wall/.style={physicscompositewallnode}} %% convection surface \tikzset{ thermal plate width/.initial=3.6cm, physics thermal plate width/.style={thermal plate width={#1}}, thermal plate thickness/.initial=.25cm, physics thermal plate thickness/.style={thermal plate thickness={#1}}, thermal fluid height/.initial=1.2cm, physics thermal fluid height/.style={thermal fluid height={#1}}, thermal flow direction/.initial=1, physics thermal flow direction/.style={thermal flow direction={#1}}, } \pgfdeclareshape{physicsconvectionsurfacenode}{ \savedmacro\tikzphysics@component@physicsconvectionsurfacenodestate{% \tikzphysics@component@length\cw{thermal plate width} \tikzphysics@component@length\ct{thermal plate thickness} \tikzphysics@component@length\cf{thermal fluid height} \pgfmathsetmacro\cd{\pgfkeysvalueof{/tikz/thermal flow direction}} \tikzphysics@component@check{\cw>0 && \ct>0 && \cf>0 && abs(\cd)==1}{Convection lengths must be positive and flow direction must be 1 or -1} \pgfmathsetmacro\ch{\ct+\cf} \pgfmathsetmacro\cy{-\ch/2+\ct} \pgfmathsetmacro\ctop{\ch/2} \addtosavedmacro\cw \addtosavedmacro\ct \addtosavedmacro\cf \addtosavedmacro\cd \addtosavedmacro\ch \addtosavedmacro\cy \addtosavedmacro\ctop } \anchor{center}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{plate-center}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{-\ch/2+\ct/2}} \anchor{fluid-center}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{\cy+\cf/2}} \anchor{heat-start}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{\cd>0 ? \cy : \ctop}} \anchor{heat-end}{\tikzphysics@component@physicsconvectionsurfacenodestate\tikzphysics@component@point{0}{\cd>0 ? \ctop : \cy}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{surface}{\tikzphysics@component@physicsconvectionsurfacenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\cy)*1cm} \tikzphysics@declarepercentanchors{bottom}{\tikzphysics@component@physicsconvectionsurfacenodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(-\ch/2)*1cm} \tikzphysics@declarepercentanchors{flow}{\tikzphysics@component@physicsconvectionsurfacenodestate}{(0)*1cm}{(\cy+(\cd<0 ? 1-\tikzphysics@percent : \tikzphysics@percent)*\cf)*1cm} \beforebackgroundpath{\tikzphysics@component@physicsconvectionsurfacenodestate\begingroup \foreach \i in {-2,-1,0,1,2}{\tikzphysics@thermal@arrow{\i*\cw/6}{\cd>0 ? \cy : \ctop}{\i*\cw/6}{\cd>0 ? \ctop : \cy} } \endgroup} \tikzphysics@declarepercentanchors{right}{\tikzphysics@component@physicsconvectionsurfacenodestate}{(\cw/2)*1cm}{(-\ch/2+\tikzphysics@percent*\ct)*1cm} \tikzphysics@declarepercentanchors{left}{\tikzphysics@component@physicsconvectionsurfacenodestate}{(-\cw/2)*1cm}{(\cy-\tikzphysics@percent*\ct)*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsconvectionsurfacenodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicsconvectionsurfacenodestate \tikzphysics@component@move{-\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{\cy} \tikzphysics@component@line{-\cw/2}{\cy} \pgfpathclose } } \tikzphysics@declarehook{convection surface} \tikzphysics@registerdisplayname{physicsconvectionsurfacenode}{convection surface} \tikzphysics@registeranchors{physicsconvectionsurfacenode}{center,north,south,east,west,plate-center,fluid-center,heat-start,heat-end} \tikzphysics@registerfamilies{physicsconvectionsurfacenode}{surface,bottom,right,left,flow} \tikzphysics@registerkeys{physicsconvectionsurfacenode}{thermal plate width,thermal plate thickness,thermal fluid height,thermal flow direction} \tikzphysics@registerkeydefaults{physicsconvectionsurfacenode}{thermal plate width/3.6cm,thermal plate thickness/.25cm,thermal fluid height/1.2cm,thermal flow direction/1} \tikzset{physicsconvectionsurfacenode/.style={>=latex,shape=physicsconvectionsurfacenode,physics logical shape=physicsconvectionsurfacenode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every convection surface},convection surface/.style={physicsconvectionsurfacenode}} %% cooling fin \tikzset{ fin length/.initial=3cm, physics fin length/.style={fin length={#1}}, fin base height/.initial=1cm, physics fin base height/.style={fin base height={#1}}, fin base thickness/.initial=.25cm, physics fin base thickness/.style={fin base thickness={#1}}, fin thickness/.initial=.18cm, physics fin thickness/.style={fin thickness={#1}}, } \pgfdeclareshape{physicscoolingfinnode}{ \savedmacro\tikzphysics@component@physicscoolingfinnodestate{% \tikzphysics@component@length\cw{fin length} \tikzphysics@component@length\ch{fin base height} \tikzphysics@component@length\cb{fin base thickness} \tikzphysics@component@length\ct{fin thickness} \tikzphysics@component@check{\cw>\cb && \cb>0 && \ch>\ct && \ct>0}{Fin dimensions must satisfy length > base thickness and base height > fin thickness} \addtosavedmacro\cw \addtosavedmacro\ch \addtosavedmacro\cb \addtosavedmacro\ct } \anchor{center}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{root}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{-\cw/2+\cb}{0}} \anchor{tip}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{heat-left}{\tikzphysics@component@physicscoolingfinnodestate\tikzphysics@component@point{-\cw/2}{0}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{base}{\tikzphysics@component@physicscoolingfinnodestate}{(-\cw/2)*1cm}{((-.5+\tikzphysics@percent)*\ch)*1cm} \tikzphysics@declarepercentanchors{axis}{\tikzphysics@component@physicscoolingfinnodestate}{(-\cw/2+\cb+\tikzphysics@percent*(\cw-\cb))*1cm}{(0)*1cm} \tikzphysics@declarepercentanchors{fin-bottom}{\tikzphysics@component@physicscoolingfinnodestate}{(-\cw/2+\cb+\tikzphysics@percent*(\cw-\cb))*1cm}{(-\ct/2)*1cm} \tikzphysics@declarepercentanchors{fin-tip}{\tikzphysics@component@physicscoolingfinnodestate}{(\cw/2)*1cm}{((-.5+\tikzphysics@percent)*\ct)*1cm} \tikzphysics@declarepercentanchors{fin-top}{\tikzphysics@component@physicscoolingfinnodestate}{(\cw/2-\tikzphysics@percent*(\cw-\cb))*1cm}{(\ct/2)*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicscoolingfinnodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicscoolingfinnodestate \tikzphysics@component@move{-\cw/2}{-\ch/2} \tikzphysics@component@line{-\cw/2+\cb}{-\ch/2} \tikzphysics@component@line{-\cw/2+\cb}{-\ct/2} \tikzphysics@component@line{\cw/2}{-\ct/2} \tikzphysics@component@line{\cw/2}{\ct/2} \tikzphysics@component@line{-\cw/2+\cb}{\ct/2} \tikzphysics@component@line{-\cw/2+\cb}{\ch/2} \tikzphysics@component@line{-\cw/2}{\ch/2} \pgfpathclose } } \tikzphysics@declarehook{cooling fin} \tikzphysics@registerdisplayname{physicscoolingfinnode}{cooling fin} \tikzphysics@registeranchors{physicscoolingfinnode}{center,north,south,east,west,root,tip,heat-left} \tikzphysics@registerfamilies{physicscoolingfinnode}{base,axis,fin-bottom,fin-tip,fin-top} \tikzphysics@registerkeys{physicscoolingfinnode}{fin length,fin base height,fin base thickness,fin thickness} \tikzphysics@registerkeydefaults{physicscoolingfinnode}{fin length/3cm,fin base height/1cm,fin base thickness/.25cm,fin thickness/.18cm} \tikzset{physicscoolingfinnode/.style={shape=physicscoolingfinnode,physics logical shape=physicscoolingfinnode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every cooling fin},cooling fin/.style={physicscoolingfinnode}} %% radiating body \tikzset{ radiation radius/.initial=.65cm, physics radiation radius/.style={radiation radius={#1}}, radiation ray length/.initial=.8cm, physics radiation ray length/.style={radiation ray length={#1}}, thermal flow direction/.initial=1, physics thermal flow direction/.style={thermal flow direction={#1}}, } \pgfdeclareshape{physicsradiatingbodynode}{ \savedmacro\tikzphysics@component@physicsradiatingbodynodestate{% \tikzphysics@component@length\cr{radiation radius} \tikzphysics@component@length\cl{radiation ray length} \pgfmathsetmacro\cd{\pgfkeysvalueof{/tikz/thermal flow direction}} \tikzphysics@component@check{\cr>0 && \cl>0 && abs(\cd)==1}{Radiation radius and ray length must be positive and flow direction must be 1 or -1} \addtosavedmacro\cr \addtosavedmacro\cl \addtosavedmacro\cd } \anchor{center}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{0}{\cr}} \anchor{south}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{0}{-(\cr)}} \anchor{east}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{\cr}{0}} \anchor{west}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{-(\cr)}{0}} \anchor{north east}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{1*\cr/sqrt(2)}{1*\cr/sqrt(2)}} \anchor{north west}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{-1*\cr/sqrt(2)}{1*\cr/sqrt(2)}} \anchor{south east}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{1*\cr/sqrt(2)}{-1*\cr/sqrt(2)}} \anchor{south west}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{-1*\cr/sqrt(2)}{-1*\cr/sqrt(2)}} \anchor{heat-start}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{\cr+(\cd<0 ? \cl : 0)}{0}} \anchor{heat-end}{\tikzphysics@component@physicsradiatingbodynodestate\tikzphysics@component@point{\cr+(\cd>0 ? \cl : 0)}{0}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{rim}{\tikzphysics@component@physicsradiatingbodynodestate}{(\cr*cos(360*\tikzphysics@percent))*1cm}{(\cr*sin(360*\tikzphysics@percent))*1cm} \tikzphysics@declarepercentanchors{ray}{\tikzphysics@component@physicsradiatingbodynodestate}{(\cr+(\cd<0 ? 1-\tikzphysics@percent : \tikzphysics@percent)*\cl)*1cm}{(0)*1cm} \beforebackgroundpath{\tikzphysics@component@physicsradiatingbodynodestate\begingroup \foreach \a in {0,45,...,315}{\tikzphysics@thermal@arrow{(\cr+(\cd<0 ? \cl : 0))*cos(\a)}{(\cr+(\cd<0 ? \cl : 0))*sin(\a)}{(\cr+(\cd>0 ? \cl : 0))*cos(\a)}{(\cr+(\cd>0 ? \cl : 0))*sin(\a)} } \endgroup} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsradiatingbodynodestate\pgfpointborderellipse{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cr}{\cr}}} \backgroundpath{\tikzphysics@component@physicsradiatingbodynodestate \tikzphysics@component@ellipse{0}{0}{\cr}{\cr} } } \tikzphysics@declarehook{radiating body} \tikzphysics@registerdisplayname{physicsradiatingbodynode}{radiating body} \tikzphysics@registeranchors{physicsradiatingbodynode}{center,north,south,east,west,heat-start,heat-end} \tikzphysics@registerfamilies{physicsradiatingbodynode}{rim,ray} \tikzphysics@registerkeys{physicsradiatingbodynode}{radiation radius,radiation ray length,thermal flow direction} \tikzphysics@registerkeydefaults{physicsradiatingbodynode}{radiation radius/.65cm,radiation ray length/.8cm,thermal flow direction/1} \tikzset{physicsradiatingbodynode/.style={>=latex,shape=physicsradiatingbodynode,physics logical shape=physicsradiatingbodynode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every radiating body},radiating body/.style={physicsradiatingbodynode},radiation source/.style={physicsradiatingbodynode}} %% thermometer \tikzset{ thermometer height/.initial=3.2cm, physics thermometer height/.style={thermometer height={#1}}, thermometer bulb radius/.initial=.32cm, physics thermometer bulb radius/.style={thermometer bulb radius={#1}}, thermometer stem width/.initial=.18cm, physics thermometer stem width/.style={thermometer stem width={#1}}, thermometer level/.initial=.6, physics thermometer level/.style={thermometer level={#1}}, } \pgfdeclareshape{physicsthermometernode}{ \savedmacro\tikzphysics@component@physicsthermometernodestate{% \tikzphysics@component@length\ch{thermometer height} \tikzphysics@component@length\cr{thermometer bulb radius} \tikzphysics@component@length\cs{thermometer stem width} \pgfmathsetmacro\cp{\pgfkeysvalueof{/tikz/thermometer level}} \tikzphysics@component@check{\cr>0 && \cs>0 && \cs<2*\cr && \ch>4*\cr && \cp>=0 && \cp<=1}{Thermometer requires positive dimensions height > 4 bulb radii stem width < bulb diameter and level in 0..1} \pgfmathsetmacro\cw{2*\cr} \pgfmathsetmacro\cb{-\ch/2+\cr} \pgfmathsetmacro\cj{\cb+sqrt(\cr^2-(\cs/2)^2)} \pgfmathsetmacro\ca{acos(\cs/(2*\cr))} \pgfmathsetmacro\cz{\cb+\cr} \pgfmathsetmacro\ctop{\ch/2-\cs/2} \pgfmathsetmacro\clevel{\cz+\cp*(\ctop-\cz)} \addtosavedmacro\ch \addtosavedmacro\cr \addtosavedmacro\cs \addtosavedmacro\cp \addtosavedmacro\cw \addtosavedmacro\cb \addtosavedmacro\cj \addtosavedmacro\ca \addtosavedmacro\cz \addtosavedmacro\ctop \addtosavedmacro\clevel } \anchor{center}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{bulb-center}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{\cb}} \anchor{liquid-top}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{\clevel}} \anchor{scale-start}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{\cz}} \anchor{scale-end}{\tikzphysics@component@physicsthermometernodestate\tikzphysics@component@point{0}{\ctop}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{scale}{\tikzphysics@component@physicsthermometernodestate}{(0)*1cm}{(\cz+\tikzphysics@percent*(\ctop-\cz))*1cm} \tikzphysics@declarepercentanchors{column}{\tikzphysics@component@physicsthermometernodestate}{(0)*1cm}{(\cb+\tikzphysics@percent*(\clevel-\cb))*1cm} \tikzphysics@declarepercentanchors{bulb}{\tikzphysics@component@physicsthermometernodestate}{(\cr*cos(180-\ca+\tikzphysics@percent*(180+2*\ca)))*1cm}{(\cb+\cr*sin(180-\ca+\tikzphysics@percent*(180+2*\ca)))*1cm} \beforebackgroundpath{\tikzphysics@component@physicsthermometernodestate\begingroup \pgfsetfillcolor{\pgfkeysvalueof{/tikz/thermal liquid color}} \pgfsetstrokecolor{\pgfkeysvalueof{/tikz/thermal liquid color}} \tikzphysics@component@ellipse{0}{\cb}{.55*\cr}{.55*\cr} \pgfusepath{fill} \tikzphysics@component@move{-.225*\cs}{\cb} \tikzphysics@component@line{.225*\cs}{\cb} \tikzphysics@component@line{.225*\cs}{\clevel} \tikzphysics@component@line{-.225*\cs}{\clevel} \pgfpathclose \pgfusepath{fill} \endgroup} \tikzphysics@declarepercentanchors{stem-right}{\tikzphysics@component@physicsthermometernodestate}{(\cs/2)*1cm}{(\cj+\tikzphysics@percent*(\ch/2-\cj))*1cm} \tikzphysics@declarepercentanchors{cap}{\tikzphysics@component@physicsthermometernodestate}{((.5-\tikzphysics@percent)*\cs)*1cm}{(\ch/2)*1cm} \tikzphysics@declarepercentanchors{stem-left}{\tikzphysics@component@physicsthermometernodestate}{(-\cs/2)*1cm}{(\ch/2-\tikzphysics@percent*(\ch/2-\cj))*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsthermometernodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicsthermometernodestate \tikzphysics@component@move{-\cs/2}{\ch/2} \tikzphysics@component@line{\cs/2}{\ch/2} \tikzphysics@component@line{\cs/2}{\cj} \pgfpatharc{\ca}{-180-\ca}{\cr cm} \tikzphysics@component@line{-\cs/2}{\ch/2} \pgfpathclose } } \tikzphysics@declarehook{thermometer} \tikzphysics@registerdisplayname{physicsthermometernode}{thermometer} \tikzphysics@registeranchors{physicsthermometernode}{center,north,south,east,west,bulb-center,liquid-top,scale-start,scale-end} \tikzphysics@registerfamilies{physicsthermometernode}{scale,column,bulb,stem-right,cap,stem-left} \tikzphysics@registerkeys{physicsthermometernode}{thermometer height,thermometer bulb radius,thermometer stem width,thermometer level,thermal liquid color} \tikzphysics@registerkeydefaults{physicsthermometernode}{thermometer height/3.2cm,thermometer bulb radius/.32cm,thermometer stem width/.18cm,thermometer level/.6,thermal liquid color/black} \tikzset{physicsthermometernode/.style={shape=physicsthermometernode,physics logical shape=physicsthermometernode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every thermometer},thermometer/.style={physicsthermometernode}} %% calorimeter \tikzset{ calorimeter width/.initial=3cm, physics calorimeter width/.style={calorimeter width={#1}}, calorimeter height/.initial=2.6cm, physics calorimeter height/.style={calorimeter height={#1}}, calorimeter insulation/.initial=.25cm, physics calorimeter insulation/.style={calorimeter insulation={#1}}, calorimeter level/.initial=.55, physics calorimeter level/.style={calorimeter level={#1}}, } \pgfdeclareshape{physicscalorimeternode}{ \savedmacro\tikzphysics@component@physicscalorimeternodestate{% \tikzphysics@component@length\cw{calorimeter width} \tikzphysics@component@length\ch{calorimeter height} \tikzphysics@component@length\ct{calorimeter insulation} \pgfmathsetmacro\cp{\pgfkeysvalueof{/tikz/calorimeter level}} \tikzphysics@component@check{\cw>0 && \ch>0 && \ct>0 && 2*\ct0 && \cp<1}{Calorimeter requires positive dimensions insulation below half the size and level strictly in 0..1} \pgfmathsetmacro\ciw{\cw/2-\ct} \pgfmathsetmacro\cb{-\ch/2+\ct} \pgfmathsetmacro\ctop{\ch/2-\ct} \pgfmathsetmacro\clevel{\cb+\cp*(\ctop-\cb)} \addtosavedmacro\cw \addtosavedmacro\ch \addtosavedmacro\ct \addtosavedmacro\cp \addtosavedmacro\ciw \addtosavedmacro\cb \addtosavedmacro\ctop \addtosavedmacro\clevel } \anchor{center}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{liquid-center}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{0}{(\cb+\clevel)/2}} \anchor{headspace-center}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{0}{(\clevel+\ctop)/2}} \anchor{liquid-left}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{-\ciw}{\clevel}} \anchor{liquid-right}{\tikzphysics@component@physicscalorimeternodestate\tikzphysics@component@point{\ciw}{\clevel}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{bottom}{\tikzphysics@component@physicscalorimeternodestate}{(-\cw/2+\tikzphysics@percent*\cw)*1cm}{(-\ch/2)*1cm} \tikzphysics@declarepercentanchors{right}{\tikzphysics@component@physicscalorimeternodestate}{(\cw/2)*1cm}{(-\ch/2+\tikzphysics@percent*\ch)*1cm} \tikzphysics@declarepercentanchors{top}{\tikzphysics@component@physicscalorimeternodestate}{(\cw/2-\tikzphysics@percent*\cw)*1cm}{(\ch/2)*1cm} \tikzphysics@declarepercentanchors{left}{\tikzphysics@component@physicscalorimeternodestate}{(-\cw/2)*1cm}{(\ch/2-\tikzphysics@percent*\ch)*1cm} \tikzphysics@declarepercentanchors{lid}{\tikzphysics@component@physicscalorimeternodestate}{((-.5+\tikzphysics@percent)*\cw)*1cm}{(\ch/2)*1cm} \tikzphysics@declarepercentanchors{surface}{\tikzphysics@component@physicscalorimeternodestate}{((-1+2*\tikzphysics@percent)*\ciw)*1cm}{(\clevel)*1cm} \tikzphysics@declarepercentanchors{inner-bottom}{\tikzphysics@component@physicscalorimeternodestate}{((-1+2*\tikzphysics@percent)*\ciw)*1cm}{(\cb)*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicscalorimeternodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicscalorimeternodestate \tikzphysics@component@move{-\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{-\ch/2} \tikzphysics@component@line{\cw/2}{\ch/2} \tikzphysics@component@line{-\cw/2}{\ch/2} \pgfpathclose \tikzphysics@component@move{-\ciw}{\ctop} \tikzphysics@component@line{-\ciw}{\cb} \tikzphysics@component@line{\ciw}{\cb} \tikzphysics@component@line{\ciw}{\ctop} \tikzphysics@component@move{-\ciw}{\clevel} \tikzphysics@component@line{\ciw}{\clevel} } } \tikzphysics@declarehook{calorimeter} \tikzphysics@registerdisplayname{physicscalorimeternode}{calorimeter} \tikzphysics@registeranchors{physicscalorimeternode}{center,north,south,east,west,liquid-center,headspace-center,liquid-left,liquid-right} \tikzphysics@registerfamilies{physicscalorimeternode}{bottom,right,top,left,lid,surface,inner-bottom} \tikzphysics@registerkeys{physicscalorimeternode}{calorimeter width,calorimeter height,calorimeter insulation,calorimeter level} \tikzphysics@registerkeydefaults{physicscalorimeternode}{calorimeter width/3cm,calorimeter height/2.6cm,calorimeter insulation/.25cm,calorimeter level/.55} \tikzset{physicscalorimeternode/.style={shape=physicscalorimeternode,physics logical shape=physicscalorimeternode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every calorimeter},calorimeter/.style={physicscalorimeternode}} %% expansion rod \tikzset{ expansion rod length/.initial=3cm, physics expansion rod length/.style={expansion rod length={#1}}, expansion rod thickness/.initial=.16cm, physics expansion rod thickness/.style={expansion rod thickness={#1}}, expansion separation/.initial=.65cm, physics expansion separation/.style={expansion separation={#1}}, thermal expansion ratio/.initial=1.1, physics thermal expansion ratio/.style={thermal expansion ratio={#1}}, } \pgfdeclareshape{physicsexpansionrodnode}{ \savedmacro\tikzphysics@component@physicsexpansionrodnodestate{% \tikzphysics@component@length\cl{expansion rod length} \tikzphysics@component@length\ct{expansion rod thickness} \tikzphysics@component@length\cs{expansion separation} \pgfmathsetmacro\cp{\pgfkeysvalueof{/tikz/thermal expansion ratio}} \tikzphysics@component@check{\cl>0 && \ct>0 && \cs>\ct && \cp>0 && \cp<=3}{Expansion rod lengths must be positive separation must exceed thickness and ratio must lie in 0..3} \pgfmathsetmacro\cw{\cl*max(1,\cp)} \pgfmathsetmacro\ch{\cs+\ct} \pgfmathsetmacro\cle{\cl*\cp} \addtosavedmacro\cl \addtosavedmacro\ct \addtosavedmacro\cs \addtosavedmacro\cp \addtosavedmacro\cw \addtosavedmacro\ch \addtosavedmacro\cle } \anchor{center}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{0}{0}} \anchor{north}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{0}{\ch/2}} \anchor{south}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{0}{-(\ch/2)}} \anchor{east}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{\cw/2}{0}} \anchor{west}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-(\cw/2)}{0}} \anchor{north east}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{\cw/2}{\ch/2}} \anchor{north west}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-(\cw/2)}{\ch/2}} \anchor{south east}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{\cw/2}{-(\ch/2)}} \anchor{south west}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-(\cw/2)}{-(\ch/2)}} \anchor{original-start}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-\cw/2}{-\cs/2}} \anchor{original-end}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-\cw/2+\cl}{-\cs/2}} \anchor{expanded-start}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-\cw/2}{\cs/2}} \anchor{expanded-end}{\tikzphysics@component@physicsexpansionrodnodestate\tikzphysics@component@point{-\cw/2+\cle}{\cs/2}} \anchor{text}{\pgf@x=-.5\wd\pgfnodeparttextbox\pgf@y=-.5\ht\pgfnodeparttextbox\advance\pgf@y by.5\dp\pgfnodeparttextbox} \tikzphysics@declarepercentanchors{original}{\tikzphysics@component@physicsexpansionrodnodestate}{(-\cw/2+\tikzphysics@percent*\cl)*1cm}{(-\cs/2)*1cm} \tikzphysics@declarepercentanchors{expanded}{\tikzphysics@component@physicsexpansionrodnodestate}{(-\cw/2+\tikzphysics@percent*\cle)*1cm}{(\cs/2)*1cm} \anchorborder{\edef\cpx{\the\pgf@x}\edef\cpy{\the\pgf@y}\tikzphysics@component@physicsexpansionrodnodestate\pgfpointborderrectangle{\pgfpoint{\cpx}{\cpy}}{\tikzphysics@component@point{\cw/2}{\ch/2}}} \backgroundpath{\tikzphysics@component@physicsexpansionrodnodestate \tikzphysics@component@move{-\cw/2}{(-\cs-\ct)/2} \tikzphysics@component@line{-\cw/2+\cl}{(-\cs-\ct)/2} \tikzphysics@component@line{-\cw/2+\cl}{(-\cs+\ct)/2} \tikzphysics@component@line{-\cw/2}{(-\cs+\ct)/2} \pgfpathclose \tikzphysics@component@move{-\cw/2}{(\cs-\ct)/2} \tikzphysics@component@line{-\cw/2+\cle}{(\cs-\ct)/2} \tikzphysics@component@line{-\cw/2+\cle}{(\cs+\ct)/2} \tikzphysics@component@line{-\cw/2}{(\cs+\ct)/2} \pgfpathclose } } \tikzphysics@declarehook{expansion rod} \tikzphysics@registerdisplayname{physicsexpansionrodnode}{expansion rod} \tikzphysics@registeranchors{physicsexpansionrodnode}{center,north,south,east,west,original-start,original-end,expanded-start,expanded-end} \tikzphysics@registerfamilies{physicsexpansionrodnode}{original,expanded} \tikzphysics@registerkeys{physicsexpansionrodnode}{expansion rod length,expansion rod thickness,expansion separation,thermal expansion ratio} \tikzphysics@registerkeydefaults{physicsexpansionrodnode}{expansion rod length/3cm,expansion rod thickness/.16cm,expansion separation/.65cm,thermal expansion ratio/1.1} \tikzset{physicsexpansionrodnode/.style={shape=physicsexpansionrodnode,physics logical shape=physicsexpansionrodnode,anchor=center,draw=black,fill=none,inner sep=0pt,outer sep=0pt,physics debug setup,every physics object,every expansion rod},expansion rod/.style={physicsexpansionrodnode},thermal expansion rod/.style={physicsexpansionrodnode}} \makeatother \endinput .