[Stk] Mesh2D
Gautham Mysore
dimefreak@hotmail.com
Sat, 19 Apr 2003 09:17:11 +0530
Hello,
I have been doing some reading on Digital Waveguide Mesh Modelling and its
application to room acoustics modelling. I just went through the Mesh2D
class to strengthen my understanding of the rectilinear waveguide mesh
implementation. The STK is such an excellent resource for learning about
such algorithms. I would like to write some classes of my own for other
waveguide mesh topologies. I have a few questions about the Mesh2D class. I
would greatly appreciate it if someone could help me out with these
questions.
1) Intuitively, I would think that the left/right going waves should be the
positive/negative -x velocity waves and that the up/down going waves should
be the positive/negative -y velocity waves. However, in the tick0() and
tick1() methods, it seems like it is "the other way around"
(positive/negative -x velocity waves are the up/down going waves and
positive/negative -y velocity waves are the left/right going waves).
Everything makes sense if it is "the other way around". For example, if it's
"the other way around", the juction velocity of any given junction is
calculated from the 4 incoming velocity waves (like it should be). In
tick0(), when the junction velocity v[2,2] is calculated, the equation is :
v[2,2] = ( vxp[2,2] + vxm[3,2] + vyp[2,2] + vym[2,3] ) * VSCALE
If it's "the other way around", all 4 of the waves will flow into the
junction. Otherwise, only vxp[2,2] and vyp[2,2] will flow into the junction.
Should it be "the other way around", or is there something that I am missing
here?
2) Is there a reason why the output is taken at the far corner rather than
at any other place in the mesh? I would like to take the output at various
points in the mesh since I would like to use it for room acoustics
modelling. If I want to take the output at some place in the middle of the
mesh how would I go about doing this. Do I add up the outgoing waves from a
given junction (at which I want to take the output), do I do some operation
on these waves, or is it something else? None of the papers that I went
through seemed to clearly explain this point. I really want to know the
answer to this question. Please excuse me if this is more a theory question
than something to do directly with the STK.
3) To exite the mesh at a given junction, the exitation amplitude is added
to 2 of the incoming waves to the given junction (in the Mesh2D class). I
read (in the paper,"DSP Formulation of a Finite Difference Method for Room
Acoustics Simulation" by Savioja et al) that to exite the mesh at a given
junction, amplitude/2 is added to each of the waves going into a junction.
Since in this class, there are 4 input waves to a junction, I guess adding
amplitude to 2 of the incoming waves would have the same effect as adding
amplitude/2 to all 4 of the incoming waves. Is this all there is to it or is
there something else that I am missing?
Thanks a Lot,
Gautham
_________________________________________________________________
Gizmo freak? See what's the hottest. http://www.msn.co.in/Computing/Gizmos/
Read product reviews.