Skip to content

Slight changes needed for 22MW turbine #27

@mrnorman

Description

@mrnorman

In order to get the 22MW turbine working with this on my machine, I had to make the changes below. I'm far from an expert in python, so it might be some other problem with my setup, but feel free to ignore if that's the case. Thanks for making this utility, by the way. It's been really useful. I've placed my environment into a public gist here: https://gist.github.com/mrnorman/adf6f6237b35ac5781fa918b6e121181

-Matt

(base) [imn@lapitat:~/windio2cad] 8-) git diff
diff --git a/windio2cad/__main__.py b/windio2cad/__main__.py
index 4838d2e..f6354e1 100644
--- a/windio2cad/__main__.py
+++ b/windio2cad/__main__.py
@@ -119,7 +119,7 @@ class Blade:
             points = np.c_[
                 self.airfoils[i]["coordinates"]["x"],
                 self.airfoils[i]["coordinates"]["y"],
-            ]
+            ].astype(np.float64)
 
             # Check that airfoil points are declared from the TE suction side to TE pressure side
             idx_le = np.argmin(points[:, 0])
diff --git a/windio2cad/distfunc.py b/windio2cad/distfunc.py
index 669a8d2..0e57734 100644
--- a/windio2cad/distfunc.py
+++ b/windio2cad/distfunc.py
@@ -37,14 +37,14 @@ def distfunc(dinp, ival=1):
     fdist[0] = 0.0
     s0 = dinp[0, 0]
     d0 = dinp[0, 1]
-    n0 = np.int(dinp[0, 2]) - 1
+    n0 = np.int64(dinp[0, 2]) - 1
 
     for i in range(1, nn):
         s1 = dinp[i, 0]
         if i  > 0  and d0 < 0.:
             d0 = fdist[n0] - fdist[n0-1]
         d1 = dinp[i, 1]
-        n1 = np.int(dinp[i, 2]) - 1
+        n1 = np.int64(dinp[i, 2]) - 1
         _len = s1 - s0
         delta1 = d0
         delta2 = d1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions