58 lines
1.7 KiB
OpenSCAD
58 lines
1.7 KiB
OpenSCAD
// ======== Global Parameters ======== //
|
|
$fn = 75;
|
|
inlet_segments = 60;
|
|
outlet_segments = 20;
|
|
|
|
// ======== Venturi Geometry ======== //
|
|
inlet_length = 250;
|
|
outlet_length = 350;
|
|
inlet_radius = 200;
|
|
throat_radius = 80;
|
|
outlet_radius = 110;
|
|
wall_thickness = 5;
|
|
|
|
inlet_curve_factor = 2;
|
|
outlet_curve_factor = 1.5;
|
|
|
|
// ======== Utility Module ======== //
|
|
module stacked_shell(length, r_end, thickness, segments, curve_factor, is_outer = true) {
|
|
for (i = [0:segments - 1]) {
|
|
h = length / segments;
|
|
t0 = i / (segments - 1);
|
|
t1 = (i + 1) / (segments - 1);
|
|
|
|
r1 = throat_radius + (r_end - throat_radius) * pow(t0, curve_factor);
|
|
r2 = throat_radius + (r_end - throat_radius) * pow(t1, curve_factor);
|
|
|
|
if (!is_outer) {
|
|
r1 = r1 - thickness;
|
|
r2 = r2 - thickness;
|
|
}
|
|
|
|
translate([0, 0, i * h])
|
|
cylinder(h = h, r1 = r1, r2 = r2);
|
|
}
|
|
}
|
|
|
|
// ======== Inlet Module ======== //
|
|
module inlet() {
|
|
difference() {
|
|
stacked_shell(inlet_length, inlet_radius, wall_thickness, inlet_segments, inlet_curve_factor, true);
|
|
stacked_shell(inlet_length, inlet_radius, wall_thickness, inlet_segments, inlet_curve_factor, false);
|
|
}
|
|
}
|
|
|
|
// ======== Outlet Module ======== //
|
|
module outlet() {
|
|
difference() {
|
|
stacked_shell(outlet_length, outlet_radius, wall_thickness, outlet_segments, outlet_curve_factor, true);
|
|
stacked_shell(outlet_length, outlet_radius, wall_thickness, outlet_segments, outlet_curve_factor, false);
|
|
}
|
|
}
|
|
|
|
// ======== Top-Level Geometry ======== //
|
|
translate([0, 0, 0])
|
|
rotate([0, -90, 0]) inlet();
|
|
|
|
translate([0, 0, 0])
|
|
rotate([0, 90, 0]) outlet(); |