Commit 1364887b authored by Jameson Graef Rollins's avatar Jameson Graef Rollins

Suspension.FiberType as string

Improves readbility.  use translation for MATLAB purposes.
parent 12ff2916
......@@ -5,6 +5,7 @@ import numpy as np
import logging
from . import const
from . import suspension
from .struct import Struct
##################################################
......@@ -113,6 +114,7 @@ def ifo_matlab_transform(ifo):
* add "Constants" sub-Struct
* copy Temp to Constants
* change Suspension.FiberType string into number
"""
# add constants
......@@ -121,6 +123,9 @@ def ifo_matlab_transform(ifo):
# copy tempurature into Constants
ifo.Constants.Temp = ifo.Infrastructure.Temp
# translate FiberType string to int
ifo.Suspension.FiberType = suspension.FIBER_TYPES.index(ifo.Suspension.FiberType)
return ifo
......
......@@ -66,8 +66,7 @@ Seismic:
Suspension:
Type: 'Quad'
# 0: round, 1: ribbons, 2: tapered
FiberType: 2
FiberType: 'Round'
BreakStress: 750e6 # Pa; ref. K. Strain
Temp: 290
......
......@@ -86,7 +86,7 @@ Suspension:
- 123.0
VHCoupling:
theta: 1e-3 # vertical-horizontal x-coupling
FiberType: 1 # 0 = round, 1 = ribbons
FiberType: 'Ribbon'
# For Ribbon suspension
Ribbon:
Thickness: 115e-6 # m
......
......@@ -66,8 +66,7 @@ Seismic:
Suspension:
Type: 'Quad'
# 0: round, 1: ribbons
FiberType: 0
FiberType: 'Round'
BreakStress: 750e6 # Pa; ref. K. Strain
Temp: 290
VHCoupling:
......
......@@ -6,6 +6,13 @@ import scipy.constants
from .struct import Struct
# supported fiber geometries
FIBER_TYPES = [
'Round',
'Ribbon',
]
def construct_eom_matrix(k, m, f):
"""construct matrix for equations of motion.
......@@ -169,14 +176,14 @@ def suspQuad(f, ifo, material='Silica'):
N3 = ifo.Suspension.Stage[1].NWires # Number of wires in stage 1
N4 = ifo.Suspension.Stage[0].NWires # Number of wires in stage 1
if ifo.Suspension.FiberType == 0: # Round
if ifo.Suspension.FiberType == 'Round':
r_fib = ifo.Suspension.Fiber.Radius
xsect = pi * r_fib**2 # cross-sectional area
II4 = r_fib**4 * pi/4 # x-sectional moment of inertia
mu_v = 2 / r_fib # mu/(V/S), vertical motion
mu_h = 4 / r_fib # mu/(V/S), horizontal motion
tau_si = 7.372e-2 * rho * C * (4*xsect/pi) / K # TE time constant
elif ifo.Suspension.FiberType == 1: # Ribbon
elif ifo.Suspension.FiberType == 'Ribbon':
W = ifo.Suspension.Ribbon.Width
t = ifo.Suspension.Ribbon.Thickness
xsect = W * t
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment