h2lib 13.1.3109__py3-none-win_amd64.whl → 13.2.201__py3-none-win_amd64.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.
- h2lib/HAWC2Lib.dll +0 -0
- h2lib/_h2lib.py +6 -4
- h2lib/_version.py +3 -3
- h2lib/dll_wrapper.py +1 -3
- h2lib/h2lib_signatures.py +15 -14
- {h2lib-13.1.3109.dist-info → h2lib-13.2.201.dist-info}/METADATA +2 -2
- h2lib-13.2.201.dist-info/RECORD +10 -0
- h2lib-13.1.3109.dist-info/RECORD +0 -10
- {h2lib-13.1.3109.dist-info → h2lib-13.2.201.dist-info}/WHEEL +0 -0
- {h2lib-13.1.3109.dist-info → h2lib-13.2.201.dist-info}/top_level.txt +0 -0
h2lib/HAWC2Lib.dll
CHANGED
Binary file
|
h2lib/_h2lib.py
CHANGED
@@ -130,19 +130,21 @@ class H2LibThread(H2LibSignatures, DLLWrapper):
|
|
130
130
|
self._initialized = True
|
131
131
|
return r
|
132
132
|
|
133
|
-
def init_AD(self, htc_path=None, model_path='.', tiploss_method=2,
|
133
|
+
def init_AD(self, htc_path=None, model_path='.', tiploss_method=2, tiploss2_shen_c2=21, tiploss2_shen_h=0, rotor=0):
|
134
134
|
"""Initialize HAWC2 for Actuator Disc workflow, where wind speeds including induction at the aerodynamic sections
|
135
135
|
are passed from e.g. CFD to HAWC2 via set_aerosections_windspeed.
|
136
136
|
This function will:
|
137
137
|
- Disable wind speed update at blade sections (wind speeds must be set via set_aerosections_windspeed)
|
138
138
|
- Disable HAWC2 induction (induction_method=0).
|
139
139
|
- set GetWindSpeedData%u_mean=nan to avoid unintended use of the free wind module in HAWC2
|
140
|
-
- set the tiploss_method. The default method is 2, which works with the AD workflow,
|
141
|
-
|
140
|
+
- set the tiploss_method. The default method is 2, which works with the AD workflow,
|
141
|
+
but the tiploss2_shen_c2 and tiploss2_shen_h parameters must be tuned to give sensible results,
|
142
|
+
see tiploss_method in the HAWC2 manual
|
142
143
|
"""
|
143
144
|
assert not self._initialized, "h2lib already initialized via init, init_AD or init_AL"
|
144
145
|
self.read_input(htc_path, model_path)
|
145
|
-
r = H2LibSignatures.init_AD(self, rotor + 1, int(tiploss_method),
|
146
|
+
r = H2LibSignatures.init_AD(self, rotor + 1, int(tiploss_method),
|
147
|
+
float(tiploss2_shen_c2), float(tiploss2_shen_h))
|
146
148
|
self._initialized = True
|
147
149
|
return r
|
148
150
|
|
h2lib/_version.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
# This file is autogenerated and should not be modified manually
|
2
|
-
__version__ = '13.
|
3
|
-
h2lib_version = '13.
|
4
|
-
hawc2_version = '13.
|
2
|
+
__version__ = '13.2.201'
|
3
|
+
h2lib_version = '13.2.201'
|
4
|
+
hawc2_version = '13.2.2+2-g5cd9228'
|
h2lib/dll_wrapper.py
CHANGED
@@ -163,10 +163,8 @@ def wrap(self, f, *args, check_stop=True, **kwargs):
|
|
163
163
|
elif isinstance(arg, (str)):
|
164
164
|
ret_args.append(c_arg.value.decode('cp1252'))
|
165
165
|
# c_args.pop(0)
|
166
|
-
elif isinstance(arg, np.ndarray):
|
167
|
-
ret_args.append(arg)
|
168
166
|
else:
|
169
|
-
|
167
|
+
ret_args.append(arg)
|
170
168
|
return ret_args, res
|
171
169
|
|
172
170
|
|
h2lib/h2lib_signatures.py
CHANGED
@@ -320,28 +320,29 @@ end subroutine'''
|
|
320
320
|
end subroutine'''
|
321
321
|
return self.get_lib_function('init')(check_stop=check_stop)
|
322
322
|
|
323
|
-
def init_AD(self, rotor, tiploss_method,
|
324
|
-
'''subroutine init_AD(rotor, tiploss_method,
|
323
|
+
def init_AD(self, rotor, tiploss_method, tiploss2_shen_c2, tiploss2_shen_h, check_stop=True):
|
324
|
+
'''subroutine init_AD(rotor, tiploss_method, tiploss2_shen_c2, tiploss2_shen_h) bind(C, name="init_AD")
|
325
325
|
integer*8, intent(in) :: rotor
|
326
326
|
integer*8, intent(in) :: tiploss_method
|
327
|
-
REAL(c_double), intent(in) ::
|
327
|
+
REAL(c_double), intent(in) :: tiploss2_shen_c2, tiploss2_shen_h
|
328
328
|
end subroutine'''
|
329
|
-
return self.get_lib_function('init_AD')(rotor, tiploss_method,
|
329
|
+
return self.get_lib_function('init_AD')(rotor, tiploss_method, tiploss2_shen_c2,
|
330
|
+
tiploss2_shen_h, check_stop=check_stop)
|
330
331
|
|
331
|
-
def init_AL(self, rotor, epsilon_smearing):
|
332
|
+
def init_AL(self, rotor, epsilon_smearing, check_stop=True):
|
332
333
|
'''subroutine init_AL(rotor, epsilon_smearing) bind(C, name="init_AL")
|
333
334
|
real(c_double), intent(in) :: epsilon_smearing
|
334
335
|
integer*8, intent(in) :: rotor
|
335
336
|
end subroutine'''
|
336
|
-
return self.get_lib_function('init_AL')(rotor, epsilon_smearing)
|
337
|
+
return self.get_lib_function('init_AL')(rotor, epsilon_smearing, check_stop=check_stop)
|
337
338
|
|
338
|
-
def init_windfield(self, Nxyz, dxyz, box_offset_yz, transport_speed):
|
339
|
+
def init_windfield(self, Nxyz, dxyz, box_offset_yz, transport_speed, check_stop=True):
|
339
340
|
'''subroutine init_windfield(Nxyz, dxyz, box_offset_yz, transport_speed) bind(C, name="init_windfield")
|
340
341
|
integer*8, dimension(3), intent(in) :: Nxyz
|
341
342
|
real*8 :: transport_speed
|
342
343
|
end subroutine'''
|
343
344
|
return self.get_lib_function('init_windfield')(
|
344
|
-
Nxyz, dxyz, box_offset_yz, transport_speed)
|
345
|
+
Nxyz, dxyz, box_offset_yz, transport_speed, check_stop=check_stop)
|
345
346
|
|
346
347
|
def linearize(self, n_tdofs, n_rdofs, check_stop=True):
|
347
348
|
'''subroutine linearize(n_tdofs, n_rdofs) bind(C, name="linearize")
|
@@ -381,6 +382,12 @@ end subroutine'''
|
|
381
382
|
end subroutine'''
|
382
383
|
return self.get_lib_function('read_input')(htc_path, check_stop=check_stop)
|
383
384
|
|
385
|
+
def reset_stop_code_and_message(self, check_stop=True):
|
386
|
+
'''subroutine reset_stop_code_and_message() bind(C, name="reset_stop_code_and_message")
|
387
|
+
!DEC$ ATTRIBUTES DLLEXPORT :: reset_stop_code_and_message
|
388
|
+
end subroutine'''
|
389
|
+
return self.get_lib_function('reset_stop_code_and_message')(check_stop=check_stop)
|
390
|
+
|
384
391
|
def run(self, time, restype, check_stop=True):
|
385
392
|
'''function run(time) bind(C, name='run')
|
386
393
|
!DEC$ ATTRIBUTES DLLEXPORT :: run
|
@@ -389,12 +396,6 @@ end subroutine'''
|
|
389
396
|
end function'''
|
390
397
|
return self.get_lib_function('run')(time, restype=restype, check_stop=check_stop)
|
391
398
|
|
392
|
-
def reset_stop_code_and_message(self, check_stop=True):
|
393
|
-
'''subroutine reset_stop_code_and_message() bind(C, name="reset_stop_code_and_message")
|
394
|
-
!DEC$ ATTRIBUTES DLLEXPORT :: reset_stop_code_and_message
|
395
|
-
end subroutine'''
|
396
|
-
return self.get_lib_function('reset_stop_code_and_message')(check_stop=check_stop)
|
397
|
-
|
398
399
|
def setState(self, val, check_stop=True):
|
399
400
|
'''subroutine setState(val) BIND(C, NAME='setState')
|
400
401
|
integer, intent(in) :: val
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: h2lib
|
3
|
-
Version: 13.
|
4
|
-
Summary: Python interface to HAWC2 (13.
|
3
|
+
Version: 13.2.201
|
4
|
+
Summary: Python interface to HAWC2 (13.2.2+2-g5cd9228)
|
5
5
|
Download-URL:
|
6
6
|
Author: Mads M. Pedersen, S.G.Horcas and N.G.Ramos
|
7
7
|
Author-email: mmpe@dtu.dk
|
@@ -0,0 +1,10 @@
|
|
1
|
+
h2lib/HAWC2Lib.dll,sha256=M6SWeBpQ32Phv7Bcj0LQhmiJdnXwWNwoNSPKtk_mpLc,30980096
|
2
|
+
h2lib/__init__.py,sha256=f3fO4I6IEFRM9LaV2O3w9Pioj3GPI8qRl7P5Tg5ONtE,528
|
3
|
+
h2lib/_h2lib.py,sha256=Nxtz01N-AcMX-OZYS2-QRjuGDBVVKWopBHcxAHfjR7s,39553
|
4
|
+
h2lib/_version.py,sha256=wfBRDfXJqowsNUL3qywY9qWaPyrqBIh3pXkfxk1s-vw,157
|
5
|
+
h2lib/dll_wrapper.py,sha256=O_lGZ_w3FirjEn4FIE5OeZz30nwpufJB5sflVzf4Cc4,13446
|
6
|
+
h2lib/h2lib_signatures.py,sha256=gHHPZ9vjwQwRA8Vb8V2gOuYBL6mZz9r_pcu7_EtzVoE,29637
|
7
|
+
h2lib-13.2.201.dist-info/METADATA,sha256=YYuUvTlE3pDY7aS7STdo14Y4c-wMj1fI0Wv85hV0AzY,860
|
8
|
+
h2lib-13.2.201.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
9
|
+
h2lib-13.2.201.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
|
10
|
+
h2lib-13.2.201.dist-info/RECORD,,
|
h2lib-13.1.3109.dist-info/RECORD
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
h2lib/HAWC2Lib.dll,sha256=-RWWR4jTbcA6IREWSn_kf9Jvy4lHNseaX6rwiMGISrI,30970368
|
2
|
-
h2lib/__init__.py,sha256=f3fO4I6IEFRM9LaV2O3w9Pioj3GPI8qRl7P5Tg5ONtE,528
|
3
|
-
h2lib/_h2lib.py,sha256=X0G8PYTrArB1Wk9IbhHvUMlximW3oCP54hIWy0SnNuM,39438
|
4
|
-
h2lib/_version.py,sha256=BsyaHU7sQvoNU74qCuDZ9ajCgPbQ-Lg-ayQmc_xJBAM,160
|
5
|
-
h2lib/dll_wrapper.py,sha256=NtH3wVJ4okYLBXjdRxpllnImRDE7p692OgHuwHkt-WQ,13552
|
6
|
-
h2lib/h2lib_signatures.py,sha256=sPCh92WdCc6brPgARZ_QBgSz49Yjq0M5SpWb0or5KvM,29396
|
7
|
-
h2lib-13.1.3109.dist-info/METADATA,sha256=TvFSne3cdju76W83EBX0gQGkWYQvpvp-thxH2wyQDzA,862
|
8
|
-
h2lib-13.1.3109.dist-info/WHEEL,sha256=8UP9x9puWI0P1V_d7K2oMTBqfeLNm21CTzZ_Ptr0NXU,101
|
9
|
-
h2lib-13.1.3109.dist-info/top_level.txt,sha256=y_a-tUqphEZQ_0nsWSMaSb21P8Lsd8hUxUdE9g2Dcbk,6
|
10
|
-
h2lib-13.1.3109.dist-info/RECORD,,
|
File without changes
|
File without changes
|