using System; using L=Science.Physics.GeneralPhysics; namespace Serway.Chapter20 { /// /// Example08: Heating a Solid /// A 1.0 kg bar of copper is heated at atmospheric pressure. /// If its temperature increases from 20 C to 50 C, /// (A) what is the work done on the copper bar by the /// surrounding atmosphere? /// W = - 1.7 \times 10^{-2} J /// (B) What quantity of energy is transfered to the copper /// bar by heat? /// Q = 1.2 \times 10^4 J /// (C) What is the increase in internal energy of the copper /// bar? /// \Delta E_{int} = 1.2 \times 10^4 J /// public class Example08 { public Example08() { } private string result; public string Result { get{return result;} } public void Compute() { L.Work W = new L.Work(); W.J = - 1.013E5*5.1E-5*(50.0-20.0)*1.0/8.92E3; result+=W.ToString()+"\r\n"; L.Heat Q = new L.Heat(); Q.J = 1.0*387.0*(50.0-20.0); result+=Q.ToString()+"\r\n"; L.Energy U = new L.Energy(); U.VariableQ = true; L.FundamentalLaw.ThermodynamicsFirstLaw(Q,W,U); result+=U.ToString()+"\r\n"; } } } /* -0.0173754484304933 +/- 0 (J) 11610 +/- 0 (J) 11609.9826245516 +/- 0 (J) */