wawi 0.0.12__py3-none-any.whl → 0.0.13__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.
- wawi/__init__.py +1 -1
- wawi/io.py +1 -1
- wawi/modal.py +1 -0
- wawi/model/_hydro.py +13 -10
- wawi/model/_model.py +14 -6
- wawi/wave.py +0 -1
- {wawi-0.0.12.dist-info → wawi-0.0.13.dist-info}/METADATA +7 -2
- {wawi-0.0.12.dist-info → wawi-0.0.13.dist-info}/RECORD +11 -11
- {wawi-0.0.12.dist-info → wawi-0.0.13.dist-info}/WHEEL +1 -1
- {wawi-0.0.12.dist-info → wawi-0.0.13.dist-info}/licenses/LICENSE +0 -0
- {wawi-0.0.12.dist-info → wawi-0.0.13.dist-info}/top_level.txt +0 -0
wawi/__init__.py
CHANGED
wawi/io.py
CHANGED
@@ -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
|
---------------
|
wawi/modal.py
CHANGED
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
|
-
|
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=
|
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=
|
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=
|
877
|
-
C = interp1d(omega, B, axis=2, fill_value=
|
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=
|
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
|
-
|
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
|
-
|
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
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wawi
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.13
|
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,7 +48,7 @@ Dynamic: license-file
|
|
48
48
|

|
49
49
|
=======================
|
50
50
|
|
51
|
-
What is
|
51
|
+
What is WAWI?
|
52
52
|
=======================
|
53
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.
|
54
54
|
|
@@ -68,6 +68,11 @@ pip install git+https://www.github.com/knutankv/wawi.git@main
|
|
68
68
|
```
|
69
69
|
|
70
70
|
|
71
|
+
How does WAWI work?
|
72
|
+
======================
|
73
|
+
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:
|
74
|
+

|
75
|
+
|
71
76
|
Quick start
|
72
77
|
=======================
|
73
78
|
Assuming a premade WAWI-model is created and saved as `MyModel.wwi´, it can be imported as follows:
|
@@ -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=
|
7
|
+
wawi/__init__.py,sha256=XwztcgUqHaXYX8ywshKc0BVsSVDStFgeENuVdN3PWuk,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=
|
12
|
-
wawi/modal.py,sha256=
|
11
|
+
wawi/io.py,sha256=3cPgyVGpZcne60-vXQZYXVj9e5m044XDeR3eMZ3BF7Y,25359
|
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=
|
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=
|
32
|
-
wawi/model/_model.py,sha256=
|
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.
|
35
|
-
wawi-0.0.
|
36
|
-
wawi-0.0.
|
37
|
-
wawi-0.0.
|
38
|
-
wawi-0.0.
|
34
|
+
wawi-0.0.13.dist-info/licenses/LICENSE,sha256=bH1aWhrNbbPLrYnVFRaoYYzcUr-figHjry-kGB7Tc54,1076
|
35
|
+
wawi-0.0.13.dist-info/METADATA,sha256=aYeyNdzi5eAyQn3TvytkWoKeuWncwMNiWwBpLu_-MyI,6991
|
36
|
+
wawi-0.0.13.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
37
|
+
wawi-0.0.13.dist-info/top_level.txt,sha256=Nk5G_ZwgZRCb9ZMWZdr1M3QIskX6kCnlqeMl67N3zg8,20
|
38
|
+
wawi-0.0.13.dist-info/RECORD,,
|
File without changes
|
File without changes
|