Add venturi duct for wind turbine rotor

This commit is contained in:
2025-04-18 16:41:46 +02:00
commit d3608d1cdb
+96
View File
@@ -0,0 +1,96 @@
// Inlet variables
inlet_length = 10;
inlet_radius = 10;
inlet_throat_radius = 3;
inlet_thickness = 0.25;
inlet_segments = 30; // Number of stacked layers (higher = smoother)
inlet_curve_factor = 2; // Controls how aggressively the walls curve
module inlet() {
difference() {
union() {
for (i = [0:inlet_segments-1]) {
h = inlet_length / inlet_segments;
t = i / (inlet_segments-1);
// Apply power function for curvature
r1 = inlet_throat_radius + (inlet_radius - inlet_throat_radius) * pow(t, inlet_curve_factor);
r2 = inlet_throat_radius + (inlet_radius - inlet_throat_radius) * pow((i+1) / (inlet_segments-1), inlet_curve_factor);
translate([0, 0, i * h])
cylinder(h = h, r1 = r1, r2 = r2, $fn = 75);
}
}
// Inner subtraction (to maintain thickness)
union() {
for (i = [0:inlet_segments-1]) {
h = inlet_length / inlet_segments;
t = i / (inlet_segments-1);
r1 = (inlet_throat_radius + (inlet_radius - inlet_throat_radius) * pow(t, inlet_curve_factor)) - inlet_thickness;
r2 = (inlet_throat_radius + (inlet_radius - inlet_throat_radius) * pow((i+1) / (inlet_segments-1), inlet_curve_factor)) - inlet_thickness;
translate([0, 0, i * h])
cylinder(h = h, r1 = r1, r2 = r2, $fn = 75);
}
}
// Plate at the start of the inlet (sealed)
translate([0, 0, -inlet_thickness]) // Align the plate to the front of the inlet
cylinder(h = inlet_thickness, r = inlet_radius, $fn = 75); // Plate at the inlet (front)
}
}
// Rotate for correct orientation
rotate([0, -90, 0]) inlet();
// Outlet variables
outlet_length = 50;
outlet_radius = 10;
outlet_throat_radius = 3;
outlet_thickness = 0.25;
outlet_segments = 20; // Number of stacked layers (higher = smoother)
outlet_curve_factor = 1.5; // Controls how aggressively the walls curve
module outlet() {
difference() {
union() {
for (i = [0:outlet_segments-1]) {
h = outlet_length / outlet_segments;
t = i / (outlet_segments-1);
// Apply power function for curvature
r1 = outlet_throat_radius + (outlet_radius - outlet_throat_radius) * pow(t, outlet_curve_factor);
r2 = outlet_throat_radius + (outlet_radius - outlet_throat_radius) * pow((i+1) / (outlet_segments-1), outlet_curve_factor);
translate([0, 0, i * h])
cylinder(h = h, r1 = r1, r2 = r2, $fn = 75);
}
}
// Inner subtraction (to maintain thickness)
union() {
for (i = [0:outlet_segments-1]) {
h = outlet_length / outlet_segments;
t = i / (outlet_segments-1);
r1 = (outlet_throat_radius + (outlet_radius - outlet_throat_radius) * pow(t, outlet_curve_factor)) - outlet_thickness;
r2 = (outlet_throat_radius + (outlet_radius - outlet_throat_radius) * pow((i+1) / (outlet_segments-1), outlet_curve_factor)) - outlet_thickness;
translate([0, 0, i * h])
cylinder(h = h, r1 = r1, r2 = r2, $fn = 75);
}
}
// Plate at the end of the outlet (sealed)
translate([0, 0, outlet_length]) // Align the plate to the end of the outlet
cylinder(h = outlet_thickness, r = outlet_radius, $fn = 75); // Plate at the outlet (end)
}
}
// Rotate for correct orientation
rotate([0, 90, 0]) outlet();