Skip to content

Commit

Permalink
Adjusted tut1 to waves realization notation
Browse files Browse the repository at this point in the history
  • Loading branch information
dtgaebe committed Dec 8, 2023
1 parent c0e6c78 commit d0d6a84
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/tutorial_1_WaveBot.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
"metadata": {},
"outputs": [],
"source": [
"p_flows = wot.utilities.calculate_power_flows(wec, pto, results, waves, intrinsic_impedance)\n",
"p_flows = wot.utilities.calculate_power_flows(wec, pto, results[0], waves.sel(realization=0), intrinsic_impedance)\n",
"wot.utilities.plot_power_flow(p_flows)"
]
},
Expand Down Expand Up @@ -677,7 +677,7 @@
"metadata": {},
"outputs": [],
"source": [
"p_flows_2 = wot.utilities.calculate_power_flows(wec_2, pto_2, results_2, waves, intrinsic_impedance)\n",
"p_flows_2 = wot.utilities.calculate_power_flows(wec_2, pto_2, results_2[0], waves.sel(realization = 0), intrinsic_impedance)\n",
"wot.utilities.plot_power_flow(p_flows_2)"
]
},
Expand All @@ -694,7 +694,7 @@
"metadata": {},
"outputs": [],
"source": [
"p_flows_2_nocon = wot.utilities.calculate_power_flows(wec_2_nocon, pto_2, results_2_nocon, waves, intrinsic_impedance)\n",
"p_flows_2_nocon = wot.utilities.calculate_power_flows(wec_2_nocon, pto_2, results_2_nocon[0], waves.sel(realization = 0), intrinsic_impedance)\n",
"wot.utilities.plot_power_flow(p_flows_2_nocon)"
]
},
Expand Down
3 changes: 2 additions & 1 deletion wecopttool/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,8 @@ def hydrodynamic_impedance(hydro_data: Dataset) -> Dataset:
+ hydro_data['added_mass'])*1j*hydro_data['omega'] \
+ hydro_data['radiation_damping'] + hydro_data['friction'] \
+ hydro_data['hydrostatic_stiffness']/1j/hydro_data['omega']
return Zi.transpose('omega', 'radiating_dof', 'influenced_dof')
return intrinsic_impedance.transpose('omega', 'radiating_dof', 'influenced_dof')



def atleast_2d(array: ArrayLike) -> ndarray:
Expand Down

0 comments on commit d0d6a84

Please sign in to comment.