DTOcean / dtocean

Design and techno-economic assessment of marine renewable energy arrays
https://dtocean.github.io
GNU General Public License v3.0
4 stars 6 forks source link

The input velocity field is highly rotational - Error #32

Closed anupjn closed 5 years ago

anupjn commented 5 years ago

Hi,

Been trying to use the hydrodynamic module within DTO2 with some fixed tidal device input data sets. With the same input tidal data, the hydrodynamic module worked in DTO1. That said, every time I run the hydrodynamic module in DTO2, it throws up this error (please see the "System" window text copied below):

CRITICAL - dtocean_app.main - An IOError occurred: [Errno The input velocity field is highly rotational ] This violate the model assumption : 'The execution is terminated'

This is something to do with the irrotational flow check in the code, but I am not sure why this error is raised only in DTO2. I must add that I tried running 4 different tidal velocity datasets (which all worked in DTO1) to see if any of them would work in DTO2. Unfortunately, they did not and gave the same error every time.

We did a diff between the relevant part of the code in DTO1 and DTO2 and found a few minor changes, but we could not identify any reason for DTO2 to act differently from DTO1.

Any help on this matter would be greatly appreciated. Thank you.


These are the messages in the "System" window in the GUI -

2019-07-05 20:30:18,500 - INFO - dtocean_core.menu - Executing module 'Hydrodynamics' 2019-07-05 20:30:19,885 - CRITICAL - dtocean_app.main - An IOError occurred: [Errno The input velocity field is highly rotational ] This violate the model assumption : 'The execution is terminated' 2019-07-05 20:30:19,903 - CRITICAL - dtocean_app.main - File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_app\main.py", line 433, in run self._project) File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_core\menu.py", line 471, in execute_current allow_unavailable=allow_unavailable) File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_core\menu.py", line 168, in _execute set_output_level=set_output_level) File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_core\core.py", line 2026, in execute_interface interface = core.connect_interface(project, interface) File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_app\core.py", line 297, in connect_interface interface = super(GUICore, self).connect_interface(project, interface) File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_core\core.py", line 1508, in connect_interface interface.connect() File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_core\interfaces\hydrodynamics.py", line 709, in connect iWP2input = WP2input(Machine,Site) File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_hydro\input.py", line 331, in init (status, errStr) = self.checkInput() File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_hydro\input.py", line 481, in checkInput self.irrotational_flow() File "C:\Users\anambiar\DTOCEAN\lib\site-packages\dtocean_hydro\input.py", line 577, in irrotational_flow "The execution is terminated")


H0R5E commented 5 years ago

Hi, it's pretty much impossible to diagnose without seeing the data. Can you share it (preferably as the .dto file for the project you are trying to execute)?

Although no changes were made to the particular piece of code that is triggering, some updates were made to the code which selects the time steps to analyse from the tidal time series, so it could be that a different set of data is being processed compared to version 1.0.

So, it may be that one of the selected time steps is highly irrotational, in which case maybe changing the "Tidal Probability Bins" value might select a different set of steps which pass the test.

Alternatively, the method you used to transfer the data from version 1.0 to 2.0 might have scrambled the data, but I'm afraid its all very speculative.

anupjn commented 5 years ago

Thank you for your response and insights into this error. Please find the .dto file attached here for reference.

I did not know that the tidal probability bins are related to the error. I arbitrarily selected a few numbers (5, 10, 100) for the bins and tried running the hydrodynamic module. Still gave the same error. Though I still do not know what the impact of these changes are.

I did not transfer the data from version 1.0 to 2.0. I've only used version 2.0. I had the set of Excel files with the data (which was used in version 1.0 also) that I successfully loaded into the database through version 2.0. I looked at the data in the database and that looked ok. I plotted the data within the DTOcean tool version 2.0 and that looked ok as well.

Tidal_device_1_test.zip

H0R5E commented 5 years ago

Hi, yeah, I opened the project and I don't think your data has been correctly entered. Attached is a screenshot from one of the time steps of the tidal time series.

bad_data

anupjn commented 5 years ago

Is the reversed direction of flow in certain parts of the area the problem? Just trying to understand your comment so that I can investigate further. Thanks.

H0R5E commented 5 years ago

The reversed direction of flow and the sudden jumps in velocity as you traverse in the x-direction are clear indicators of a non-physical flow. The plot is trying to smooth the data, but it looks like the velocities are jumping from 0 to 0.5 to 0 to 0.5 to 0... from grid point to grid point.

tbloise commented 5 years ago

Hi,

1) We are trying to use the hydrodynamic module of DTOcean2.0 with real tidal series data. However, we are obtaining an error (as below). This tidal series has a variable velocity along the bathymetry points, as well as a variable velocity over time. Please see below an image that represents a point in time where velocities are variable over the lease area. Please note that – if the same tidal series is used as input on DTOcean1.0 – the hydrodynamic module will run and the tool will not produce any error.

Error (DTOcean2.0): CRITICAL - dtocean_app.main - An IOError occurred: [Errno The input velocity field is highly rotational ] This violate the model assumption : 'The execution is terminated'

Representative Tidal Series: image

2) We also tried to make a rough assumption of the tidal series (to match the example provided with DTOcean2.0), where the tidal series varies in time, but is constant among the bathymetry points. In this case, we manage to run DTOcean1.0 as well as DTOcean2.0. However, the results are significantly different for the same inputs.

Could you please advise on that.

Many thanks for your time.

Kind regards,

H0R5E commented 5 years ago

With regards to your first issue, I am almost certain it's some kind of data corruption / misentry. The check is applied at a fixed time step, so something within one of your time steps is causing the problem, rather than variability over time. I admit, it is hard to track down the problem, as the temporal information is destroyed by the time it reaches the hydrodynamics module. The only way I can help you out and confirm this is if you can share an example file of the problem occurring.

Assuming there are no data issues with your second example then there may well be differences between versions. I am assuming you mean version 1.0.3 when you say 1.0, in which case there were two significant changes made to the tidal simulations. Firstly, the energy calculations when devices are in yaw was improved. Secondly, the instantaneous power production of the device is capped at its rated power. If you've seen a drop in power then its probably the second change coming into play. If so, check that your power curve and turbine diameter matches your rated power. These changes are all published in the dtocean-hydrodynamics' change log, which I invite you to read.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.