Marine systems simulation
A1 Cheat sheet

Memory leak analysis

To simplify Valgrind options, the standard options may be set, like

export VALGRIND_OPTS='--memcheck:xml=yes --memcheck:xml-file=log.xml'

Debugging a project

General IDE settings

  • Open the solution file in Visual Studio. This is usually found under <project>/build.
  • Open the Solution Explorer by selecting View->Solution Explorer.
  • In the Solution Explorer, right-click on the INSTALL project and choose Set as start-up project.

Debugging

  • The input file must be created according to standards.
  • In the top of the IDE, choose Release or Debug in the drop down box.
  • In the Solution Explorer, right-click on the project building the executable and choose Properties.
  • Choose Configuration properties -> Debugging. The following values should be present:
    • Command (Use full path to executable, for example C:/Users/john/fhsim-playpen/bin/FhVis_d for visualization)
    • Command arguments (<Absolute or relative path to input file>)
    • Working directory (fhsim-playpen/bin)
  • Run the program by pressing <F5> or by selecting Debug -> Start debugging.
  • If you get a "No Debugging Information" warning here, don't worry, just press Yes to continue.

Setting the background colour of FhVis animation

The default background colour appears to be black. In order to change the background colour of an animation, the following lines can be added to the RenderInit method of an object:

Ogre::ColourValue backgroundColour(0.9, 0.9, 0.9);
m_pCamera = (CFhCamera*) m_pVisMgr->GetPtr("CFhCamera");
Ogre::RenderWindow * pRenderWindow =
m_pCamera->GetRenderWindow();
pRenderWindow->getViewport(0)->setBackgroundColour(backgroundColour);

Creating Mesh models from Solidworks

Ogre uses .mesh and .material files for 3D objects. This is a guideline for creating such models using a tool such as Solidworks.

  • Get someone to make a model for you in Solidworks
  • Export this as a VRML file
  • Download and install Blender, an open source 3D program.
  • Download and install the Ogre export script as outlined on the Ogre forum
  • You can now export the model to a .mesh.xml file
  • Use the OgreXmlConverter tool to convert to .mesh and .material files.
  • Place these files somewhere on the Ogre resources path and set the mesh name of the object to that of the .mesh file

Cable and rope properties

Table 2 (Synthetic Fiber Rope Properties) from http://www.tensiontech.com/papers/papers/deep_mor/synthetic_fibreyrope_table2.html. See also http://www.tensiontech.com/papers/papers/deep_mor/deep_mor.html.

Material Rope construction Strength kN/cm2 Stiffness kN/cm2 Remarks
Nylon braided 25 82 Dry strengths only, wet strength 10-20% less
Nylon plaited 20 87
Polyester braided 25 210 Wet and dry strengths, including jacket
plaited 20 160
7-strand 45 400
parallel strand 50 550
parallel fiber 35 1000
Aramid 36-strand 70 3300 Including jacket
parallel strand 65 2100
parallel fiber 95 4300 K29, including jacket
parallel fiber 90 8000 K49, including jacket
HMPE braided 55 1500 Unjacketed
7-strand 55 2000 Including jacket
parallel strand 65 3000
Steel 7-strand 85 6800

\[6 \times 36 \text{IWRC}\]

bridge strand 110 14000 Not including jacket
Solid bar 140 21000 4340 steel
Note
Strength and stiffness are given as approximate values. Actual properties may vary widely. Cross sections are based on cylindrical enclosed area including jacket where applicable. Multiply by 1430 to convert to lb/in2.