Group velocity simulations

110 views
Skip to first unread message

issacnewton

unread,
Dec 14, 2011, 4:46:11 AM12/14/11
to sage-support
Hi

I want to add waves with different frequencies and velocities and do a
real time simulation to demonstrate the concept of group and phase
velocity
in physics. Wikipedia has an article here http://en.wikipedia.org/wiki/Group_velocity
where we can see the simulations for group velocities.
This one (http://en.wikipedia.org/wiki/File:Wave_opposite-group-phase-
velocity.gif) done by user geek3 has a source code in mathematica.
I want to do this in sage. But I should be able to add more than 2
waves and see the simulation. How can I do that ?

thanks

Jason Grout

unread,
Dec 14, 2011, 5:27:13 AM12/14/11
to sage-s...@googlegroups.com

issacnewton

unread,
Dec 14, 2011, 10:37:54 AM12/14/11
to sage-support
awesome Jason,

If I have to add more than two waves, is there any way I can use 'for'
command
to loop the additions ?

thanks

On Dec 14, 3:27 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> On 12/14/11 3:46 AM, issacnewton wrote:
>
> > Hi
>
> > I want to add waves with different frequencies and velocities and do a
> > real time simulation to demonstrate the concept of group and phase
> > velocity

> > in  physics. Wikipedia has an article herehttp://en.wikipedia.org/wiki/Group_velocity

Jason Grout

unread,
Dec 14, 2011, 12:20:57 PM12/14/11
to sage-s...@googlegroups.com
On 12/14/11 9:37 AM, issacnewton wrote:
> awesome Jason,
>
> If I have to add more than two waves, is there any way I can use 'for'
> command
> to loop the additions ?
>

I don't understand the math behind the example, so I don't know the
answer to your question for sure, but wouldn't you just add another
cosine term for another wave?

The for loop (the list comprehension) is just to get the frames of the
animation (i.e., it plots one frame for every 1/50 second for one second.

Thanks,

Jason

Reply all
Reply to author
Forward
0 new messages