Sei sulla pagina 1di 12

Spreadsheets in Education (eJSiE)

Volume 2 | Issue 3 Article 3

3-5-2008

Spreadsheet Numerical Modeling in Secondary School Physics and Biology


Jan Benacka
Constantine the Philosopher University, Nitra, Slovakia, jbenacka@ukf.sk

Follow this and additional works at: http://epublications.bond.edu.au/ejsie Recommended Citation


Benacka, Jan (2007) "Spreadsheet Numerical Modeling in Secondary School Physics and Biology," Spreadsheets in Education (eJSiE): Vol. 2: Iss. 3, Article 3. Available at: http://epublications.bond.edu.au/ejsie/vol2/iss3/3

This In the Classroom Article is brought to you by the Faculty of Business at ePublications@bond. It has been accepted for inclusion in Spreadsheets in Education (eJSiE) by an authorized administrator of ePublications@bond. For more information, please contact Bond University's Repository Coordinator.

Spreadsheet Numerical Modeling in Secondary School Physics and Biology


Abstract

The paper gives three examples of numeric modeling with spreadsheets in secondary school (age 15+) physics and biology free fall in the air, animal population, and damped oscillation. The aim is to introduce the reader to numeric modeling. The simplest numeric methods are used Eulers, and the finite difference method. The models enable student to experiment with the inputs and investigate the behavior of the systems.
Keywords

spreadsheet model, secondary school, dynamic systems, physics, biology

This in the classroom article is available in Spreadsheets in Education (eJSiE): http://epublications.bond.edu.au/ejsie/vol2/iss3/3

Benacka: Numerical modeling in secondary school physics and biology

SpreadsheetNumericalModelingin SecondarySchoolPhysicsandBiology
Abstract
Thepapergivesthreeexamplesofnumericalmodelingwithspreadsheetsinsecondaryschool (age15+)physicsandbiologyfreefallintheair,animalpopulation,anddampedoscillation.The aimistointroducethereadertonumericalmodeling.Thesimplestnumericalmethodsareused Eulers,andthefinitedifferencemethod.Themodelsenablestudenttoexperimentwiththeinputs andinvestigatethebehaviorofthesystems.

Keywords:spreadsheetmodel,secondaryschool,dynamicsystems,physics,biology.

1. Introduction During secondary school study, students are acquainted with various dynamic systems. The behavior of these can be described by differential equations. However, calculusisusuallytaughtinthehighestgrade,sothesystemsarestudiedinasimplified way,andtheconditionsareidealized.Itisratherfrustratingthenforayoungscientistto hearattheendofaphysicslessonthatallthepresentedtheoryisafairytaleasthemain preconditionisusuallynotfulfilled(vacuuminthefreefallofabody),orevencannotbe fulfilled (eliminating the damping force of a harmonic oscillator). In some cases, the precondition can be fulfilled easily (amplitude smaller than 5 degrees of a simple pendulum); in some cases, there is no idealization (animal population). Hence, some standard questions arise among students who are genuinely interested in the matter: whatisthesolution,orwhatisthebehavioroftherealsystemwithouttheidealization? Onewaytoanswerthequestion,andtoenlargetheknowledgeofpassionateyoung scientists, is by making models using numerical methods. The mathematics of those is easytocomprehend.Themainpreconditionforgettingamodelofsufficientprecisionis todividetheintervaloftheindependentvariableintoalargenumberofsubintervals.As the length of these approaches zero, the ratio of finite differences approaches the derivative,e.g. v = lim ( s t ) = d s d t .Aspreadsheetprogramistheidealtooltocarry
t 0

out such a model. It presents an interactive form that enables students to experiment andfindboundaryorlimitingcases. In the paper, three examples of such modeling in secondary school physics and biologyaregivenfreefallintheair,dampedoscillation,andanimalpopulation.They weremadeinExcel2003.Theonlyskillthatisrequiredismakingthemaximumranges oftheaxesinthechartsconstant,ifnecessary.

2007SpreadsheetsinEducation,BondUniversity. http://epublications.bond.edu.au/ejsie/

Allrightsreserved.

Produced by The Berkeley Electronic Press, 2007

Spreadsheets in Education (eJSiE), Vol. 2, Iss. 3 [2007], Art. 3


NUMERICALMODELINGINSECONDARYSCHOOLPHYSICSANDBIOLOGY

2. Freefallintheair

The acceleration of free fall g is commonly measured in secondary school physics. Onemethodisbasedonthefreefallofasolidbodyofconstantmass mfromaknown height while a stopwatch measures the duration of the fall. If the fall takes place in a vacuum, then only the gravity force G = gm acts on the body (downwards). Let the positive y semiaxis be oriented downwards, and let the body start at time t = 0 from positiony=0atvelocityv=0.Theequationofmotionis(weassumeconstantmassm)
m dv = mg , v( 0) = 0 , y(0) = 0 , dt

(1)

or, as approximated by using a discrete difference equation in the first grade of secondaryschool(age15inSlovakia;fourgradesaltogether),
m v = mg , v(0) = 0 , y(0) = 0 . t

(2)

Thevelocityvandpositionyofthebodyisgivenbythewellknownformulas[1]

v = gt , y =

1 2 gt . 2

(3)

ThegraphsofvandyagainsttareinFig.1.

Figure1:Velocityanddistanceofafreefallingballintheair

Theseformulasareonlyvalidinavacuum.Wemarkthem y v and v v .However,the fallusuallytakesplaceintheair.Therearetwoforcesthatactonafallingbodygravity

290

http://epublications.bond.edu.au/ejsie/vol2/iss3/3

Benacka: Numerical modeling in secondary school physics and biology


JANBENACKA

G = gm (downwards) and the air resistance force (drag) F = CS a v 2 / 2 (upwards) [2],


where C is the drag coefficient that is dependent on the shape of the body, S is the maximumcrosssectionareaofthebodyperpendiculartothedirectionofthevelocity, and a is the density of the air. We assume the body to be solid enough not to lose weightduetothedragandtemperaturerise,i.e.weassumeconstantmassm,again.The equationofmotionis
m dv 1 = mg CS a v 2 , v( 0) = 0 , y(0) = 0 . dt 2

(4)

or

dv = g Av 2 , v( 0) = 0 , y(0) = 0 , dt
or,asapproximatedbyusingadiscretedifferenceequation,

(5)

v g Av 2 , v(0) = 0 , y(0) = 0 , t
where
A= CS a . 2m

(6)

(7)

Weassumethatthebodyisaballwithdiameterdanddensity b .Then,

A=

3 C a . 4 d b

(8)

ParametersC,d, a , b ,garetheinputs.Foraball,Crangesfrom0.1to0.5depending onthesmoothnessofthesurface[3].IfA=0,wegetthecaseinwhichthetaskandthe solutionareinavacuum. Supposethatthefalltakesplaceintimeinterval 0 , t max .Wedividetheintervalinton


equal segments of length t = t i t i 1 . We get time points t i , i = 0 , 1, t n = t max and t i = t i 1 + t , t 0 = 0 .
(9)

, n , where

Thevelocityincrementattime t i resultsfromequation(6)

vi = g Avi2 t .
Thevelocityattime t i is
v i = v i 1 + v i 1 ,

(10)

(11)

eJSiE2(3)289298

InTheClassroom

291

Produced by The Berkeley Electronic Press, 2007

Spreadsheets in Education (eJSiE), Vol. 2, Iss. 3 [2007], Art. 3


NUMERICALMODELINGINSECONDARYSCHOOLPHYSICSANDBIOLOGY

or,usingequation(10)atindex(i1)
v i = v i 1 + g Av i21 t , i = 1,

, n , v0 = 0 .

(12)

Recurrence equations (9), (12) enable one to compute points (t i , v i ) of the velocity graph.Theresultfor n = 1000 isinFig.1.Thegraycellscontainformulas.Thecolumns fori, t i , v v , v i , y v , y i continuedownwardsfor1000rows(hiddencolumnsVAG).

Since
v= dy y , dt t

(13)

then
yi = vi t .

(14)

As
y i = y i 1 + y i 1 ,

(15)

weget
y i = y i 1 + vi 1 t , y 0 = 0 .

(16)

Recurrence equations (9), (16) enable one to compute points (t i , y i ) of the distance graph.Theresultat n = 1000 isinFig.1. As G is constant, and the resistance force F increases with the balls velocity, the latter has to equalize the first one at some time. From then on, the body continues movingwithconstantvelocity v max theterminalvelocityofthefall.TheequationG=F yields v max = g A . The graph of this constant function is a horizontal line an asymptotetothevelocitygraph(seeFig.1).Wecreateitbydesigningatwopointgraph givenbypoints (0 , v max ) and (t max , v max ) . Thedistancegraphofauniformlymovingbodyisaline.Consequently,whentheballs velocityapproachestheasymptoticvelocity v max ,thedistancegraphhastomergewith alinethe asymptotetothegraph.Thedistancebetweenthepointsofthegraphand theasymptotedecreasesastimetincreases.Then,atanyaccuracythatoneworkswith, therehastobeatimepointfromwhichonthedistanceistoosmalltobeconsiderable, andwecanomitthati.e.weassumethenextpointsofthegraphtobethepointsofthe asymptote. Hence, if t max is big enough (see below), we may take points (t n , y n ) ,

(t n1 , y n1 ) forthepointsoftheasymptoteandgettheequationoftheasymptote,which
y= y n y n 1 y y (t t n ) + y n = n n1 (t t n ) + y n = v n1 (t t n ) + y n , t n t n 1 t

is
(17)

292

http://epublications.bond.edu.au/ejsie/vol2/iss3/3

Benacka: Numerical modeling in secondary school physics and biology


JANBENACKA

whereweuseequation(16).As v n1 = v max = g A (seeabove),theasymptoteis y = g A (t t n ) + y n .


(18)

Weusethefollowingproceduretogettheasymptote:wheneverwechangeinputsC,d, a , b , g, we adjust t max to a value big enough to get a velocity graph with clear asymptoticalpart(itis t max = 30 sec inFig.1).Thevaluesof t n , y n arecomputedinthe lastrow(1007)ofthetable.Werefertothosecellsinthecellslabeledhelp(hidden)to getthevaluesatourdisposal.Then,wecopy t n , y n totheclipboard,andpastespecial the values (only) into the white cells labeled asymptote(the asymptote is made as a twopointgraphuponthesefourcells).Then,weadjust t max tothepreviousvalue(13 secinthiscase).Thegraphschangeback,buttheasymptotestayssteady.Ashortmacro canexecutethecopyingandpasting(seebuttonasymptoteinFig.1),however,there isnopossibilitytoundothepreviousactions. Theanalyticsolutiontoequation(5)is[2,4]
v= g 1 tanh t gA , y = ln cosh t gA . A A

)]

(19)

Forthechosenball(diameterd=2cm,madeofiron b = 7800 kgm3,dragcoefficientC = 0.4, air density a = 1.29 kgm3, t max = 13 sec divided into 1000 segments, gravity acceleration g = 9.81 ms2),themaximumerrorinvelocityis0.05%att=5.42sec;the error at t = 13 sec is 0.02 %. The error in distance is 100 % at i = 1 (t = 0.013 sec) and decreasesrapidlyto10%ati=10(t=0.13sec),to1%ati=98(t=1.28sec),andto0.1% ati=587(t=7.63sec);theerroratt=13secis0.04%. Remarks: For numerical ordinary differential equations see [5]; for spreadsheet analysis of school experiments with falling balls with quadratic drag see [6]; for modelingprojectilemotionwithquadraticdragwithspreadsheetssee[7];foraccuracy incomputingaccelerationoffreefallifequation(3)isusedinsteadofequation(19)see [8].

3. Modelofanimalpopulation

Inthelogisticgrowthmodel,thenumberNofanimalsofonespeciesthatliveina closedterritoryandfeedonfoodonlyproducedthereisgivenbydifferentialequation [9,10] dN r = rN N 2 , N (0 ) = N 0 , dt K or,approximately, N r = rN N 2 , N (0 ) = N 0 , t K


(21) (20)

eJSiE2(3)289298

InTheClassroom

293

Produced by The Berkeley Electronic Press, 2007

Spreadsheets in Education (eJSiE), Vol. 2, Iss. 3 [2007], Art. 3


NUMERICALMODELINGINSECONDARYSCHOOLPHYSICSANDBIOLOGY

whereristhegrowthrate(incrementinnumberofspecimenperheadandtimeunit;it is 5.07; 0.39; 0.23; 0.0125 [11] per year for the field mouse, sardine, roe deer, and man worldwide,respectively),Kisthecarryingcapacityofthehabitat(maximumnumberof specimenthattheterritorycanprovidewithfood),and N 0 isthenumberofindividuals atthestart.Quantitiesr,K, N 0 aretheinputs. Supposethatthesystemdevelopsoverthetimeinterval 0 , t max .Wedividetheinterval intonequalsegmentsoflength t = t i t i 1 .Wegettimepoints t i , i = 0 , 1, t n = t max and t i = t i 1 + t , t 0 = 0 . TheincrementalgrowthofthenumberNattime t i is
r N i = rN i N i2 t . K Thenumberofanimalsintime t i isthen N i = N i 1 + N i 1 , i = 1, or r N i = N i 1 + rN i 1 N i21 t , i = 1, K , n.
(25) (23) (22)

, n ,where

, n , N 0 is given

(24)

Recurrenceequations(22),(25)enableonetocomputepoints (t i , N i ) ofthegraph.The resultat n = 1000 isinFig.2.Thegraycellscontainformulas.Thecolumnsfori, t i ,and N i ,continuedownwardsfor1000rows(hiddencolumnsKM). If t max >> 1 , the number N approaches the capacity K (N cannot exceed K). Hence, theline N = K isanasymptoteofthegraph.Wecancreateitasatwopointgraphgiven bypoints (0 , K ) and (t max , K ) . Theanalyticsolutiontoequation(20)is[10]
y= y0 , y 0 + (1 y 0 ) e rt

(26)

where y = N K , y 0 = N 0 K ; y , y 0 < 1 . Forthechosensystem(growthrater=0.39,capacityK=100,startingnumber N 0 = 2 , t max = 30 yearsdividedinto1000segments),themaximumerrorinNis0.98%att=7 years.

294

http://epublications.bond.edu.au/ejsie/vol2/iss3/3

Benacka: Numerical modeling in secondary school physics and biology


JANBENACKA

Figure2:Populationofanimalsinaclosedterritory

4. Dampedoscillationofabodyonspring

A body on spring is a subject to two forces the elasticity of the spring, and the gravity.Theresultantforceisdirectlyproportionaltothedeflectionyandactsagainstit. Ifthebodystartsattimet=0frompositiony=A(Aistheamplitude)atvelocityv=0, thentheequationofmotionis m or
ma = ky , y(0) = A , v(0) = 0 ,

d2 y = ky , y(0) = A , v(0) = 0 . dt2

(27)

(28)

wherekistheelasticconstantofthespring,andaistheacceleration. Thesolutionis[12,13]
y = A cos(t ) ,

(29)

where = k m . (We note that the derivation of equation (29) in the first grade of secondary school is often based on a parallelism between the oscillator and circular motion,inwhichcasethemethodisveryvague.) equation(29)describesthemotionofanidealoscillatorthatmoveswithoutanyfriction. However,thefrictionforcealwaysactsbetweentheparticlesofarealspring,andthat dampen the oscillation until it stops (moreover, there is the air drag, but we can eliminatethatifweputtheoscillatorinavacuumchamber).Thefrictionforceisdirectly proportionaltothevelocityv,andactsagainstthedeflectiony.Theequationofmotion is
295

eJSiE2(3)289298

InTheClassroom

Produced by The Berkeley Electronic Press, 2007

Spreadsheets in Education (eJSiE), Vol. 2, Iss. 3 [2007], Art. 3


NUMERICALMODELINGINSECONDARYSCHOOLPHYSICSANDBIOLOGY

d2 y = rv ky , dt2

(30)

whereristhedampingcoefficient.Introducing 2 = r m ,weget d2 y dy + 2 + 2 y = 0 , y(0) = A , v(0) = 0 . 2 dt dt


(31)

Supposethattheoscillationtakeplaceintimeinterval 0 , t max .Wedividetheinterval intonequalsegmentsoflength t = t i t i 1 .Wegettimepoints t i , i = 0 , 1, t n = t max and t i = t i 1 + t , t 0 = 0 . Weapproximate[14]


d y y y i y i 1 = , dt t t

, n ,where

(32)

(33)

dy y y i +1 y i y i y i 1 d d y y 2y i + y i 1 dt t t t = = = i +1 , 2 dt t t ( t )2 dt
2

(34)

y(0 ) = y 0 = A , v(0 ) =

y t

=
t =0

y1 y 0 =0. t

(35)

Substitutionofequation(3335)intoequation(31)gives

y i +1 = 2 2h 2 h 2 y i + (2h 1)y i 1 , y 0 = A , y 1 = A ,

(36)

wherehisfor t tosimplifythenotation. Recurrence equations(32),(36)enableonetocomputepoints (t i , y i ) ofthegraph.The resultfor n = 1000 isinFig.3.Thegraycellscontainformulas.Thecolumnsfori, t i , y i continuedownwardsfor1000rows(hiddencolumnsKM). Ifweputr=0,thenwegetthefreeoscillation.Ifweaddtheanalyticgraphgivenby equation (29) into the chart, then we can check that the graphs are the same (this is a demonstrationthatequation(29)isvalidthevalidityofsuchaproofiscomparable tothevalidityoftheabovementionedparallelism;themaximumdifferencebetweenthe numericalandtheanalyticmodelis 0.024 ). Theanalyticsolutiontoequation(31)is[12,13]

> : y = A e t cosh(t 2 2 ) +

sinh(t 2 2 ) 2 2

(37)

= : y = A e t (1 + t )

(38)

296

http://epublications.bond.edu.au/ejsie/vol2/iss3/3

Benacka: Numerical modeling in secondary school physics and biology


JANBENACKA

< : y = A e t cos(t 2 2 ) +

sin(t 2 2 ) 2 2

(39)

Theerrorofthenumericalmodelatthestatedinputs(A=2,m=0.1,r=0.02,k=0.14,and t max = 20 secdividedto1000segments)is0.885%att=16sec.

Figure3:Dampedoscillationofabodyonspring

5. Conclusion

The examples show that it is possible to model dynamic systems without the knowledge of the differential equations that describe them, as well as the analytic solutions. The difference equations, which are presented to students in secondary school, give a good approximation even in the case of the second derivative, and the numericalmodelsarepreciseenoughcomparedtotheanalyticsolution. Theaimofthepaperistointroducethereadertonumericalmodeling.Thatiswhy we have used the simplest numerical methods Eulers method in the first and the second example, and the finite difference method in the third one. We note that increasingthenumberofdivisionalpointsofthemaintimeintervale.g.to5000makes the methods considerably more precise. There are more precise methods that might havebeenused,buttheyaremorecomplicated.Theinterestedpersonscanfindthemin theliterature. Themodelsmirrorwellphysicalreality.Theyenablestudenttoexperimentwiththe inputsandlookforrelationsbetweenthemandthebehaviorofthesystem.Themodels arealsousefulforshowingandstudyingthelimitingcasesthatexistateachsystem. WerefertoWikipediaonpurposetogettheinformationatstudentsdisposal.

eJSiE2(3)289298

InTheClassroom

297

Produced by The Berkeley Electronic Press, 2007

Spreadsheets in Education (eJSiE), Vol. 2, Iss. 3 [2007], Art. 3


NUMERICALMODELINGINSECONDARYSCHOOLPHYSICSANDBIOLOGY

References
[1] Freefall.InWikipedia,TheFreeEncyclopedia.Retrieved10:40,Oct5,2007,from http://en.wikipedia.org/wiki/Free_fall [2] Drag(physics).InWikipedia,TheFreeEncyclopedia.Retrieved10:40,Oct5,2007,from http://en.wikipedia.org/wiki/Atmospheric_drag [3] Dragcoefficient.InWikipedia,TheFreeEncyclopedia.Retrieved10:40,Oct5,2007,from http://en.wikipedia.org/wiki/Drag_coefficient [4] BargerV.D.,andOlssonM.G.(1995).Classicalmechanics:amodernperspective,2nd ed.McGrawHill,NewYork.ISBN0070037345. [5] Numericalordinarydifferentialequations.InWikipedia,TheFreeEncyclopedia. Retrieved10:40,Oct5,2007,from http://en.wikipedia.org/wiki/Numerical_ordinary_differential_equations [6] Gluck,P.(2003).Airresistanceonfallingballsandballoons.ThePhysicsTeacher41(3), 178180.ISSN0031921x. [7] Neuwirth,E.,andArganbrightD.(2004).TheActiveModeler:MathematicalModeling withMicrosoftExcel.Thompson/BrooksColePublishers,Belmont,CA,USA.ISBN0 534420850. [8] Benacka,J.andStubnaI.(2005).Accuracyincomputingaccelerationoffreefallinthe air.ThePhysicsTeacher43(7),432433.ISSN0031921x [9] Smitalova,K.,andSujanS.(1989).Dynamickmodelybiologickchspoloenstiev. Veda,Bratislava,Slovakia.ISBN8022400335 [10] Logisticfunction.InWikipedia,TheFreeEncyclopedia.Retrieved10:40,Oct5,2007, fromhttp://en.wikipedia.org/wiki/Logistic_growth [11] http://www.census.gov/ipc/www/idb/worldpopinfo.html [12] Harmonicoscillator.InWikipedia,TheFreeEncyclopedia.Retrieved10:40,Oct5,2007, fromhttp://en.wikipedia.org/wiki/Harmonic_oscillator [13] Tipler,P.A.(1982).PhysicsforScientistsandEngineers,2nded.WorthPublishers, NewYork.ISBN0879011831 [14] Finitedifference.InWikipedia,TheFreeEncyclopedia.Retrieved10:40,Oct5,2007, fromhttp://en.wikipedia.org/wiki/Finite_difference

298

http://epublications.bond.edu.au/ejsie/vol2/iss3/3

10

Potrebbero piacerti anche