Underwater Simulation Model for Network Simulator 2

Keywords: Underwater Networks, Underwater Communications, NS-2, Underwater Simulation

The original source code for underwater simulation model can be found here. However this piece of code is no longer officially maintained by the developers, meaning No official help is available. The original documentation can be downloaded from this link.

When I tired to install the original module, I got some errors during installation. I have fixed those errors and the latest working underwater simulation module can be found here. All credit should go to the original developers.

Installation Steps

Follow these steps to install underwater module into your ns2 installation.

  1. Place underwater.h and underwater.cc in ~/ns-2.29/mobile directory.
  2. Place undewaterchannel.h, underwaterchannel.cc, underwater-phy.h and underwater-phy.cc in ~/ns2.29/mac directory.
  3. Add these lines to MakeFile: mobile/underwater.o, mac/undewaterchannel.o and mac/underwater-phy.o and save the file.
  4. Add following lines to  ~/ns-2.29/tcl/lib/ns-defaults.tcl

    Phy/UnderwaterPhy set CPThresh_ 10.0
    Phy/UnderwaterPhy set CSThresh_ 20.0
    Phy/UnderwaterPhy set RXThresh_ 30.0
    Phy/UnderwaterPhy set bandwidth_ 2e5
    Phy/UnderwaterPhy set Pt_ 97
    Phy/UnderwaterPhy set freq_ 914e+6
    Phy/UnderwaterPhy set L_ 1.0
     
  5. Using the command shell cd into ns-2 installation directory.
  6. Enter command "make clean". This will clear the ns-2 installation. Its a recommended step but not mandatory.
  7. Enter command "make depend". Again this is recommended but not mandatory.
  8. Recompile NS-2 by entering "make" in the command shell. This will re install NS-2 with new underwater files.

Usuage

Underwater module can be used by in the following way in your simulation script

set val(chan) Channel/UnderwaterChannel ;
set val(prop) Propagation/Underwater ;
set val(netif) Phy/UnderwaterPhy ;

These variables can be used to configure your mobile nodes.

References

DEI Telecommunications Group. http://telecom.dei.unipd.it/pages/read/58/
NS-2 Official Development Help & Manual. http://www.isi.edu/nsnam/ns/

Comments

Please feel free to contact me for your comments, suggestions and queries. I will try to respond as soon as possible.

Naveed Qadri
nbqadri@nbqadri.com

Home

Hit Counter