Skip to content

Commit 614dc6a

Browse files
acmartaeytanadler
andauthored
Update aerostruct_groups.py (#392)
* Update aerostruct_groups.py Promote section lift coefficient * Switched deprecated numpy asscalar to item * Update aerostruct_groups.py Promote CDw * Version bump to 2.5.1 Co-authored-by: Eytan Adler <eytana@umich.edu>
1 parent e79bada commit 614dc6a

4 files changed

Lines changed: 19 additions & 19 deletions

File tree

openaerostruct/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.5.0"
1+
__version__ = "2.5.1"

openaerostruct/aerodynamics/pg_scale.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def compute_partials(self, inputs, partials):
205205
rotational = self.options["rotational"]
206206

207207
M = inputs["Mach_number"]
208-
betaPG = np.asscalar(np.sqrt(1 - M**2))
208+
betaPG = np.sqrt(1 - M**2).item()
209209
fact = np.array([1.0, betaPG, betaPG], M.dtype)
210210
fact_norm = np.array([betaPG, 1.0, 1.0], M.dtype)
211211
num_eval_pts = inputs["bound_vecs_w_frame"].shape[0]

openaerostruct/aerodynamics/pg_wind_rotation.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ def compute(self, inputs, outputs):
166166
alpha = inputs["alpha"]
167167
beta = inputs["beta"]
168168

169-
cosa = np.asscalar(np.cos(alpha))
170-
sina = np.asscalar(np.sin(alpha))
171-
cosb = np.asscalar(np.cos(beta))
172-
sinb = np.asscalar(np.sin(beta))
169+
cosa = np.cos(alpha).item()
170+
sina = np.sin(alpha).item()
171+
cosb = np.cos(beta).item()
172+
sinb = np.sin(beta).item()
173173

174174
# Define aero->wind rotation matrix
175175
Tw = np.array(
@@ -200,10 +200,10 @@ def compute_partials(self, inputs, partials):
200200
alpha = inputs["alpha"]
201201
beta = inputs["beta"]
202202

203-
cosa = np.asscalar(np.cos(alpha))
204-
sina = np.asscalar(np.sin(alpha))
205-
cosb = np.asscalar(np.cos(beta))
206-
sinb = np.asscalar(np.sin(beta))
203+
cosa = np.cos(alpha).item()
204+
sina = np.sin(alpha).item()
205+
cosb = np.cos(beta).item()
206+
sinb = np.sin(beta).item()
207207

208208
num_eval_pts = inputs["bound_vecs"].shape[0]
209209

@@ -306,10 +306,10 @@ def compute(self, inputs, outputs):
306306
alpha = inputs["alpha"]
307307
beta = inputs["beta"]
308308

309-
cosa = np.asscalar(np.cos(alpha))
310-
sina = np.asscalar(np.sin(alpha))
311-
cosb = np.asscalar(np.cos(beta))
312-
sinb = np.asscalar(np.sin(beta))
309+
cosa = np.cos(alpha).item()
310+
sina = np.sin(alpha).item()
311+
cosb = np.cos(beta).item()
312+
sinb = np.sin(beta).item()
313313

314314
# Define aero->wind rotation matrix
315315
# wind->aero rotation matrix is given by transpose
@@ -329,10 +329,10 @@ def compute_partials(self, inputs, partials):
329329
alpha = inputs["alpha"]
330330
beta = inputs["beta"]
331331

332-
cosa = np.asscalar(np.cos(alpha))
333-
sina = np.asscalar(np.sin(alpha))
334-
cosb = np.asscalar(np.cos(beta))
335-
sinb = np.asscalar(np.sin(beta))
332+
cosa = np.cos(alpha).item()
333+
sina = np.sin(alpha).item()
334+
cosb = np.cos(beta).item()
335+
sinb = np.sin(beta).item()
336336

337337
# Define aero->wind rotation matrix
338338
Tw = np.array(

openaerostruct/integration/aerostruct_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def setup(self):
164164
"sec_forces",
165165
"t_over_c",
166166
],
167-
promotes_outputs=["CDv", "L", "D", "CL1", "CDi", "CD", "CL"],
167+
promotes_outputs=["CDv", "CDw", "L", "D", "CL1", "CDi", "CD", "CL", "Cl"],
168168
)
169169

170170
if surface["fem_model_type"] == "tube":

0 commit comments

Comments
 (0)