Fandom

Renewable Energy Design

Rotor1-1-9.gif

52pages on
this wiki
Add New Page
Talk0
Rotor1-1-9.gif(300 × 300 pixels, file size: 30 KB, MIME type: image/gif)

Intertwined helices. Gas not shown. Created with brlcad-7.6.4, xwd, and The GIMP. Copyright (c) Archimedes Submerged 2006. Creative Commons Attribution license.

This file is licensed under Creative Commons
Attribution 2.5 License:
http://creativecommons.org/licenses/by/2.5/


# helix calculates x,y,z coordinates of a helix
# which is oriented with its axis coinciding with X axis.
# For left-handed helix, use -p and -t.
# p -- pitch:  position along X axis is p*t + xoff
# r -- radius:  radius of outside.
# t -- theta:  angle of current point.
# xoff -- add to position along X axis after all multiplication.
proc helix { p r t xoff } {
    list [expr ($p)*($t)+($xoff)] \
	[expr ($r)*cos($t)] \
	[expr ($r)*sin($t)] 
}

# Create a piece-of-pie-shaped arb6
# For left-handed helix, use -p and -dT.
# n -- name prefix
# i -- name of the arb6 is $n$i.s.  $i is number.
# p -- pitch of helix.  Position is p*t
# r -- radius of helix.
# dT -- dTheta.  Actual angle is $i*$dT
# dX -- thickness
# Each piece is dT radians wide and dX units thick.
proc pie { n i p r dT dX } {
    concat in $n$i.s arb6 \
	[helix ($p) ($r) ($i+0.5)*($dT) ($dX*2) ] \
	[helix ($p) ($r) ($i-0.5)*($dT) ($dX*2) ] \
	[helix ($p) ($r) ($i-0.5)*($dT) ($dX)   ] \
	[helix ($p) ($r) ($i+0.5)*($dT) ($dX)   ] \
	[helix ($p) 0    ($i)*($dT)     ($dX*2) ] \
	[helix ($p) 0    ($i)*($dT)     ($dX)   ]
}

set numpieces 400
set rhradius 10.0
set lhradius 15.0
set maxradius 15.0
set pitch 1.0
set dTheta 0.05
set thickness 0.1
# Create the pieces-of-pie.
# Pitch is $pitch
# Radius is $radius
# Each piece is 0.05 radians wide.
for { set i 0 } { $i < $numpieces } {incr i} {
    eval [pie rh $i $pitch $rhradius $dTheta $thickness ]
    eval [pie lh $i -$pitch $lhradius -$dTheta $thickness ]
}

# Create string listing all of the pieces-of-pie.
for { set i 0; set rh {}; set lh {} } { $i < $numpieces } {incr i} {
  set rh [concat $rh u rh$i.s]
  set lh [concat $lh u lh$i.s]
}

# Create a right circular cylinder forming the outside
# shell of the rotor.
# in name rcc vx vy vz hx hy hz r
# vxyz is vertex.  hxyz is height vector.  r is radius
set height [expr ($pitch)*($dTheta)*($numpieces) + 1.5]
in rh.outrcc.s rcc 0 0 0 $height 0 0 [expr $rhradius]
in rh.inrcc.s  rcc 0 0 0 $height 0 0 [expr ($rhradius)*0.99]
in rh.shaft.s  rcc 0 0 0 $height 0 0 [expr ($rhradius)*0.6]
in lh.outrcc.s rcc 0 0 0 $height 0 0 [expr $lhradius]
in lh.inrcc.s  rcc 0 0 0 $height 0 0 [expr ($lhradius)*0.99]
in lh.shaft.s  rcc 0 0 0 $height 0 0 [expr ($lhradius)*0.8]

# Create a cut-away view.
# set maxradius small to eliminate the cut-away.
# set maxradius 0.1
in cutout.s arb8  \
  0 0 0  \
  0 $maxradius 0  \
  0 $maxradius $maxradius  \
  0 0 $maxradius   \
  $height 0 0  \
  $height $maxradius 0  \
  $height $maxradius $maxradius  \
  $height 0 $maxradius 

# Create the regions rh.shell.r and lh.shell.r
r rh.shell.r u rh.outrcc.s - rh.inrcc.s - cutout.s
r lh.shell.r u lh.outrcc.s - lh.inrcc.s - cutout.s

# Create the regions rh.cutoutshell.r and lh.cutoutshell.r
r rh.cutoutshell.r u rh.outrcc.s + cutout.s - rh.inrcc.s
r lh.cutoutshell.r u lh.outrcc.s + cutout.s - lh.inrcc.s

# Create the regions rh.pies.r and lh.pies.r
eval r rh.pies.r $rh
eval r lh.pies.r $lh

# Create combinations rh.helix.c and lh.helix.c
c rh.helix.c rh.pies.r - rh.shell.r - rh.shaft.s - cutout.s
c lh.helix.c lh.pies.r - lh.shell.r - lh.shaft.s - cutout.s

# Create combinations rh.helixcutout.c and lh.helixcutout.c
c rh.helixcutout.c rh.pies.r + cutout.s - rh.cutoutshell.r - rh.shaft.s
c lh.helixcutout.c lh.pies.r + cutout.s - lh.cutoutshell.r - lh.shaft.s

# mater region material-name r g b 0
# (last 0 means "Do not inherit colors or material type").
mater rh.helix.c plastic 255 0 0 0
mater lh.helix.c plastic 0 0 255 0

mater rh.shell.r glass 255 128 128 0
mater lh.shell.r glass 128 128 255 0

mater rh.helixcutout.c plastic 255 0 0 0
mater lh.helixcutout.c plastic 0 0 255 0

mater rh.cutoutshell.r glass 255 0 0 0
mater lh.cutoutshell.r glass 255 0 0 0

#B rh.helix.c lh.helix.c rh.shell.r lh.shell.r rh.helixcutout.c lh.helixcutout.c rh.cutoutshell.r lh.cutoutshell.r
B rh.helix.c lh.helix.c rh.shell.r lh.shell.r rh.helixcutout.c lh.helixcutout.c

proc killHelix {} {
    global numpieces
    for { set i 0 } { $i < $numpieces } {incr i} {
	kill rh$i.s
	kill lh$i.s
    }
    kill rh.outrcc.s lh.outrcc.s
    kill rh.inrcc.s lh.inrcc.s
    kill rh.shaft.s lh.shaft.s
    kill cutout.s
    kill rh.shell.r lh.shell.r
    kill rh.pies.r lh.pies.r
    kill rh.helix.c lh.helix.c
    kill rh.cutoutshell.r lh.cutoutshell.r
    kill rh.helixcutout.c lh.helixcutout.c
}

Appears on these pages
of

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current10:11, January 13, 2006Thumbnail for version as of 10:11, January 13, 2006300 × 300 (30 KB)Archimerged (Talk | contribs)Intertwined helices. Gas not shown.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.