This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

wave in openflows flood

Hello,

I am trying to do a simulation in OpenFlows only with wave forcing. I have used the Swan based method for coastal hydrodynamics.

But i have this failure.

I think it doesn't recognize my wave.hdf5 file.
But I don't know how else I can convert the .dat file from swan to .hdf5.

Thank you for your attention.

  • Hello Yeison,

    Could you please post the complete error message? 

    How did you convert your SWAN outputs to HDF5 format? 

    Thank you very much,

    Luis

  • Hello Luis,

    I used HDFview program to converter SWAN outputs to HDF5 format because the Convert HDF5 doesn't work for me.
    But I have question about .DAT file: What and how much information is needed in the SWAN output file (how much data and temporal resolution)?

    This is the complete error message:

    Do you have any example where they use waves as forcing?

    Kind regards,

    Yeison

  • Hello Yeison,

    It looks like the file is not in HDF5 format or does not meet the standards to be recognized by OpenFlows FLOOD. 

    You'll need to use the ConvertToHDF5 tool installed with OpenFlows FLOOD in:

    "C:\Program Files\Bentley\OpenFlows FLOOD\MohidExe\x86\ConvertToHdf5_release_double_x86.exe"

    Then, assuming you have setup your SWAN model as non-stationary and set the SWAN table outputs as: 

    TABLE 'COMPGRID' NOHEAD '..\res\SWAN_1.tbl' HS PER DIR FOR WLEN UBOT

    you can configure the ConvertToHDF5 tool using the following commands (inside the ConvertToHDF5Action.dat setup file): 

    <begin_file>
    ACTION : CONVERT FROM SWAN NONSTATIONARY
    INPUT_GRID_FILENAME : Bathymetry.dat
    INPUT_SWAN_FILENAME : SWAN_1.tbl
    OUTPUTFILENAME : SWAN.hdf5
    START : 2021 2 11 0 0 0
    END : 2021 2 12 0 0 0
    OUTPUT_TIME : 0 600

    <<beginproperty>>
    significant wave height
    mean wave period
    mean wave direction
    wave stress X
    wave stress Y
    mean wave length
    Ubw
    <<endproperty>>

    <<beginunits>>
    m
    s
    º
    Pa
    Pa
    m
    m/s
    <<endunits>>

    <end_file>

    You'll then have the necessary variables (listed above) to run a wave-currents coupled simulation. 

    You can read more about how to input wave parameters in a coastal simulation here.

    Kind regards,

    Luis

  • Hello Luis,

    Thanks to your previous answers.

    I converted the SWAN output file to HDF5 format and configured the wave module, but the model gave me the following error.

    This is the  SWAN output data configuration in the .tbl file

    This is the waves module configuration  

    WAVE_PERIOD : 1
    WAVE_HEIGHT : 1
    WAVE_DIRECTION : 1

    <begin_waveheight>
    NAME : significant wave height
    UNITS : m
    FILE_IN_TIME : HDF
    FILENAME : ..\General Data\Boundary Conditions\Waves.hdf5
    DEFAULTVALUE : 0
    <end_waveheight>

    <begin_wavedirection>
    NAME : mean wave direction
    UNITS : degrees
    FILE_IN_TIME : HDF
    FILENAME : ..\General Data\Boundary Conditions\Waves.hdf5
    DEFAULTVALUE : 0
    <end_wavedirection>

    <begin_waveperiod>
    NAME : mean wave period
    UNITS : s
    FILE_IN_TIME : HDF
    FILENAME : ..\General Data\Boundary Conditions\Waves.hdf5
    DEFAULTVALUE : 0
    <end_waveperiod>

    I have question; the bathymetry that is used in the conversion from format to HDF5, I suppose it is the one generated with Mohid, it's ok ?.  I think the HDF5 file has errors. Because I have changed some parameters and it follows the same error.

    Kind regards,

    Luis

  • Hello Yeison,

    As the error message says, the time period covered by the HDF5 file does not cover the entire period of the simulation, specifically the last SWAN output is smaller or "earlier" than the simulation end time (which you define in  the Model input data file). 

    The simulation period must be contained in the time period covered by the SWAN hdf5 file. 

    When you run a wave/current simulation the SWAN grid and bathymetry must be the same as the one you use in FLOOD (with MOHID Water). Thus, when you run the SWAN to HDF5 conversion tool you'll have to set the path to the bathymetry file (Grid Data format) you'll use in your hydrodynamic simulation. 

    Keep in mind that if you want to compute wave current interaction, you'll need to output the radiation stresses from SWAN and have them read by FLOOD MOHID Water engine in your simulation. 

    Kind regards,
    Luis