Skip to content

Commit

Permalink
Updated tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
pjuangph committed Mar 4, 2024
1 parent 2c79ad0 commit 0ff3ea6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions tutorials/3D_DesignTutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
"source": [
"import sys\n",
"import numpy as np\n",
"from pyturbo.aero import airfoil2D\n",
"from pyturbo.aero import Airfoil2D\n",
"from pyturbo.helper import exp_ratio\n",
"\n",
"stator_hub = airfoil2D(alpha1=0,alpha2=72,axial_chord=0.04,stagger=50) # This creates the camberline\n",
"stator_hub = Airfoil2D(alpha1=0,alpha2=72,axial_chord=0.04,stagger=50) # This creates the camberline\n",
"# Building Leading Edge\n",
"stator_hub.le_thickness_add(0.04)\n",
"# Building the Pressure side \n",
Expand Down Expand Up @@ -122,7 +122,7 @@
}
],
"source": [
"stator_mid = airfoil2D(alpha1=10,alpha2=72,axial_chord=0.038,stagger=45) # This creates the camberline\n",
"stator_mid = Airfoil2D(alpha1=10,alpha2=72,axial_chord=0.038,stagger=45) # This creates the camberline\n",
"# Building Leading Edge\n",
"stator_mid.le_thickness_add(0.06)\n",
"# Building the Pressure side \n",
Expand Down Expand Up @@ -168,7 +168,7 @@
}
],
"source": [
"stator_tip = airfoil2D(alpha1=5,alpha2=60,axial_chord=0.038,stagger=40) # This creates the camberline\n",
"stator_tip = Airfoil2D(alpha1=5,alpha2=60,axial_chord=0.038,stagger=40) # This creates the camberline\n",
"# Building Leading Edge\n",
"stator_tip.le_thickness_add(0.04)\n",
"# Building the Pressure side \n",
Expand Down Expand Up @@ -241,10 +241,10 @@
}
],
"source": [
"from pyturbo.aero import airfoil3D, stack_type\n",
"from pyturbo.aero import Airfoil3D, stack_type\n",
"import matplotlib.pyplot as plt \n",
"\n",
"stator3D = airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.02)\n",
"stator3D = Airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.02)\n",
"stator3D.stack(stack_type.leading_edge) # Stators are typically stacked with leading edge; rotors with centroid or trailing edge\n",
"# You can also use stack_type.centroid or stack_type.trailing_edge\n",
"stator3D.create_blade(20,160,20) \n",
Expand Down Expand Up @@ -285,7 +285,7 @@
}
],
"source": [
"stator3D = airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.02)\n",
"stator3D = Airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.02)\n",
"stator3D.stack(stack_type.trailing_edge) # Stators are typically stacked with leading edge; rotors with centroid or trailing edge\n",
"# You can also use stack_type.centroid or stack_type.trailing_edge\n",
"stator3D.create_blade(20,160,20) \n",
Expand Down Expand Up @@ -377,7 +377,7 @@
}
],
"source": [
"stator3D = airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.02)\n",
"stator3D = Airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.02)\n",
"stator3D.stack(stack_type.centroid)\n",
"stator3D.lean_add(leanX=[0,0.03,0.01], leanZ=[0.0, 0.5, 1]) # Z =1 is blade tip, Z = 0 is blade hub. The units are in percentage \n",
"stator3D.create_blade(20,160,20) \n",
Expand Down Expand Up @@ -414,7 +414,7 @@
}
],
"source": [
"stator3D = airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.04)\n",
"stator3D = Airfoil3D(profileArray=[stator_hub,stator_mid,stator_tip],profile_loc=[0.0,0.5,1.0], height = 0.04)\n",
"stator3D.stack(stack_type.leading_edge) # Stators are typically stacked with leading edge; rotors with centroid or trailing edge\n",
"stator3D.sweep(sweep_y=[0,0.5,0.2], sweep_z=[0.0, 0.5, 1]) # Z =1 is blade tip, Z = 0 is blade hub. The units are in percentage \n",
"stator3D.create_blade(20,160,20) \n",
Expand Down
2 changes: 1 addition & 1 deletion tutorials/3D_design_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
stator3D.stack(stack_type.centroid) # Stators are typically stacked with leading edge; rotors with centroid or trailing edge
stator3D.sweep(sweep_y=[0,-0.05,0.05], sweep_z=[0.0, 0.5, 1]) # Z =1 is blade tip, Z = 0 is blade hub. The units are in percentage
stator3D.lean(leanX=[0,0.01,-0.02],leanZ=[0,0.5,1])
stator3D.create_blade(nProfiles=20,profile_points=160,20)
stator3D.create_blade(nProfiles=20,profile_points=160,trailing_edge_points=20)
# stator3D.plot3D()
print('check')
stator3D.export_solidworks('rotor')

0 comments on commit 0ff3ea6

Please sign in to comment.