Moments of inertia etc for a wedged optic with flats (T1100621)

Author:
Mark Barton

Version history:
-v1 - 12/14/11 - initial version combining older calculations with just wedges and just flats.

The source version of this file (WedgeMOI.nb) is a Mathematica package which defines functions to calculate moments of inertia etc for a wedged optic with flats. It is part of T1100621 in the DCC and also part of the Mathematica suspension modelling utilities in the SUS SVN at https://redoubt.ligo-wa.caltech.edu/svn/sus/trunk/Common/MathematicaModels/PendulumToolkit .

Usage: 
Download WedgeMOI.nb and the associated autogenerated file (WedgeMOI.m) from T1100621 in the DCC to a directory on the Mathematica path ($Path). Alternatively, check out the whole toolkit according to the instructions at https://awiki.ligo-wa.caltech.edu/aLIGO/Suspensions/MathematicaModels .) Then load the package and use the functions as illustrated in the example notebook WedgeMOITest.nb (part of T1100621).

Calculation details:
The coordinate system is as for the Mathematica suspension models by Mark Barton: +x is forward, +y is left (viewed from the back) and +z is up.
The optic has a barrel of radius R with axis in the x direction, flats of height f on the ±y sides, and thickness t measured on the barrel axis.
A flat height f of 0 is equivalent to a cylindrical barrel, i.e., no flats.
The front and back surfaces have independent wedges each with both horizontal and vertical components.
The horizontal component of the wedge is specified by slopes dx/dy of wabh on the back surface and wafh on the front surface. Negative wabh and positive wafh make the optic thicker on the left.
Likewise, the vertical component is specified by slopes dx/dz of wabv at the back and wafv at the front. Negative wabv and positive wafv make the optic thicker on the top.
All the functions were derived by symbolic integration and take symbolic or numeric arguments. However the original computation took a few minutes to run, which would be inconvenient for a general purpose package that needs to load quickly. Thus unless the switch usepreintegrated is set to False below, the integration is skipped in favour of archived results.

Mathematica package formalities

Declare the package

BeginPackage["WedgeMOI`"];

Declare the functions that are to be public by defining help text for them

masswedge::usage="masswedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the mass of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

xCOMwedge::usage="xCOMwedge[R,t,f,{wabh,wafh},{wabv,wafv}] calculates the x COM position relative the coordinate origin for a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

yCOMwedge::usage="yCOMwedge[R,t,f,{wabh,wafh},{wabv,wafv}] calculates the y COM position relative the coordinate origin for a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

zCOMwedge::usage="zCOMwedge[R,t,f,{wabh,wafh},{wabv,wafv}] calculates the z COM position relative the coordinate origin for a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

xMOIwedge::usage="xMOIwedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the x MOI of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

yMOIwedge::usage="yMOIwedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the y MOI of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

zMOIwedge::usage="zMOIwedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the z MOI of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

xyMOIwedge::usage="xyMOIwedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the x-y MOI of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

yzMOIwedge::usage="yzMOIwedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the y-z MOI of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

zxMOIwedge::usage="zxMOIwedge[rho,R,t,f,{wabh,wafh},{wabv,wafv}] calculates the z-x MOI of a wedged optic with density rho, radius R, centre thickness t, flat height f, and wedge slopes wabh, wafh, wabv and wafv.";

Begin["`Private`"];

Utilities

A switch to skip the somewhat time-consuming integrations and use archived results

usepreintegrated = True;

A substitution to fix expressions of the form Sqrt[x^2] that are often produced by Integrate[]

powerfix=(((((x_)^2)))^(Rational[n_,2])):>(x^n);

A function to integrate an expression over the volume of a wedged cylinder with flats

wedgeintegrate[fn_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}] := Integrate[
	fn,
{y,-(Sqrt[(R^2)-((((f/2)))^2)]),(Sqrt[(R^2)-((((f/2)))^2)])},
{z,-Sqrt[R^2-y^2],Sqrt[R^2-y^2]},
{x,-t/2+wabh*y+wabv*z,t/2+wafh*y+wafv*z}
]/.powerfix/.(Re[(R/(Sqrt[-((f^2)/4)+(R^2)]))]≥1->True)

Results

Mass

masswedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}] = If[usepreintegrated,
(1/2) rho t (f (Sqrt[-(f^2)+4 (R^2)])+4 (R^2) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))]),
rho*wedgeintegrate[1,R,t,f,{wabh,wafh},{wabv,wafv}]
]

x COM

xCOMwedge[R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  = If[usepreintegrated,
(f ((Sqrt[-(f^2)+4 (R^2)]) ((f^2) (3 (wabh^2)-(wabv^2)-3 (wafh^2)+(wafv^2))+6 (R^2) (-(wabh^2)-(wabv^2)+(wafh^2)+(wafv^2)))-((24 (R^4) ((wabh^2)+(wabv^2)-(wafh^2)-(wafv^2)) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))])/f)))/(48 t (f (Sqrt[-(f^2)+4 (R^2)])+4 (R^2) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))])),
wedgeintegrate[x,R,t,f,{wabh,wafh},{wabv,wafv}]/m[1,R,t,f,{wabh,wafh},{wabv,wafv}] 
]

y COM

yCOMwedge[R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  = If[usepreintegrated,
((f^3) (Sqrt[-(f^2)+4 (R^2)]) wabh-2 f (R^2) (Sqrt[-(f^2)+4 (R^2)]) wabh-(f^3) (Sqrt[-(f^2)+4 (R^2)]) wafh+2 f (R^2) (Sqrt[-(f^2)+4 (R^2)]) wafh-8 (R^4) wabh ArcTan[((Sqrt[-(f^2)+4 (R^2)])/f)]+8 (R^4) wafh ArcTan[((Sqrt[-(f^2)+4 (R^2)])/f)])/(8 t (f (Sqrt[-(f^2)+4 (R^2)])+4 (R^2) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))])),
wedgeintegrate[y,R,t,f,{wabh,wafh},{wabv,wafv}]/m[1,R,t,f,{wabh,wafh},{wabv,wafv}] 
]

z COM

zCOMwedge[R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  = If[usepreintegrated,
-(((wabv-wafv) (f (Sqrt[-(f^2)+4 (R^2)]) ((f^2)+6 (R^2))+24 (R^4) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))]))/(24 t (f (Sqrt[-(f^2)+4 (R^2)])+4 (R^2) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))]))),
wedgeintegrate[z,R,t,f,{wabh,wafh},{wabv,wafv}]/m[1,R,t,f,{wabh,wafh},{wabv,wafv}] 
]

x MOI

xMOIwedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  =  If[usepreintegrated,
(1/24) rho t (-f ((f^2)-6 (R^2)) (Sqrt[-(f^2)+4 (R^2)])+24 (R^4) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))]),
rho wedgeintegrate[y^2+z^2,R,t,f,{wabh,wafh},{wabv,wafv}]
]

y MOI

yMOIwedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  =  If[usepreintegrated,
(1/96) f rho t ((Sqrt[-(f^2)+4 (R^2)]) (4 (t^2)+(f^2) (2-3 (wabh^2)+(wabv^2)-3 (wafh^2)+(wafv^2))+6 (R^2) (2+(wabh^2)+(wabv^2)+(wafh^2)+(wafv^2)))+((8 (R^2) (2 (t^2)+3 (R^2) (2+(wabh^2)+(wabv^2)+(wafh^2)+(wafv^2))) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))])/f)),
rho wedgeintegrate[x^2+z^2,R,t,f,{wabh,wafh},{wabv,wafv}]
]

z MOI

zMOIwedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  =  If[usepreintegrated,
(1/96) f rho t ((Sqrt[-(f^2)+4 (R^2)]) (4 (t^2)+(f^2) (-6-3 (wabh^2)+(wabv^2)-3 (wafh^2)+(wafv^2))+6 (R^2) (2+(wabh^2)+(wabv^2)+(wafh^2)+(wafv^2)))+((8 (R^2) (2 (t^2)+3 (R^2) (2+(wabh^2)+(wabv^2)+(wafh^2)+(wafv^2))) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))])/f)),
rho wedgeintegrate[x^2+y^2,R,t,f,{wabh,wafh},{wabv,wafv}]
]

xy MOI

xyMOIwedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  =  If[usepreintegrated,
-(1/32) rho t (wabh+wafh) (f ((f^2)-2 (R^2)) (Sqrt[-(f^2)+4 (R^2)])-8 (R^4) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))]),
rho wedgeintegrate[x y,R,t,f,{wabh,wafh},{wabv,wafv}]
]

yz MOI

yzMOIwedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  =  If[usepreintegrated,
0,
rho wedgeintegrate[y z,R,t,f,{wabh,wafh},{wabv,wafv}]
]

zx MOI

zxMOIwedge[rho_,R_,t_,f_,{wabh_,wafh_},{wabv_,wafv_}]  =  If[usepreintegrated,
(1/96) rho t (wabv+wafv) (f (Sqrt[-(f^2)+4 (R^2)]) ((f^2)+6 (R^2))+24 (R^4) ArcCot[(f/(Sqrt[-(f^2)+4 (R^2)]))]),
rho wedgeintegrate[x z,R,t,f,{wabh,wafh},{wabv,wafv}]
]

End of Mathematica package formalities

End[];
EndPackage[ ];
Null