Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Different behavior

Return to the EJS Modeling forum
Login to post to this thread

Different behavior - Sep 13, 2012 at 2:12AM
Ivo Gienal
9 Posts

Normally I use the Newton 2 version in the ODE Evolution tab: dv/dt = F_Res/m, as I teach my students to use in solving problems. As an example of an anharmonic system I sometimes use an experiment with an air track, where the glider is attached to a spring vertically above the middle of the air track, similar to the quartic. ejs example from the OSP digital library. I introduce a variable F_D_x for the force in the x direction and in the Fixed relations I put: F_D_x = D*x*(1 - h/Math.hypot(x,h)), with D = spring constant and h = the length of the spring in equilibrium position. On the ODE tab I write: dv/dt = - F_D_x/m. With a moderate time step dt = 0.1 the resulting oscillating has an increasing amplitude instead of the expected constant one (anharmonic_oscillator_1.jar). When I put in the ODE Tab dv/dt = - D*x*(1 - h/Math.hypot(x,h)), the amplitude is constant (anharmonic_oscillator_2.jar). Can someone explain the different behavior?

Attached File: anharmonic_oscillator_1.zip


Current Replies - View all
Re: Different behavior   (Francisco Esquembre - Sep 13 2012 at 5:02AM)
The OSP Network:
Open Source Physics - Tracker - EJS Modeling
Physlet Physics
Physlet Quantum Physics