{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Orcaflex / OrcaWave and Symmetry\nExample of\n- reading hydrodynamic data from OrcaWave.\n- applying symmetry\n(unrelated subjects)\n\nOrcawave files can not be read directly. To obtain the data first import the data into an orcaflex model (vessel-type)\nand then save that model as .yml\n\nMaFreDo can now read the data from the .yml file\n\nSymmetry is nice when a file needs to be small but may not be needed or even wanted when performing calculations. The\nexpand360_using_symmetry method uses the symmetry setting of the database to expand the dataset to cover the full 360\ndegrees of headings.\n\n(Note: Orcaflex and OrcaWave are products by Orcina : https://www.orcina.com/orcaflex/ )\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "from mafredo import Hyddb1\n\ntry:\n    data = Hyddb1.create_from_orcaflex_yml(\n        filename=\"./barge_100x30x4_q1.yml\",\n        vessel_type_name=\"Vessel type1\",\n        iDraught=0\n    )\n\n    print(data.symmetry)\n    data.plot(adm=False, damp=False)\n\n    data.expand360_using_symmetry()\n\n    print(data.symmetry)\n    data.plot(adm=False, damp=False)\n\nexcept:\n    pass # read-the-docs"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.8.6"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}