Skip to content

Commit

Permalink
Update LUPA and Pioneer nrealizations and explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
jtgrasb committed Dec 7, 2023
1 parent 7e7edcf commit 4f3b514
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
12 changes: 11 additions & 1 deletion examples/tutorial_3_LUPA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,11 @@
"For each site/scale they provide four wave conditions to test at the Oregon State Large Wave Flume (LWF): the maximum 90<sup>th</sup> percentile, maximum percent annual energy, maximum occurrence, and minimum 10<sup>th</sup> percentile. \n",
"\n",
"In this tutorial we will use the PacWave South conditions scaled to the LWF and will design for the maximum occurrence wave. \n",
"The wave conditions are specified in terms of significant wave height and peak period. Waves are mostly fully developed at the PacWave site, so we will use a Pierson-Moskowitz wave spectrum."
"The wave conditions are specified in terms of significant wave height and peak period. Waves are mostly fully developed at the PacWave site, so we will use a Pierson-Moskowitz wave spectrum. \n",
"\n",
"The irregular wave is created with multiple phase realizations. For this tutorial, the number of realizations has been overwritten to 2 to reduce the total run-time. The solver will be run once for each wave phase realization. Each of these phase realizations leads to a slightly different result for optimal average power. Thus, for irregular wave conditions, it is recommended to include multiple phase realizations. The number of phase realizations required is dependent on the desired accuracy of the result, but it is generally recommended to include enough realizations for the total simulation time to equal 20 minutes.\n",
"\n",
"$t_{total} = \\frac{nrealizations}{f1} $"
]
},
{
Expand All @@ -974,6 +978,12 @@
"wavedir = 0\n",
"waves['regular'] = wot.waves.regular_wave(f1, nfreq, wavefreq, amplitude, phase, wavedir)\n",
"\n",
"# number of realizations to reach 20 minutes of total simulation time\n",
"minutes_needed = 20\n",
"nrealizations = minutes_needed*60*f1\n",
"print(f'Number of realizations for a 20 minute total simulation time: {nrealizations}')\n",
"nrealizations = 2 # overwrite nrealizations to reduce run-time\n",
"\n",
"# irregular wave cases from OSU\n",
"wave_cases = {\n",
" 'south_max_90': {'Hs': 0.21, 'Tp': 3.09}, \n",
Expand Down
21 changes: 12 additions & 9 deletions examples/tutorial_4_Pioneer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@
"\n",
"### 1.1 Waves\n",
"We start with the setting up the different waves we want to model, as this will inform what to select for our frequency range, which we need throughout the rest of the problem setup. \n",
"We will consider two waves: a regular wave and an irregular wave, both with typical characteristics of the deployment site. The regular wave is roughly at 0.35 Hz, the known pitch resonance frequency of the buoy. The irregular wave has a peak period of 5 seconds, matching that of the deployment site."
"We will consider two waves: a regular wave and an irregular wave, both with typical characteristics of the deployment site. The regular wave is roughly at 0.35 Hz, the known pitch resonance frequency of the buoy. The irregular wave has a peak period of 5 seconds, matching that of the deployment site. \n",
"\n",
"The irregular wave is created with multiple phase realizations. For this tutorial, the number of realizations has been overwritten to 3 to reduce the total run-time. The solver will be run once for each wave phase realization. Each of these phase realizations leads to a slightly different result for optimal average power. Thus, for irregular wave conditions, it is recommended to include multiple phase realizations and average the resultant optimal power. The number of phase realizations required is dependent on the desired accuracy of the result, but it is generally recommended to include enough realizations for the total simulation time to equal 20 minutes.\n",
"\n",
"$t_{total} = \\frac{nrealizations}{f1} $"
]
},
{
Expand Down Expand Up @@ -77,10 +81,16 @@
"Hs = 1.5\n",
"Tp = 5 \n",
"\n",
"# number of realizations to reach 20 minutes of total simulation time\n",
"minutes_needed = 20\n",
"nrealizations = minutes_needed*60*f1\n",
"print(f'Number of realizations for a 20 minute total simulation time: {nrealizations}')\n",
"nrealizations = 3 # overwrite nrealizations to reduce run-time\n",
"\n",
"fp = 1/Tp\n",
"spectrum = lambda f: wot.waves.pierson_moskowitz_spectrum(f, fp, Hs)\n",
"efth = wot.waves.omnidirectional_spectrum(f1, nfreq, spectrum, \"Pierson-Moskowitz\")\n",
"waves_irregular = wot.waves.long_crested_wave(efth, nrealizations = 5)"
"waves_irregular = wot.waves.long_crested_wave(efth, nrealizations = nrealizations)"
]
},
{
Expand Down Expand Up @@ -866,13 +876,6 @@
"print(f'Optimal average power: {np.mean(power_results):.2f} W')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The solver is run 5 times (1 for each wave phase realization). Each of these phase realizations leads to a slightly different result for optimal average power. Thus, for irregular wave conditions, it is recommended to average the optimal average power result over multiple phase realizations. The number of phase realizations required is dependent on the desired accuracy of the result."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 4f3b514

Please sign in to comment.