wawi 0.0.12__py3-none-any.whl → 0.0.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wawi might be problematic. Click here for more details.

wawi/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  '''
4
4
  __pdoc__ = {'wawi.ext.abq': False}
5
5
 
6
- __version__ = "0.0.12"
6
+ __version__ = "0.0.16"
7
7
 
8
8
  # Other packages
9
9
  import numpy as np
wawi/io.py CHANGED
@@ -11,7 +11,7 @@ from wawi.model import ModalDry, PontoonType, Node, Model, Aero, AeroSection
11
11
  def import_folder(model_folder, pontoon_stl='pontoon.stl', aero_sections='aero_sections.json',
12
12
  modal='modal.json', pontoon='pontoon.json', eldef='element.json', orientations='orientations.json',
13
13
  drag_elements='drag_elements.json', pontoon_types='pontoon_types.json',
14
- sort_nodes_by_x=True, interpolation_kind='quadratic'):
14
+ sort_nodes_by_x=True, interpolation_kind='linear'):
15
15
 
16
16
  '''
17
17
  Import folder containing files defining a WAWI model.
@@ -39,7 +39,7 @@ def import_folder(model_folder, pontoon_stl='pontoon.stl', aero_sections='aero_s
39
39
  sort_nodes_by_x : True, optional
40
40
  whether or not to sort the nodes of eldef by their x-coordinate
41
41
  interpolation_kind : {'quadratic', 'linear', ...}
42
- interpolation kind used for hydrodynamic transfer function
42
+ interpolation kind used for hydrodynamic transfer function and hydrodynamic system matrices
43
43
 
44
44
  Returns
45
45
  ---------------
@@ -148,7 +148,7 @@ def import_folder(model_folder, pontoon_stl='pontoon.stl', aero_sections='aero_s
148
148
  ptypes[name] = PontoonType.from_numeric(interpolation_kind=interpolation_kind, A=P['M'], B=P['C'],
149
149
  omega=P['omega'], Q=P['Q'], theta=P['theta_Q'], omegaQ=P['omega_Q'], label=name,
150
150
  stl_path=f'{model_folder}/{pontoon_stl}', **{**ACd, **pontoon_type_settings[name]})
151
-
151
+
152
152
 
153
153
  # Modal dry object
154
154
  if 'xi0' in modal:
wawi/modal.py CHANGED
@@ -155,6 +155,7 @@ def iteig(K, C, M, omega=None, omega_ref=0, input_functions=True, itmax=None, to
155
155
  lambdai = lambdai[m]
156
156
 
157
157
  w = abs(np.imag(lambdai))
158
+
158
159
  if mean_w:
159
160
  w = (wprev+w)/2
160
161
 
wawi/model/_hydro.py CHANGED
@@ -480,7 +480,7 @@ SEASTATE CLASS
480
480
  '''
481
481
 
482
482
  class Seastate:
483
- def __init__(self, Tp, Hs, gamma, theta0, s, depth=None, origin=None, ranges=None,
483
+ def __init__(self, Tp, Hs, gamma, theta0, s=np.inf, depth=None, origin=None, ranges=None,
484
484
  options={}, pontoon_options={}, name=None, plot_label=None, centered_dirdist=True,
485
485
  U=None, thetaU=None, use_robust_D=True, angle_unit='deg'):
486
486
 
@@ -529,7 +529,7 @@ class Seastate:
529
529
 
530
530
  self.x0 = self.origin[0]
531
531
  self.y0 = self.origin[1]
532
- self.options = {'keep_coherence': True}
532
+ self.options = {'keep_coherence': True} #default options
533
533
  self.options.update(**options)
534
534
 
535
535
  self.pontoon_options = {'current_affects_Q': True, 'current_affects_k': True}
@@ -616,9 +616,12 @@ thetaU (current)={self.thetaU*180/np.pi:.1f}deg
616
616
  if return_phases:
617
617
  eta, t, phase = output
618
618
  return eta, t, phase
619
- else:
619
+ elif time_history:
620
620
  eta, t = output
621
621
  return eta, t
622
+ else:
623
+ return output
624
+
622
625
 
623
626
 
624
627
  @staticmethod
@@ -821,7 +824,7 @@ class PontoonType:
821
824
 
822
825
 
823
826
  @classmethod
824
- def from_numeric(cls, interpolation_kind='linear', A=None, M0=None, B=None, Kh=None,
827
+ def from_numeric(cls, interpolation_kind='linear', fill_value_added='extrapolate', A=None, M0=None, B=None, Kh=None,
825
828
  omega=None, Q=None, theta=None, omegaQ=None, **kwargs):
826
829
 
827
830
  if omegaQ is None:
@@ -834,12 +837,12 @@ class PontoonType:
834
837
  A = np.zeros([M0.shape + [len(omega)]])
835
838
  elif M0 is None:
836
839
  M0 = A[:,:,0]*0
837
- M = interp1d(omega, (A.T+M0.T).T, axis=2, fill_value='extrapolate', kind=interpolation_kind)
840
+ M = interp1d(omega, (A.T+M0.T).T, axis=2, fill_value=fill_value_added, kind=interpolation_kind)
838
841
 
839
842
  if B is None:
840
843
  C = None
841
844
  else:
842
- C = interp1d(omega, B, axis=2, fill_value='extrapolate', kind=interpolation_kind)
845
+ C = interp1d(omega, B, axis=2, fill_value=fill_value_added, kind=interpolation_kind)
843
846
 
844
847
  if Kh is not None:
845
848
  K = lambda omega: Kh
@@ -853,7 +856,7 @@ class PontoonType:
853
856
 
854
857
 
855
858
  @classmethod
856
- def from_wadam(cls, path, interpolation_kind='linear',
859
+ def from_wadam(cls, path, interpolation_kind='linear', fill_value_added='extrapolate',
857
860
  include=['added mass', 'added damping', 'restoring stiffness', 'inertia'], **kwargs):
858
861
 
859
862
  from wawi.io import import_wadam_mat, import_wadam_hydro_transfer
@@ -873,10 +876,10 @@ class PontoonType:
873
876
  if 'inertia' not in include:
874
877
  M0 = M0*0
875
878
 
876
- M = interp1d(omega, (A.T+M0.T).T, axis=2, fill_value='extrapolate', kind=interpolation_kind)
877
- C = interp1d(omega, B, axis=2, fill_value='extrapolate', kind=interpolation_kind)
879
+ M = interp1d(omega, (A.T+M0.T).T, axis=2, fill_value=fill_value_added, kind=interpolation_kind)
880
+ C = interp1d(omega, B, axis=2, fill_value=fill_value_added, kind=interpolation_kind)
878
881
  K = lambda omega: Kh
879
882
 
880
- Q = interp1d(omega_Q, Q, fill_value='extrapolate', kind=interpolation_kind, axis=2)
883
+ Q = interp1d(omega_Q, Q, fill_value=0.0, kind=interpolation_kind, axis=2)
881
884
 
882
885
  return cls(M=M, C=C, K=K, Q=Q, original_omega=omega, theta=theta, **kwargs)
wawi/model/_model.py CHANGED
@@ -1043,7 +1043,7 @@ class Model:
1043
1043
 
1044
1044
 
1045
1045
  def get_waveaction(self, omega_k, max_rel_error=0.01,
1046
- theta_interpolation='linear', theta_int=None):
1046
+ theta_interpolation='linear', theta_int=None, transform_by_phi=True):
1047
1047
 
1048
1048
  if theta_int is None and self.theta_int is None:
1049
1049
  theta_int = self.get_theta_int(omega_k, max_rel_error=max_rel_error)
@@ -1069,8 +1069,11 @@ class Model:
1069
1069
 
1070
1070
  if not self.hydro.seastate.options['keep_coherence']:
1071
1071
  Sqq0 = block_diag(*[Sqq0[i*6:(i+1)*6, i*6:(i+1)*6] for i in range(int(Sqq0.shape[0]/6))])
1072
-
1073
- return self.hydro.phi.T @ Sqq0 @ self.hydro.phi
1072
+
1073
+ if transform_by_phi:
1074
+ return self.hydro.phi.T @ Sqq0 @ self.hydro.phi
1075
+ else:
1076
+ return Sqq0
1074
1077
 
1075
1078
 
1076
1079
  def evaluate_windaction(self, omega=None, aero_sections=None, print_progress=True, static=False, **kwargs):
@@ -1144,15 +1147,20 @@ class Model:
1144
1147
 
1145
1148
 
1146
1149
  def evaluate_waveaction(self, omega, max_rel_error=0.01, print_progress=True, theta_int=None,
1147
- theta_interpolation='quadratic', **kwargs):
1150
+ theta_interpolation='quadratic', transform_by_phi=True, **kwargs):
1148
1151
 
1149
1152
  if theta_int is None:
1150
1153
  theta_int = self.theta_int
1151
1154
 
1152
- ndofs = self.hydro.phi.shape[1]
1155
+ if transform_by_phi:
1156
+ ndofs = self.hydro.phi.shape[1]
1157
+ else:
1158
+ ndofs = self.hydro.phi.shape[0]
1159
+
1153
1160
  Sqq = np.zeros([ndofs, ndofs, len(omega)]).astype('complex')
1161
+
1154
1162
  for k, omega_k in enumerate(omega):
1155
- Sqq[:,:,k] = self.get_waveaction(omega_k, max_rel_error=max_rel_error, theta_int=theta_int,
1163
+ Sqq[:,:,k] = self.get_waveaction(omega_k, max_rel_error=max_rel_error, theta_int=theta_int, transform_by_phi=transform_by_phi,
1156
1164
  theta_interpolation=theta_interpolation, **kwargs)
1157
1165
 
1158
1166
  if print_progress:
wawi/wave.py CHANGED
@@ -120,7 +120,6 @@ def xsim(x, y, S, D, omega, fs=None, theta=None, n_theta=40, grid_mode=True, pri
120
120
  if theta is None:
121
121
  theta = np.linspace(-np.pi, np.pi, n_theta)
122
122
 
123
-
124
123
  if not isfunction(S):
125
124
  Sfun = lambda x, y: S
126
125
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wawi
3
- Version: 0.0.12
3
+ Version: 0.0.16
4
4
  Summary: WAve and WInd response prediction
5
5
  Author-email: "Knut A. Kvåle" <knut.a.kvale@ntnu.no>, Ole Øiseth <ole.oiseth@ntnu.no>, Aksel Fenerci <aksel.fenerci@ntnu.no>, Øivind Wiig Petersen <oyvind.w.petersen@ntnu.no>
6
6
  License: MIT License
@@ -48,9 +48,30 @@ Dynamic: license-file
48
48
  ![WAWI logo](https://raw.githubusercontent.com/knutankv/wawi/main/wawi-logo-animated.svg)
49
49
  =======================
50
50
 
51
- What is wawi?
51
+ What is WAWI?
52
52
  =======================
53
- WAWI is a Python toolbox for prediction of response of structures exposed to wind and wave excitation. The package is still under development in its alpha stage, and documentation and testing will be completed along the way.
53
+ WAWI is a Python toolbox for prediction of response of structures exposed to wind and wave excitation, using a multimodal frequency-domain approach. It supports special features such as:
54
+
55
+ * Hydrodynamic added mass, radiation damping and hydrodynamic force transfer function from e.g. WAMIT analysis
56
+ * Quasisteady wind forcing for buffeting analysis
57
+ * Combined effects of wind and waves
58
+ * Iterative multimodal flutter
59
+ * Iterative modal analysis
60
+ * Modelling of motion-induced aerodynamic forces using aerodynamic derivatives
61
+ * Inhomogeneous sea states
62
+ * Inhomogeneous mean wind (other parameters planned for)
63
+ * Current effects on wave excitation
64
+ * Stochastic linearization methodology to support linearized effect of quadratic drag damping (both line elements and pontoon objects)
65
+ * Object-oriented model setup, including FE description (using Python package BEEF) of beams exposed to aerodynamic forcing
66
+
67
+ Planned implemented in the near future:
68
+
69
+ * Fully inhomogeneous wind state definition (all wind field parameters)
70
+ * Hydrodynamic interaction effects from multibody analyses
71
+ * Second-order wave excitation effects
72
+ * Definition of ADs (aerodynamic derivatives) using rational functions
73
+
74
+ The package is still under development in its alpha stage, and documentation and testing will be completed along the way.
54
75
 
55
76
 
56
77
  Installation
@@ -68,6 +89,21 @@ pip install git+https://www.github.com/knutankv/wawi.git@main
68
89
  ```
69
90
 
70
91
 
92
+ How does WAWI work?
93
+ ======================
94
+ By representing both aerodynamic and hydrodynamic motion-induced forces and excitation using a coordinate basis defined by the dry in-vacuum mode shapes of the structure, WAWI is able to versatily predict response based on input from any commercial FE software. The main structure used for response prediction is given in this figure:
95
+ ![Model](https://raw.githubusercontent.com/knutankv/wawi/main/docs/flowchart.svg)
96
+
97
+ The object structure of a WAWI model is given here:
98
+ ![Modelattributes](https://raw.githubusercontent.com/knutankv/wawi/main/docs/structure.svg)
99
+
100
+ Further details regarding hydrodynamic definitions initiated by the `Hydro` class is given below:
101
+ ![Hydro](https://raw.githubusercontent.com/knutankv/wawi/main/docs/hydro_part.svg)
102
+
103
+ Further details regarding aerodynamic definitions initiated by the `Aero` class is given below:
104
+ ![Aero](https://raw.githubusercontent.com/knutankv/wawi/main/docs/aero_part.svg)
105
+
106
+
71
107
  Quick start
72
108
  =======================
73
109
  Assuming a premade WAWI-model is created and saved as `MyModel.wwi´, it can be imported as follows:
@@ -143,6 +179,14 @@ The examples are structured in the following folders based on their topic:
143
179
 
144
180
  References
145
181
  =======================
182
+ The following papers provide background for the implementation:
183
+
184
+ * Beam (FE) description of aerodynamic forces: [Øiseth et al. (2012)](https://www.sciencedirect.com/science/article/abs/pii/S0168874X11001880)
185
+ * Wave modelling and response prediction: [Kvåle et al. (2016)](https://www.sciencedirect.com/science/article/abs/pii/S004579491500334X)
186
+ * Inhomogeneous wave modelling: [Kvåle et al. (2024)](https://www.sciencedirect.com/science/article/pii/S0141118723003437)
187
+ * Hydrodynamic interaction effects: [Fenerci et al. (2022)](https://www.sciencedirect.com/science/article/pii/S095183392200017X)
188
+ * Wave-current interaction: [Fredriksen et al. (2024)](https://www.researchgate.net/profile/Arnt-Fredriksen/publication/386453916_On_the_wave-current_interaction_effect_on_linear_motion_for_floating_bridges/links/6751a40fabddbb448c65cbef/On-the-wave-current-interaction-effect-on-linear-motion-for-floating-bridges.pdf)
189
+
146
190
 
147
191
  Citation
148
192
  =======================
@@ -4,12 +4,12 @@ tests/test_IABSE_step11a.py,sha256=zTWOxR78F0PNhNqiqodEcL65vdJXyMP78nkJumhy-RA,7
4
4
  tests/test_IABSE_step11c.py,sha256=TfxPlP70dhujKlSYbA-Gj4U-EJmYZ3jt6yjvX9wSXcA,10337
5
5
  tests/test_IABSE_step2a.py,sha256=9pAd1em2IEY4k5N-jAigV3VGup0QsbUxnwSiziuMbUg,10134
6
6
  tests/test_wind.py,sha256=r4rx6f8Tn-u4fn4gGPBMrL_JJQ2SVHGQiQ9sQuMQCPo,1707
7
- wawi/__init__.py,sha256=7vUvWFZzW67YG3yHPiBO_bsphhLLgEF4N7wdUkJeEq8,183
7
+ wawi/__init__.py,sha256=jBTtfY__jKUq4iwxWldOiudzVb-9eGu0ot2i6J5diC0,183
8
8
  wawi/fe.py,sha256=22QKI1GlfsG7o_TpFXaKJfzmbO2_2zdIMaoJmaIZdmY,4001
9
9
  wawi/general.py,sha256=xHRoDkcchrL6Y7pTUqGsjBHh8YBLvX9dYcNXXCjQap8,13787
10
10
  wawi/identification.py,sha256=bVB6EVRR6J39OO9ckuzNJ6f0FwIo4cLqfYgrsIN89TE,1748
11
- wawi/io.py,sha256=cr8XLF7bwpTCxpZ84YjOyWjc5uuu-JjGv8vY9UKH-HI,25327
12
- wawi/modal.py,sha256=L1Rs_YVEADOmsQL-hJ43eb8Nt5VpYuB1VHOjYK2O9X0,20252
11
+ wawi/io.py,sha256=th_hHucLOemFFh7OHyR8EyO4NkH1YSnUlt4kok3XDqg,25352
12
+ wawi/modal.py,sha256=SOmzjviDMBw4OwQAUq3EXo_FJyv6uoZg-fsE3fizXHk,20253
13
13
  wawi/plot.py,sha256=jllJcjZxTBqjzBoT4k9jLXVUnie8oqNr8371IJvCd3c,19791
14
14
  wawi/prob.py,sha256=0nCdKdwkNf4M6sHyCZuYlt06gD0NmqRNfl4KesgySWA,215
15
15
  wawi/random.py,sha256=MHPpyTlRJSJFkCmeTAmw4Q5K1BPoFVb0Nxg0jDhkuIM,871
@@ -17,7 +17,7 @@ wawi/signal.py,sha256=9HJs7VUhXOccuYPo12A0IUVoBIAJ2e_9F3rL-q3JuP4,1179
17
17
  wawi/structural.py,sha256=t25ohH4uBbzUJ7Hqn_kUfYhxcikZkRp8da-9dn7aEbw,8341
18
18
  wawi/time_domain.py,sha256=q8-H2xceP-2BmtOfbRQqYhD1JSb0z7jGq-dL_MzAX40,6122
19
19
  wawi/tools.py,sha256=-hFBvf0qK4AMn2MQRhrOitDMMMKm2QuRkVfbPBefEkQ,332
20
- wawi/wave.py,sha256=hhKg3KhKMBhOoCI7g8PFOGUbYgVhDyGmnYdBEdJ8mkY,16064
20
+ wawi/wave.py,sha256=Ye-5JnJJhWA1lcPQUvFTCRTzcY6LB_hu92VO8z2i01I,16059
21
21
  wawi/wind.py,sha256=VHy07IbrCJxlqR0Z5O5WRc9YE4jb-MqFbULPiXhj0NA,38211
22
22
  wawi/wind_code.py,sha256=8OKLPpqc84obNNKBoYb2NunKjcn6a3i_pAWpIFEwg4Q,223
23
23
  wawi/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -28,11 +28,11 @@ wawi/ext/sofistik.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  wawi/model/__init__.py,sha256=u6B-dugP76LBkOUVMs0KAoQ81PeRHwFL0M8MbNeAaJA,218
29
29
  wawi/model/_aero.py,sha256=tvWMjMoVi9ZVBc3NZ_s-wSofbEk1cc5jf5s-Swv2RxQ,9337
30
30
  wawi/model/_dry.py,sha256=KpmFlSinoY6DrSyc3Y0M8w1-cCC7VCFep-uzcqZsHz4,3940
31
- wawi/model/_hydro.py,sha256=1tUj19OgvEjItNtBxXuPHf0zWtKv_ioTrOcgl9Ov3dg,26960
32
- wawi/model/_model.py,sha256=ynZkyoU00crTAlu7sN0CmJsn-J8vwK7BDbMCh0pb-hI,53061
31
+ wawi/model/_hydro.py,sha256=7kzOqKou9RV1KoYXC-6oVw8gtnqfC-NfeohLFDiL-uI,27107
32
+ wawi/model/_model.py,sha256=m6UF3onrQFgsJUNDzuot2maAuJpqTxoP4hHCBHbDuMs,53322
33
33
  wawi/model/_screening.py,sha256=NRYkKq928z2lqMSUTpbQLls04td_9R_4dhkjU3Gv1oQ,3716
34
- wawi-0.0.12.dist-info/licenses/LICENSE,sha256=bH1aWhrNbbPLrYnVFRaoYYzcUr-figHjry-kGB7Tc54,1076
35
- wawi-0.0.12.dist-info/METADATA,sha256=lXTUPijzmyd6QOJ2LmCPJaF7H_NWkysiOZkJkhlKqlU,6530
36
- wawi-0.0.12.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
37
- wawi-0.0.12.dist-info/top_level.txt,sha256=Nk5G_ZwgZRCb9ZMWZdr1M3QIskX6kCnlqeMl67N3zg8,20
38
- wawi-0.0.12.dist-info/RECORD,,
34
+ wawi-0.0.16.dist-info/licenses/LICENSE,sha256=bH1aWhrNbbPLrYnVFRaoYYzcUr-figHjry-kGB7Tc54,1076
35
+ wawi-0.0.16.dist-info/METADATA,sha256=mMH-uf9JkCUNj4-8gSN3sI0A7bMUhddpWkg9GqoyhY8,9502
36
+ wawi-0.0.16.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
37
+ wawi-0.0.16.dist-info/top_level.txt,sha256=Nk5G_ZwgZRCb9ZMWZdr1M3QIskX6kCnlqeMl67N3zg8,20
38
+ wawi-0.0.16.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5