Exemplo n.º 1
0
def main(DesPrms, DesVars):  #\
    """Function to Instantiate a JacketSE Assembly with Assigned Design Parameters:
       INPUTS
             DesVars: Class (structure) containing: batter,Dpile,tpile,Lp,Dleg,tleg,Dbrc,tbrc,Dbrc_mud,tbrc_mud,Dgir,tgir,Db,DTRb,Dt,DTRt,Htwr2frac. See JacketOpt_Peregrine.py.
             DesPrms: Class (structure) containing: dck_botz,wdepth,wlevel,Tp50,HW50,HH,U50HH,RNA_F,RNAins, TPlumpmass. See JacketOpt_Peregrine.py.
        """

    #wdepth=wdepth,wlevel=wlevel,): #we call this module with the main optimization parameters

    #______________________________________________#

    # NON-OPTIMIZATION VARIABLES #
    #______________________________________________#

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins = JcktGeoInputs()
    Jcktins.nlegs = 4
    Jcktins.nbays = DesPrms.nbays
    Jcktins.batter = DesVars.batter
    Jcktins.dck_width = DesVars.dck_widthfact * DesVars.Db
    Jcktins.dck_botz = DesPrms.dck_botz
    Jcktins.weld2D = 0.5
    Jcktins.VPFlag = True  #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped = False  #False    #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.

    #The following is a passthrough variables
    legbot_stmphin = 1.5  #Distance from bottom of leg to second joint along z; must be>0

    #______________________________________________#
    #Soil inputs
    Soilinputs = SoilGeoInputs()  ###----ALL USER INPUT----###
    Soilinputs.zbots = -np.array([3., 5., 7., 15., 30., 50.])
    Soilinputs.gammas = np.array(
        [10000., 10000., 10000., 10000., 10000., 10000.])
    Soilinputs.cus = np.array([60000., 60000., 60000., 60000., 60000., 60000.])
    Soilinputs.phis = np.array(
        [36., 33., 26., 37., 35., 37.5]
    )  #np.array([26.,26.,26.,26.,26.,26])#np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta = 25.
    Soilinputs.sndflg = True
    Soilinputs.SoilSF = 1.25  #Safety factor for Lp and stiffness from soil
    Soilinputs.PenderSwtch = False  #True

    #______________________________________________#
    #Water and wind inputs
    Waterinputs = WaterInputs()  ###----ALL USER INPUT----###
    Waterinputs.wdepth = DesPrms.wdepth
    Waterinputs.wlevel = DesPrms.wdepth  #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T = DesPrms.Tp50  #Wave Period
    Waterinputs.HW = DesPrms.HW50  #Wave Height: peak-to-peak for Andrew's load routine, 0.5*peak-to-peak for mine in case I activate.
    Waterinputs.Cd = 3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm = 8.  #2.  #ADded mass Coefficient

    Windinputs = WindInputs()
    Windinputs.HH = DesPrms.HH  #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH = DesPrms.U50HH  #20.  # Since we are assuming operational conditions, pick a wind speed near rated
    Windinputs.Cdj = 4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt = 2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#
    #RNA loads              Fx-z,         Mxx-zz
    RNA_F = DesPrms.RNA_F  #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)

    #Torque at rated with 95% efficiency generator: +12564863.93   Nm

    #______________________________________________#
    #RNA Properties
    RNAins = RNAprops()  ###----ALL USER INPUT----###
    RNAins.mass = DesPrms.RNAins.mass
    RNAins.Ixx = DesPrms.RNAins.Ixx  #249.667E+6           #
    RNAins.Iyy = DesPrms.RNAins.Iyy  #169.667E+6         #
    RNAins.Izz = DesPrms.RNAins.Izz  #162.200E+6          #
    RNAins.CMzoff = DesPrms.RNAins.CMzoff
    RNAins.CMxoff = DesPrms.RNAins.CMxoff  #positive means downwind  -4.95#
    RNAins.Thzoff = DesPrms.RNAins.Thzoff  #From UHreact Excel

    RNAins.yawangle = 45.
    TwrRigidTop = True  #False       #False=Account for RNA via math rather than a physical rigidmember

    #______________________________________________#
    #TP mass data
    TPlumpinputs = TPlumpMass()  ###----ALL USER INPUT----###
    TPlumpinputs.mass = DesPrms.TPlumpmass  #0. #200.e3 #[kg]
    #______________________________________________#
    ###----ALL USER INPUT----###
    # Frame3DD parameters
    FrameAuxIns = Frame3DDaux()
    FrameAuxIns.sh_fg = 1  #shear flag-->Timoshenko
    FrameAuxIns.deltaz = 5.
    FrameAuxIns.geo_fg = 0
    FrameAuxIns.nModes = 6  # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1  # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0  # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9  # mode shape tolerance
    FrameAuxIns.shift = 0.0  # shift value ... for unrestrained structures
    FrameAuxIns.gvector = np.array([0., 0., 9.8065])  #GRAVITY

    #______________________________________________#

    # OPTIMIZATION VARIABLES #
    #Note: materials are fixed
    #______________________________________________#

    #Legs Data
    legmatin = MatInputs()
    legmatin.matname = ([
        'heavysteel', 'heavysteel', 'heavysteel', 'heavysteel'
    ])
    Dleg = np.asarray([DesVars.Dleg]).repeat(
        Jcktins.nbays + 1)  #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg = np.asarray([DesVars.tleg]).repeat(Jcktins.nbays + 1)

    leginputs = LegGeoInputs()
    leginputs.legZbot = 0.0  ###----USER INPUT----###
    leginputs.ndiv = DesPrms.legndiv  ###----USER INPUT----###
    leginputs.legmatins = legmatin
    leginputs.Dleg = Dleg
    leginputs.tleg = tleg

    #Xbrc data
    Xbrcmatin = MatInputs()
    Xbrcmatin.matname = np.array(['heavysteel']).repeat(Jcktins.nbays)
    Dbrc = np.asarray([DesVars.Dbrc
                       ]).repeat(Jcktins.nbays)  #np.array([1.,1.,0.8,0.8])
    tbrc = np.asarray([DesVars.tbrc]).repeat(Jcktins.nbays)

    Xbrcinputs = XBrcGeoInputs()
    Xbrcinputs.Dbrc = Dbrc
    Xbrcinputs.tbrc = tbrc
    Xbrcinputs.ndiv = 1  ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins = Xbrcmatin
    Xbrcinputs.precalc = False  #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten

    #Mbrc data
    Mbrcmatin = MatInputs()
    Mbrcmatin.matname = np.array(['heavysteel'])

    Mbrcinputs = MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud = DesVars.Dbrc_mud
    Mbrcinputs.tbrc_mud = DesVars.tbrc_mud
    Mbrcinputs.ndiv = 2  ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins = Mbrcmatin
    Mbrcinputs.precalc = False  #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten

    #Hbrc data
    Hbrcmatin = MatInputs()
    Hbrcmatin.matname = np.array(['heavysteel'])
    Dbrc_hbrc = 1.1  ###----USER INPUT----###

    Hbrcinputs = HBrcGeoInputs()
    Hbrcinputs.Dbrch = Dbrc_hbrc  ###----USER INPUT----###
    Hbrcinputs.ndiv = 0  #2
    Hbrcinputs.Hbrcmatins = Hbrcmatin
    Hbrcinputs.precalc = True  #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten

    #TP data
    TPstrtmatin = MatInputs()
    TPstmpsmatin = MatInputs()
    TPgirdmatin = MatInputs()
    TPbrcmatin = MatInputs()
    TPstemmatin = MatInputs()
    TPstmpsmatin.matname = np.array(['heavysteel'])
    TPbrcmatin.matname = np.array(['heavysteel'])
    TPgirdmatin.matname = np.array(['heavysteel'])
    TPstemmatin.matname = np.array(['heavysteel'
                                    ]).repeat(2)  ###----ALL USER INPUT----###

    TPinputs = TPGeoInputs()
    TPinputs.TPstrtmatins = TPstrtmatin
    TPinputs.TPbrcmatins = TPbrcmatin
    TPinputs.TPstemmatins = TPstemmatin
    TPinputs.TPstmpmatins = TPstmpsmatin
    TPinputs.TPgirdmatins = TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut = DesVars.Dleg  ###----ALL USER INPUT----###
    TPinputs.tstrut = DesVars.Dleg
    TPinputs.Dgir = DesVars.Dgir
    TPinputs.tgir = DesVars.tgir
    TPinputs.Dbrc = TPinputs.Dgir
    TPinputs.tbrc = TPinputs.tgir
    ###----ALL USER INPUT----###
    TPinputs.hstump = 0.0  #1.0
    TPinputs.stumpndiv = 1
    TPinputs.brcndiv = 1
    TPinputs.girndiv = 1
    TPinputs.strutndiv = 1
    TPinputs.stemndiv = 1
    TPinputs.nstems = 3
    TPinputs.Dstem = np.array([DesVars.Db]).repeat(TPinputs.nstems)
    TPinputs.tstem = 1.5 * np.array([DesVars.Db / DesVars.DTRb]).repeat(
        TPinputs.nstems)
    TPinputs.hstem = np.array([6. / TPinputs.nstems]).repeat(TPinputs.nstems)

    #Pile data
    Pilematin = MatInputs()
    Pilematin.matname = np.array(['heavysteel'])

    Pileinputs = PileGeoInputs()
    Pileinputs.Pilematins = Pilematin
    Pileinputs.ndiv = 0  #3			   ###----USER INPUT----###
    Pileinputs.Dpile = DesVars.Dpile
    Pileinputs.tpile = DesVars.tpile
    Pileinputs.AFflag = False  ###----USER INPUT----###
    Pileinputs.Lp = DesVars.Lp  #[m] Embedment length

    #Tower data
    Twrmatin = MatInputs()
    Twrmatin.matname = np.array(['heavysteel'])

    Twrinputs = TwrGeoInputs()
    Twrinputs.Twrmatins = Twrmatin
    #Twrinputs.Htwr=0.  #Trumped by HH
    Twrinputs.Htwr2frac = DesVars.Htwr2frac  #fraction of tower height with constant x-section
    Twrinputs.ndiv = np.array([
        6, 12
    ])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax = 6.  #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db = DesVars.Db
    Twrinputs.DTRb = DesVars.DTRb
    Twrinputs.Dt = DesVars.Dt
    Twrinputs.DTRt = DesVars.DTRt

    # Now Launch the assembly and pass all of the inputs

    myjckt = set_as_top(JacketAsmly())

    myjckt.JcktGeoIn = Jcktins

    myjckt.Soilinputs = Soilinputs
    myjckt.Waterinputs = Waterinputs
    myjckt.Windinputs = Windinputs

    myjckt.RNAinputs = RNAins
    myjckt.TwrRigidTop = TwrRigidTop  #Account for RNA via math rather than a physical rigidmember
    myjckt.RNA_F = RNA_F

    myjckt.leginputs = leginputs
    #The following is a passthrough variables
    myjckt.legbot_stmphin = legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0

    myjckt.Xbrcinputs = Xbrcinputs
    myjckt.Mbrcinputs = Mbrcinputs

    myjckt.Hbrcinputs = Hbrcinputs
    myjckt.TPlumpinputs = TPlumpinputs

    myjckt.PrebuildTP = True  ###----USER INPUT----###
    myjckt.PreBuildTPLvl = 5  ###----USER INPUT----###

    myjckt.TPinputs = TPinputs
    myjckt.Pileinputs = Pileinputs
    myjckt.Twrinputs = Twrinputs
    myjckt.FrameAuxIns = FrameAuxIns

    return myjckt
Exemplo n.º 2
0
def main():  #\
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_PyOPT for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_PyOPT.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins = JcktGeoInputs()

    Jcktins.nlegs = 4
    Jcktins.nbays = 4
    Jcktins.batter = 30.5495  #=(-43.127+24.614)/(5.939-5.333)
    #Jcktins.dck_botz =15.651
    Jcktins.dck_botz = 16.15  #CJBe
    Jcktins.dck_width = 8. + 1.2
    Jcktins.weld2D = 0.
    Jcktins.VPFlag = True  #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped = True  #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  #whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 0  #if >0, the TP is prebuilt according to rules per PreBuildTP

    #______________________________________________#

    #Soil inputs
    Soilinputs = SoilGeoInputs()
    Soilinputs.zbots = -np.array([3., 5., 7., 15., 30., 50.])
    Soilinputs.gammas = np.array(
        [10000., 10000., 10000., 10000., 10000., 10000.])
    Soilinputs.cus = np.array([60000., 60000., 60000., 60000., 60000., 60000.])
    Soilinputs.phis = np.array(
        [26., 26., 26., 26., 26., 26]
    )  #np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta = 25.
    Soilinputs.sndflg = True
    Soilinputs.PenderSwtch = False  #True
    Soilinputs.SoilSF = 1.
    #______________________________________________#

    #Water and wind inputs
    Waterinputs = WaterInputs()

    Waterinputs.wdepth = 50.
    Waterinputs.wlevel = 50.  #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T = 12.  #Wave Period
    Waterinputs.HW = 10.  #Wave Height
    Waterinputs.Cd = 3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm = 8.  #2.  #ADded mass Coefficient

    Windinputs = WindInputs()
    Windinputs.HH = 88.15 + 2.4  #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH = 30.  #assumed gust speed
    Windinputs.Cdj = 4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt = 2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#

    #Pile data
    Pilematin = MatInputs()
    Pilematin.matname = np.array(['steel'
                                  ])  #CJB Changed this from RC into steel
    Pilematin.E = np.array([2.1e11])
    Pilematin.G = np.array([8.07690e+10])
    Pilematin.rho = np.array(
        [3339.12]
    ) * 34274.82 / 36876.  #From Test04.txt in SD, to check with official FAST certtest

    Pileinputs = PileGeoInputs()
    Pileinputs.Pilematins = Pilematin
    Pileinputs.ndiv = 0  #CJB Change this from 1 to 0 #3			   ###----USER INPUT----###
    Pileinputs.Dpile = 2.082
    Pileinputs.tpile = 0.491
    Pileinputs.Lp = 0.  #[m] Embedment length
    #______________________________________________#

    #Legs data
    legmatin = MatInputs()
    legmatin.matname = (['steel'])
    legmatin.rho = np.array([7850.])
    Dleg = np.asarray([1.2]).repeat(Jcktins.nbays +
                                    1)  #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg = np.asarray([0.05, 0.05, 0.035, 0.035, 0.035])

    leginputs = LegGeoInputs()
    leginputs.legZbot = 4.5  ###----USER INPUT----###
    leginputs.ndiv = 1  ###----USER INPUT----###
    leginputs.legmatins = legmatin
    leginputs.Dleg = Dleg
    leginputs.tleg = tleg

    #The following is a passthrough variables
    legbot_stmphin = (
        45.5 - 43.127
    )  #=2.373 Distance from bottom of leg to second joint along z; must be>0
    #______________________________________________#

    #Xbrc data
    Xbrcmatin = MatInputs()
    Xbrcmatin.matname = np.array(['steel']).repeat(Jcktins.nbays)
    Xbrcmatin.rho = np.array([7850.])

    Dbrc = np.asarray([0.8]).repeat(Jcktins.nbays)
    tbrc = np.asarray([0.02]).repeat(Jcktins.nbays)

    Xbrcinputs = XBrcGeoInputs()
    Xbrcinputs.Dbrc = Dbrc
    Xbrcinputs.tbrc = tbrc
    Xbrcinputs.ndiv = 1  ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins = Xbrcmatin
    Xbrcinputs.precalc = False  #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    #______________________________________________#

    #Mbrc data
    Mbrcmatin = MatInputs()
    Mbrcmatin.matname = np.array(['steel'])
    Mbrcmatin.rho = np.array([7850.])

    Mbrcinputs = MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud = 0.8  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud = 0.02
    Mbrcinputs.ndiv = 2  ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins = Mbrcmatin
    Mbrcinputs.precalc = False  #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    #______________________________________________#

    #Hbrc data
    Hbrcmatin = MatInputs()
    Hbrcmatin.matname = np.array(['steel'])
    Hbrcmatin.rho = np.array([7850.])
    Dbrc_hbrc = 1.1  ###----USER INPUT----###

    Hbrcinputs = HBrcGeoInputs()
    Hbrcinputs.Dbrch = Dbrc_hbrc  ###----USER INPUT----###
    Hbrcinputs.ndiv = 0
    Hbrcinputs.Hbrcmatins = Hbrcmatin
    Hbrcinputs.precalc = True  #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    #______________________________________________#

    #TP data

    #Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    #TP lumped mass data
    TPlumpinputs = TPlumpMass()  ###----ALL USER INPUT----###
    TPlumpinputs.mass = 666.e3  #-98385.33+( 7850.*4*np.pi/4.*(1.2**2-(1.2-2.*0.04)**2)*4)  #[kg]  TO MODIFY AFTER WE ASSESS OVERALL TP MASS, to be reduced for the steel weight
    TPlumpinputs.CMoff = np.array([
        0., 0., 2.
    ])  #CG of concrete block is 2 m above intersection of diagonal braces
    TPlumpinputs.I = 1. / 12 * TPlumpinputs.mass * np.array(
        [8.**2 + 4.**2, 8.**2 + 4.**2, 8.**2 + 8.**2, 0., 0., 0.])

    TPstrtmatin = MatInputs()
    TPstmpsmatin = MatInputs()
    TPgirdmatin = MatInputs()
    TPbrcmatin = MatInputs()
    TPstemmatin = MatInputs()
    TPstmpsmatin.matname = np.array(['steel'])
    TPstmpsmatin.rho = np.array([7850.])

    TPstrtmatin.matname = np.array(['steel'])
    TPstrtmatin.rho = np.array([1350.])
    TPbrcmatin.matname = np.array(['steel'])
    TPbrcmatin.rho = np.array(
        [1350.]
    )  #np.array([7850.]) tpstrucmass=np.pi/4*(1.2**2-(1.2-2*0.04)**2)*7850*4*4 7850.*tpstrucmass/myjckt.TP.TPouts.mass=1462.185
    TPgirdmatin.matname = np.array(['steel'])
    TPgirdmatin.rho = np.array([1350.])
    TPstemmatin.matname = np.array(['steel'
                                    ]).repeat(2)  ###----ALL USER INPUT----###
    TPstemmatin.rho = np.array([1350.])

    TPinputs = TPGeoInputs()
    TPinputs.TPstrtmatins = TPstrtmatin
    TPinputs.TPbrcmatins = TPbrcmatin
    TPinputs.TPstemmatins = TPstemmatin
    TPinputs.TPstmpmatins = TPstmpsmatin
    TPinputs.TPgirdmatins = TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut = 1.2  ###----ALL USER INPUT----###
    TPinputs.tstrut = 0.04
    TPinputs.Dgir = TPinputs.Dstrut
    TPinputs.tgir = TPinputs.tstrut
    TPinputs.Dbrc = TPinputs.Dstrut
    TPinputs.tbrc = TPinputs.tstrut
    ###----ALL USER INPUT----###
    TPinputs.hstump = 0.499  #(16.15-15.651)
    TPinputs.Dstump = 1.2
    TPinputs.tstump = 0.04

    TPinputs.stumpndiv = 1
    TPinputs.brcndiv = 1
    TPinputs.girndiv = 1
    TPinputs.strutndiv = 1
    TPinputs.stemndiv = 1
    TPinputs.nstems = 3
    TPinputs.Dstem = np.array([5.6]).repeat(TPinputs.nstems)
    TPinputs.tstem = np.array([0.032, 0.032, 0.032])
    TPinputs.hstem = np.array([(4.) / TPinputs.nstems]).repeat(TPinputs.nstems)
    #______________________________________________#

    #Tower data
    Twrmatin = MatInputs()
    Twrmatin.matname = np.array(['steel'])
    Twrmatin.rho = np.array([7850.])

    Twrinputs = TwrGeoInputs()
    Twrinputs.Twrmatins = Twrmatin
    #Twrinputs.Htwr=88.15  #Trumped by HH
    Twrinputs.Htwr2frac = 1. / 88.15  #fraction of tower height with constant x-section
    Twrinputs.ndiv = np.array([
        1, 1
    ])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax = 5.  #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db = 5.6
    Twrinputs.DTRb = Twrinputs.Db / 0.032
    Twrinputs.Dt = 4.
    Twrinputs.DTRt = Twrinputs.Dt / 0.03
    #Set whether or not DTRb and DTRt for the tower are the same. Note if next set to False it will trump DTRt setting above
    Twrinputs.DTRsdiff = True  ##SET THIS TO TRUE IF YOU WANT DTRs to be different between base and top

    #If you use the following 12 lines, The geometry defined above is ignored
    ztwr = np.array([
        20.15, 21.15, 32.15, 42.15, 54.15, 64.15, 74.15, 83.15, 88.15
    ]) - 20.15
    Dtwr = np.array([5.6, 5.577, 5.318, 5.082, 4.8, 4.565, 4.329, 4.118, 4])
    ttwr = np.array(
        [0.032, 0.032, 0.03, 0.028, 0.024, 0.022, 0.02, 0.03, 0.03])
    pmtwr = np.array(
        [np.array([20.15, 54.15, 88.15]) - 20.15,
         [1.9e3, 1.4e3, 1.0e3]]).T  #(3,2) first col z's, second weights
    #Interpolate data to refine tower discretization
    dz = 1.  #[m] maximum deltaz allowed in discretization
    ztwr2 = np.linspace(ztwr[0], ztwr[-1], round(
        (ztwr[-1] - ztwr[0]) / dz))  #New discretization
    Dtwr_interp = interp1d(ztwr, Dtwr)
    ttwr_interp = interp1d(ztwr, ttwr)
    Twrinputs.ztwr = ztwr2
    Twrinputs.Dtwr = Dtwr_interp(ztwr2)
    Twrinputs.ttwr = ttwr_interp(ztwr2)
    Twrinputs.TwrlumpedMass = np.zeros([pmtwr.shape[0], 11])
    Twrinputs.TwrlumpedMass[:, 0:2] = pmtwr

    TwrRigidTop = False  #False=Account for RNA via math rather than a physical rigidmember
    #______________________________________________#

    #RNA data
    RNAins = RNAprops()
    RNAins.mass = 350.e3  #[kg]
    RNAins.I[0] = 86.579E+6  #[kg m2]
    RNAins.I[1] = 53.530E+6  #[kg m2]
    RNAins.I[2] = 58.112E+6  #[kg m2]
    RNAins.CMoff[2] = 2.34  #[m]
    RNAins.Thoff[2] = 2.4  #[m]
    RNAins.yawangle = 45.  #angle with respect to global X, CCW looking from above, wind from left
    RNAins.rna_weightM = True
    #______________________________________________#

    #RNA loads              Fx-z,         Mxx-zz
    RNA_F = np.array(
        [1000.e3, 0., 0., 0., 0., 0.]
    )  #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)
    #______________________________________________#

    # Frame3DD parameters           									      ###----ALL USER INPUT----###
    FrameAuxIns = Frame3DDaux()
    FrameAuxIns.sh_fg = 1  #shear flag-->Timoshenko
    FrameAuxIns.deltaz = 5.
    FrameAuxIns.geo_fg = 0
    FrameAuxIns.nModes = 6  # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1  # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0  # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9  # mode shape tolerance
    FrameAuxIns.shift = 0.0  # shift value ... for unrestrained structures
    FrameAuxIns.gvector = np.array([0., 0., -9.8065])  #GRAVITY

    #Decide whether or not to consider DLC 6.1 as well
    twodlcs = False

    #______________________________________________#
    #______________________________________________#

    # OTHER AUXILIARY CONSTRAINTS AND TARGETS FOR OPTIMIZATION #
    #______________________________________________#
    #______________________________________________#

    #Set Optimization Bounds and guesses for the various variables:
    #          x=  [ batter,  Dpile,    tpile,        Lp,   Dleg,     tleg,       Dbrc,   tbrc,     Dbrc_mud,   tbrc_mud,   Dgit,      tgir,      Db,   DTRb   Dt,   DTRt   Htwr2fac        dck_widthfact]
    MnCnst = np.array([
        8., 1., 1. * 0.0254, 20., 1., 1. * 0.0254, 1., 1. * 0.0254, 1.,
        1. * 0.0254, 1., 1. * 0.0254, 5., 120., 3., 120., 0.05, 2.
    ])
    MxCnst = np.array([
        15., 2.5, 5. * 0.0254, 50., 2.5, 5. * 0.0254, 2., 5. * 0.0254, 2.,
        5. * 0.0254, 2., 5. * 0.0254, 7., 200., 4., 200., 0.25, 3.
    ])
    guesses = np.array([
        10., 1.5, 1.5 * 0.0254, 26., 1.8, 1.5 * 0.0254, 1.2, 1.5 * 0.0254, 1.2,
        1.5 * 0.0254, 1.2, 1.5 * 0.0254, 6., 140., 3.5, 150., 0.2, 2.
    ])

    #SET Maximum Footprint [m]
    mxftprint = 30.

    #Set target frequency [Hz] and f0epsilon, i.e. fmax=(1+f0eps)*f0
    f0 = 0.22
    f0epsilon = 0.1

    #Set the minminimum DTR allowed for jacket members; mostly for 60+waterdepths
    jcktDTRmin = 22.

    #_____________________________________________________________#
    #________________ DO NOT MODIFY THE FOLLOWING ________________#
    #_____________________________________________________________#

    bounds = np.vstack((MnCnst, MxCnst))
    desvarmeans = np.mean(bounds, 1)

    # Now Launch the assembly and pass all of the inputs
    #myjckt=set_as_top(JacketSE(Jcktins.clamped,Jcktins.AFflag,twodlcs=twodlcs, wlevel_Ulist=29))#CJB and JQ
    myjckt = set_as_top(
        JacketSE(Jcktins.clamped, Jcktins.AFflag, twodlcs=twodlcs))
    #pySubDyn Parameters CJB+
    #SDpySubDynA = pySubDynA()

    #INPUTS TO RUN SUBDYN-------------------------------------------------------
    #(PATH INFORMATION FOR INPUT FILE AND DRIVER)

    Base_name = "OC4_pySubDyn"  #Input name here

    #INPUT FILE PATH
    myjckt.InputFile_name = str(Base_name) + ".txt"
    #myjckt.SDpySubDynA.InputFile_name=str(Base_name)+".txt"
    myjckt.InputandDriverpath = "C:\wisdem\plugins\JacketSE\src\jacketse\SubDyn\CertTest"
    myjckt.InputFile_path = myjckt.InputandDriverpath + os.sep + str(
        myjckt.InputFile_name)

    #DRIVER PATH
    myjckt.Driver_name = str(Base_name) + "D" + ".txt"
    myjckt.Driver_path = myjckt.InputandDriverpath + os.sep + str(
        myjckt.Driver_name)
    myjckt.Driver_path = myjckt.InputandDriverpath + os.sep + str(
        myjckt.Driver_name)

    #PATH TO RUN SUBDYN
    SDEXEpath = "C:\wisdem\plugins\JacketSE\src\jacketse\SubDyn" + os.sep + "bin\SubDyn_Win32.exe"
    myjckt.SDpath = str(SDEXEpath) + ' ' + str(myjckt.Driver_path)
    #test.SDpath='r'+"'''"+test.SDEXEpath+' '+test.SDDriverpath+"'''"

    #PATH TO READ OUTPUT (INPUTS TO READ OUTPUT)
    myjckt.Readpath_out = str(
        myjckt.InputandDriverpath) + os.sep + str(Base_name) + ".SD.out"
    myjckt.Readpath_sum = str(
        myjckt.InputandDriverpath) + os.sep + str(Base_name) + ".SD.sum"
    myjckt.Delete_file = False  #Deletes driver, input, and output files. Does not delete Echo file.

    #INPUT FILE INPUTS----------------------------------------------------------

    #Simulation Control
    myjckt.Echo = np.array(
        [False, "Echo", "- Echo input data to "
         "<rootname>.SD.ech"
         " (flag)"])
    myjckt.SDdeltaT = np.array([
        "DEFAULT", "SDdeltaT", "- Local Integration Step. If "
        "default"
        ", the glue-code integration step will be used."
    ])
    myjckt.IntMethod = np.array(
        [4, "IntMethod", "- Integration Method [1/2/3/4 = RK4/AB4/ABM4/AM2]."])
    myjckt.SttcSolve = np.array([
        False, "SttcSolve", "- Solve dynamics about static equilibrium point"
    ])

    #FEA and CRAIG-BAMPTON PARAMETERS
    myjckt.FEMmod = np.array([
        3,
        "- FEM switch: element model in the FEM. [1= Euler-Bernoulli(E-B);  2=Tapered E-B (unavailable);  3= 2-node Timoshenko;  4= 2-node tapered Timoshenko (unavailable)]"
    ])
    myjckt.NDiv = np.array(
        [1, "NDiv", "- Number of sub-elements per member"]
    )  #CJB "HARDWIRED" INTO PYSUBDYN AS 1 TO ALLOW JACKETSE'S NODES TO BE USED AS SUBDYN'S JOINTS
    myjckt.CBMod = np.array([
        False,
        "- [T/F] If True perform C-B reduction, else full FEM dofs will be retained. If True, select Nmodes to retain in C-B reduced system."
    ])
    myjckt.Nmodes = np.array([
        75,
        "- Number of internal modes to retain (ignored if CBMod=False). If Nmodes=0 --> Guyan Reduction."
    ])
    myjckt.JDampings = np.array([
        2, "JDampings",
        "- Damping Ratios for each retained mode (% of critical) If Nmodes>0, list Nmodes structural damping ratios for each retained mode (% of critical), or a single damping ratio to be applied to all retained modes. (last entered value will be used for all remaining modes)."
    ])

    #Structure Joints
    myjckt.SDjointsHeader = np.array([[
        'JointID', 'JointXss', 'JointYss', 'JointZss',
        '[Coordinates of Member joints in SS-Coordinate System]'
    ], ['(-)', '(m)', '(m)', '(m)']])

    #Base Reaction Joints
    myjckt.BaseRxnJointsHeader = np.array([[
        'RJointID', 'RctTDXss', 'RctTDYss', 'RctTDZss', 'RctRDXss', 'RctRDYss',
        'RctRDZss', '[Global Coordinate System]'
    ], ['(-)', ('flag'), ('flag'), ('flag'), ('flag'), ('flag'), ('flag')]])

    #Interface Joints
    myjckt.InterfaceRxnJointsHeader = np.array([[
        'IJointID', 'ItfTDXss', 'ItfTDYss', 'ItfTDZss', 'ItfRDXss', 'ItfRDYss',
        'ItfRDZss', '[Global Coordinate System]'
    ], ['(-)', ('flag'), ('flag'), ('flag'), ('flag'), ('flag'), ('flag')]])

    #Members
    myjckt.MembersHeader = np.array([[
        'MemberID', 'MJointID1', 'MJointID2', 'MPropSetID1', 'MPropSetID2',
        'COSMID'
    ], ['(-)', '(-)', '(-)', '(-)', '(-)', '(-)']])

    #MEMBER X-SECTION PROPERTY data 1/2
    myjckt.NPropSets = np.array([
        6, 'NPropSets',
        '- # of structurally unique x-sections (i.e. # of X-sectional props utilized throughout all of the members)'
    ])
    myjckt.PropSet1Header = np.array(
        [['PropSetID', 'YoungE', 'ShearG', 'MatDens', 'XsecD', 'XsecT'],
         ['(-)', '(N/m2)', '(N/m2)', '(kg/m3)', '(m)', '(m)']])

    #MEMBER X-SECTION PROPERTY data 2/2
    myjckt.PropSet2 = np.array([])
    myjckt.PropSet2Header = np.array([[
        "PropSetID", "YoungE", "ShearG", "MatDens", "XsecA", "XsecAsx",
        "XsecAsy", "XsecJxx", "XsecJyy", "XsecJ0"
    ],
                                      [
                                          "(-)", "(N/m2)", "(N/m2)", "(kg/m3)",
                                          "(m2)", "(m2)", "(m2)", "(m4)",
                                          "(m4)", "(m4)"
                                      ]])

    #MEMBER COSINE MATRICES COSM(i,j)
    myjckt.COSMHeader = np.array([[
        "COSMID", "COSM11", "COSMID12", "COSMID13", "COSMID21", "COSMID22",
        "COSMID23", "COSMID31", "COSMID32", "COSMID33"
    ], ["(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)"]])
    myjckt.COSMs = np.array([])

    #JOINT ADDITIONAL CONCENTRATED MASSES
    myjckt.CmassHeader = np.array(
        [["CMJointID", "JMass", "JMXX", "JMYY", "JMZZ"],
         ["(-)", "(kg)", "(kg*m^2)", "(kg*m^2)", "(kg*m^2)"]])
    myjckt.Cmass = np.array([])

    #OUTPUT: SUMMARY & OUTFILE
    myjckt.SSSum = np.array([
        True, "SSSum",
        "- Output a Summary File (flag).It contains: matrices K,M  and C-B reduced M_BB, M-BM, K_BB, K_MM(OMG^2), PHI_R, PHI_L. It can also contain COSMs if requested."
    ])
    myjckt.OutCOSM = np.array([
        True, "OutCOSM",
        "- Output cosine matrices with the selected output member forces (flag)"
    ])
    myjckt.OutAll = np.array(
        [True, "OutAll", "- [T/F] Output all members' end forces "])
    myjckt.OutSwtch = np.array([
        1, "OutSwtch",
        "- [1/2/3] Output requested channels to: 1=<rootname>.SD.out;  2=<rootname>.out (generated by FAST);  3=both files."
    ])
    myjckt.TabDelim = np.array([
        True, "TabDelim",
        "- Generate a tab-delimited output in the <rootname>.SD.out file"
    ])
    myjckt.OutDec = np.array(
        [1, "OutDec", "- Decimation of output in the <rootname>.SD.out file"])
    myjckt.OutFmt = np.array([
        "Es11.4e2", "OutFmt",
        "- Output format for numerical results in the <rootname>.SD.out file"
    ])
    myjckt.OutSFmt = np.array([
        "A11", "OutFmt",
        "- Output format for header strings in the <rootname>.SD.out file"
    ])

    #MEMBER OUTPUT LIST
    myjckt.MemOutListHeader=np.array([['MemberID','NoutCnt','NodeCnt','[NOutCnt=how many nodes to get output for [< 10]; NodeCnt are local ordinal numbers from the start of the member, and must be >=1 and <= NDiv+1] If NMOutputs=0 leave blank as well.]'],\
                                           ['(-)','(-)','(-)']])

    #SSOutline
    myjckt.SSOutlist=np.array([["ReactFXss, ReactFYss, ReactFZss, ReactMXss, ReactMYss, ReactMZss",'-Base reactions (forces onto SS structure)'],\
                    ["IntfFXss,  IntfFYss,  IntfFZss,  IntfMXss, IntfMYss, IntfMZss",'-Interface reactions (forces from SS structure)'],\
                    ["IntfTDXss,  IntfTDYss,  IntfTDZss,  IntfRDXss, IntfRDYss, IntfRDZss",'-Interface deflections '],\
                    ["IntfTAXss,  IntfTAYss,  IntfTAZss,  IntfRAXss, IntfRAYss, IntfRAZss",'Interface accelerations']])

    myjckt.SDjoints=np.array([[1, -5.93900, -5.93900, -43.12700],\
                            [2, 5.93900, -5.93900, -43.12700],\
                            [3, 5.93900, 5.93900, -43.12700],\
                            [4, -5.93900, 5.93900, -43.12700],\
                            [5, -4.01600, -4.01600, 15.65100],\
                            [6, 4.01600, -4.01600, 15.65100],\
                            [7, 4.01600, 4.01600, 15.65100],\
                            [8, -4.01600, 4.01600, 15.65100],\
                            [9, 0.00000, -4.79180, -8.06090],\
                            [10, 4.79180, 0.00000, -8.06090],\
                            [11, 0.00000, 4.79180, -8.06090],\
                            [12, -4.79180, 0.00000, -8.06090]])

    myjckt.BaseRxnJoints=np.array([[1,1,1,1,1,1,1],\
                                 [2,1,1,1,1,1,1],\
                                 [3,1,1,1,1,1,1],\
                                 [4,1,1,1,1,1,1]])

    myjckt.InterfaceJointsFlags=np.array([[5,1,1,1,1,1,1],\
                                   [6,1,1,1,1,1,1],\
                                   [7,1,1,1,1,1,1],\
                                   [8,1,1,1,1,1,1]])

    myjckt.Members=np.array([[1, 1, 5, 2, 2],\
                            [2, 2, 6, 2, 2],\
                            [3, 3, 7, 2, 2],\
                            [4, 4, 8, 2, 2],\
                            [5, 1, 9, 3, 3],\
                            [6, 9, 6, 3, 3],\
                            [7, 5, 9, 3, 3],\
                            [8, 9, 2, 3, 3],\
                            [9, 2, 10, 3, 3],\
                            [10, 10, 7, 3, 3],\
                            [11, 6, 10, 3, 3],\
                            [12, 10, 3, 3, 3],\
                            [13, 3, 11, 3, 3],\
                            [14, 11, 8, 3, 3],\
                            [15, 7, 11, 3, 3],\
                            [16, 11, 4, 3, 3],\
                            [17, 4, 12, 3, 3],\
                            [18, 12, 5, 3, 3],\
                            [19, 8, 12, 3, 3],\
                            [20, 12, 1, 3, 3],\
                            [21, 5, 6, 3, 3],\
                            [22, 6, 7, 3, 3],\
                            [23, 7, 8, 3, 3],\
                            [24, 8, 5, 3, 3]])

    myjckt.MemOutList = np.array([[1, 2, 1, 2]])

    #DRIVER INPUTS--------------------------------------------------------------

    myjckt.EchoD = np.array(
        [True, "Echo", "- Echo the input file data (flag)"])

    #Environmental Conditions
    myjckt.Gravity = np.array([9.81, "Gravity", "- Gravity (m/s^2)"])
    myjckt.WtrDpth = np.array(
        [43.127, "WtrDpth", "- Water Depth (m) positive value"])

    #SubDyn
    myjckt.SDInputFile = np.array([myjckt.InputFile_path, "SDInputFile"])
    myjckt.OutRootName = np.array([
        str(myjckt.InputandDriverpath) + os.sep + str(Base_name), "OutRootName"
    ])
    myjckt.NSteps = np.array(
        [600, "NSteps", "- Number of time steps in the simulations (-)"])
    myjckt.TimeInterval = np.array(
        [0.005, "TimeInterval", "- TimeInterval for the simulation (sec)"])
    myjckt.TP_RefPoint = np.array([
        0.0, 0.0, 18.15, "TP_RefPoint",
        "- Location of the TP reference point in global coordinates (m)"
    ])
    myjckt.SubRotateZ = np.array([
        0.0, "SubRotateZ",
        "- Rotation angle of the structure geometry in degrees about the global Z axis."
    ])

    #INPUTS
    myjckt.InputsMod = np.array([
        1, "InputsMod",
        "- Inputs model {0: all inputs are zero for every timestep, 1: steadystate inputs, 2: read inputs from a file (InputsFile)} (switch)"
    ])
    myjckt.InputsFile = np.array(
        ['""', "InputsFile", "- Name of the inputs file if InputsMod = 2"])

    #STEADY INPUTS
    myjckt.uTPInSteady = np.array([
        0.1, 0.0, 0.0, 0.0, 0.0, 0.0, "uTPInSteady",
        "- input displacements and rotations ( m, rads )"
    ])
    myjckt.uDotTPInSteady = np.array([
        0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "uDotTPInSteady",
        "- input translational and rotational velocities ( m/s, rads/s)"
    ])
    myjckt.uDotDotTPInSteady = np.array([
        0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "uDotDotTPInSteady",
        "- input translational and rotational accelerations ( m/s^2, rads/s^2)"
    ])

    #myjckt.SDpySubDynA.run()
    myjckt.JcktGeoIn = Jcktins
    myjckt.Soilinputs = Soilinputs
    myjckt.Waterinputs = Waterinputs
    myjckt.Windinputs = Windinputs
    myjckt.Pileinputs = Pileinputs
    myjckt.leginputs = leginputs
    myjckt.legbot_stmphin = legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0
    myjckt.Xbrcinputs = Xbrcinputs
    myjckt.Mbrcinputs = Mbrcinputs
    myjckt.Hbrcinputs = Hbrcinputs
    myjckt.TPlumpinputs = TPlumpinputs
    myjckt.TPinputs = TPinputs

    myjckt.Twrinputs = Twrinputs
    myjckt.TwrRigidTop = TwrRigidTop  #Account for RNA via math rather than a physical rigidmember
    myjckt.RNAinputs = RNAins
    myjckt.RNA_F = RNA_F

    myjckt.FrameAuxIns = FrameAuxIns

    return myjckt, f0, f0epsilon, jcktDTRmin, mxftprint, guesses, bounds.T
Exemplo n.º 3
0
def main(): #\
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_PyOPT for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             DTRsdiff    -Boolean,     Set this to True if DTRs are to be different between base and top. \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_PyOPT.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins=JcktGeoInputs()

    Jcktins.nlegs =4
    Jcktins.nbays =4
    Jcktins.batter=30.5495 #=(-43.127+24.614)/(5.939-5.333)
    Jcktins.dck_botz =15.651
    Jcktins.dck_width= 8.+1.2
    Jcktins.weld2D   = 0.
    Jcktins.VPFlag = True    #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped= True    #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  #whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 0  #if >0, the TP is prebuilt according to rules per PreBuildTP

    #______________________________________________#

    #Soil inputs
    Soilinputs=SoilGeoInputs()
    Soilinputs.zbots   =-np.array([3.,5.,7.,15.,30.,50.])
    Soilinputs.gammas  =np.array([10000.,10000.,10000.,10000.,10000.,10000.])
    Soilinputs.cus     =np.array([60000.,60000.,60000.,60000.,60000.,60000.])
    Soilinputs.phis    =np.array([26.,26.,26.,26.,26.,26])#np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta   =25.
    Soilinputs.sndflg   =True
    Soilinputs.PenderSwtch   =False #True
    Soilinputs.SoilSF   =1.
    #______________________________________________#

    #Water and wind inputs
    Waterinputs=WaterInputs()
    Waterinputs.wdepth   =50.
    Waterinputs.wlevel   =50. #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T=12.  #Wave Period
    Waterinputs.HW=10. #Wave Height
    Waterinputs.Cd=3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm=8.#2.  #ADded mass Coefficient

    Windinputs=WindInputs()
    Windinputs.HH=88.15+2.4 #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH=30. #assumed gust speed
    Windinputs.Cdj=4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt=2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#

    #Pile data
    Pilematin=MatInputs()
    Pilematin.matname=np.array(['RC'])
    Pilematin.E=np.array([ 2.1e11])
    Pilematin.G=np.array([8.07690e+10])
    Pilematin.rho=np.array([3339.12]) *34274.82/36876.   #From Test04.txt in SD, to check with official FAST certtest

    Pileinputs=PileGeoInputs()
    Pileinputs.Pilematins=Pilematin
    Pileinputs.ndiv=1 #3			   ###----USER INPUT----###
    Pileinputs.Dpile=2.082
    Pileinputs.tpile=0.491
    Pileinputs.AFflag=False			   ###----USER INPUT----###
    Pileinputs.Lp=0. #[m] Embedment length
    #______________________________________________#

    #Legs data
    legmatin=MatInputs()
    legmatin.matname=(['steel'])
    legmatin.rho=np.array([7850.])
    Dleg=np.asarray([1.2]).repeat(Jcktins.nbays+1)                      #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg=np.asarray([0.05,0.05,0.035,0.035,0.035])

    leginputs=LegGeoInputs()
    leginputs.legZbot   = 4.5		 ###----USER INPUT----###
    leginputs.ndiv=1     			 ###----USER INPUT----###
    leginputs.legmatins=legmatin
    leginputs.Dleg=Dleg
    leginputs.tleg=tleg


    #The following is a passthrough variables
    legbot_stmphin =(45.5-43.127)  #=2.373 Distance from bottom of leg to second joint along z; must be>0
    #______________________________________________#

    #Xbrc data
    Xbrcmatin=MatInputs()
    Xbrcmatin.matname=np.array(['steel']).repeat(Jcktins.nbays)
    Xbrcmatin.rho=np.array([7850.])

    Dbrc=np.asarray([0.8]).repeat(Jcktins.nbays)
    tbrc=np.asarray([0.02]).repeat(Jcktins.nbays)

    Xbrcinputs=XBrcGeoInputs()
    Xbrcinputs.Dbrc=Dbrc
    Xbrcinputs.tbrc=tbrc
    Xbrcinputs.ndiv=1				 ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins=Xbrcmatin
    Xbrcinputs.precalc=False   #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    #______________________________________________#

    #Mbrc data
    Mbrcmatin=MatInputs()
    Mbrcmatin.matname=np.array(['steel'])
    Mbrcmatin.rho=np.array([7850.])

    Mbrcinputs=MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud=0.8                  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud=0.02
    Mbrcinputs.ndiv=2					    ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins=Mbrcmatin
    Mbrcinputs.precalc=False   #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    #______________________________________________#

    #Hbrc data
    Hbrcmatin=MatInputs()
    Hbrcmatin.matname=np.array(['steel'])
    Hbrcmatin.rho=np.array([7850.])
    Dbrc_hbrc=1.1				           ###----USER INPUT----###

    Hbrcinputs=HBrcGeoInputs()
    Hbrcinputs.Dbrch=Dbrc_hbrc					   ###----USER INPUT----###
    Hbrcinputs.ndiv=0
    Hbrcinputs.Hbrcmatins=Hbrcmatin
    Hbrcinputs.precalc=True   #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    #______________________________________________#

    #TP data


    #Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    #TP lumped mass data
    TPlumpinputs=TPlumpMass()						      ###----ALL USER INPUT----###
    TPlumpinputs.mass = 666.e3#-98385.33+( 7850.*4*np.pi/4.*(1.2**2-(1.2-2.*0.04)**2)*4)  #[kg]  TO MODIFY AFTER WE ASSESS OVERALL TP MASS, to be reduced for the steel weight
    TPlumpinputs.CMoff= np.array([0.,0.,2.]) #CG of concrete block is 2 m above intersection of diagonal braces
    TPlumpinputs.I    = 1./12*TPlumpinputs.mass*np.array([8.**2+4.**2,8.**2+4.**2,8.**2+8.**2,0.,0.,0.])

    TPstrtmatin=MatInputs()
    TPstmpsmatin=MatInputs()
    TPgirdmatin=MatInputs()
    TPbrcmatin=MatInputs()
    TPstemmatin=MatInputs()
    TPstmpsmatin.matname=np.array(['steel'])
    TPstmpsmatin.rho=np.array([7850.])

    TPstrtmatin.matname=np.array(['steel'])
    TPstrtmatin.rho=np.array([1350.])
    TPbrcmatin.matname=np.array(['steel'])
    TPbrcmatin.rho=np.array([1350.])#np.array([7850.]) tpstrucmass=np.pi/4*(1.2**2-(1.2-2*0.04)**2)*7850*4*4 7850.*tpstrucmass/myjckt.TP.TPouts.mass=1462.185
    TPgirdmatin.matname=np.array(['steel'])
    TPgirdmatin.rho=np.array([1350.])
    TPstemmatin.matname=np.array(['steel']).repeat(2) ###----ALL USER INPUT----###
    TPstemmatin.rho=np.array([1350.])

    TPinputs=TPGeoInputs()
    TPinputs.TPstrtmatins=TPstrtmatin
    TPinputs.TPbrcmatins=TPbrcmatin
    TPinputs.TPstemmatins=TPstemmatin
    TPinputs.TPstmpmatins=TPstmpsmatin
    TPinputs.TPgirdmatins=TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut=1.2				    ###----ALL USER INPUT----###
    TPinputs.tstrut=0.04
    TPinputs.Dgir=TPinputs.Dstrut
    TPinputs.tgir=TPinputs.tstrut
    TPinputs.Dbrc=TPinputs.Dstrut
    TPinputs.tbrc=TPinputs.tstrut
							     ###----ALL USER INPUT----###
    TPinputs.hstump=0.499#(16.15-15.651)
    TPinputs.Dstump=1.2
    TPinputs.tstump=0.04

    TPinputs.stumpndiv=1
    TPinputs.brcndiv=1
    TPinputs.girndiv=1
    TPinputs.strutndiv=1
    TPinputs.stemndiv=1
    TPinputs.nstems=3
    TPinputs.Dstem=np.array([5.6]).repeat(TPinputs.nstems)
    TPinputs.tstem=np.array([0.032,0.032,0.032])
    TPinputs.hstem=np.array([(4.)/TPinputs.nstems]).repeat(TPinputs.nstems)
    #______________________________________________#

    #Tower data
    Twrmatin=MatInputs()
    Twrmatin.matname=np.array(['steel'])
    Twrmatin.rho=np.array([7850.])

    Twrinputs=TwrGeoInputs()
    Twrinputs.Twrmatins=Twrmatin
    #Twrinputs.Htwr=88.15  #Trumped by HH
    Twrinputs.Htwr2frac=1./88.15  #fraction of tower height with constant x-section
    Twrinputs.ndiv=np.array([1,1])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax= 5. #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db=5.6
    Twrinputs.DTRb=Twrinputs.Db/0.032
    Twrinputs.Dt=4.
    Twrinputs.DTRt=Twrinputs.Dt/0.03

        #If you use the following 12 lines, The geometry defined above is ignored
    ztwr=np.array([20.15,21.15,32.15,42.15,54.15,64.15,74.15,83.15,88.15]) -20.15
    Dtwr=np.array([5.6,5.577,5.318,5.082,4.8,4.565,4.329,4.118,4])
    ttwr=np.array([0.032,0.032,0.03,0.028,0.024,0.022,0.02,0.03,0.03])
    pmtwr=np.array([ np.array([20.15,54.15,88.15])-20.15,[1.9e3,1.4e3,1.0e3]]).T  #(3,2) first col z's, second weights
    #Interpolate data to refine tower discretization
    dz=1. #[m] maximum deltaz allowed in discretization
    ztwr2=np.linspace(ztwr[0],ztwr[-1],round((ztwr[-1]-ztwr[0])/dz))   #New discretization
    Dtwr_interp=interp1d(ztwr,Dtwr)
    ttwr_interp=interp1d(ztwr,ttwr)
    Twrinputs.ztwr=ztwr2
    Twrinputs.Dtwr=Dtwr_interp(ztwr2)
    Twrinputs.ttwr=ttwr_interp(ztwr2)
    Twrinputs.TwrlumpedMass=np.zeros([pmtwr.shape[0],11])
    Twrinputs.TwrlumpedMass[:,0:2]=pmtwr

    TwrRigidTop=False           #False=Account for RNA via math rather than a physical rigidmember
    #______________________________________________#

    #RNA data
    RNAins=RNAprops()
    RNAins.mass=350.e3  #[kg]
    RNAins.I[0]=86.579E+6  #[kg m2]
    RNAins.I[1]=53.530E+6  #[kg m2]
    RNAins.I[2]=58.112E+6  #[kg m2]
    RNAins.CMoff[2]=2.34    #[m]
    RNAins.Thoff[2]=2.4     #[m]
    RNAins.yawangle=45.  #angle with respect to global X, CCW looking from above, wind from left
    RNAins.rna_weightM=True
    #______________________________________________#

    #RNA loads              Fx-z,         Mxx-zz
    RNA_F=np.array([1000.e3,0.,0.,0.,0.,0.])   #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)
    #______________________________________________#

    # Frame3DD parameters           									      ###----ALL USER INPUT----###
    FrameAuxIns=Frame3DDaux()
    FrameAuxIns.sh_fg=1               #shear flag-->Timoshenko
    FrameAuxIns.deltaz=5.
    FrameAuxIns.geo_fg=0
    FrameAuxIns.nModes = 6             # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1            # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0               # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9             # mode shape tolerance
    FrameAuxIns.shift = 0.0            # shift value ... for unrestrained structures
    FrameAuxIns.gvector=np.array([0.,0.,-9.8065])    #GRAVITY
    #______________________________________________#
    #______________________________________________#

# OTHER AUXILIARY CONSTRAINTS AND TARGETS FOR OPTIMIZATION #
    #______________________________________________#
    #______________________________________________#

    #Set Optimization Bounds and guesses for the various variables:
    #          x=  [ batter,  Dpile,    tpile,        Lp,   Dleg,     tleg,       Dbrc,   tbrc,     Dbrc_mud,   tbrc_mud,   Dgit,      tgir,      Db,   DTRb   Dt,   DTRt   Htwr2fac        dck_widthfact]
    MnCnst = np.array([ 8.,      1.,    1.*0.0254,   20.,   1.,       1.*0.0254,  1.,    1.*0.0254,   1.,     1.*0.0254,      1.,     1.*0.0254,  5.,   120.,  3.,   120.,     0.05,         2.])
    MxCnst = np.array([ 15.,     2.5,   5.*0.0254,   50.,   2.5,      5.*0.0254,  2.,    5.*0.0254,   2.,     5.*0.0254,      2.,     5.*0.0254,  7.,   200.,  4.,   200.,     0.25,         3.])
    guesses= np.array([  10.,    1.5,   1.5*0.0254,  26.,   1.8,     1.5*0.0254,  1.2,   1.5*0.0254,  1.2,    1.5*0.0254,     1.2,    1.5*0.0254, 6.,   140.,  3.5,  150.,     0.2,          2.])

    #SET Maximum Footprint [m]
    mxftprint =30.

    #Set target frequency [Hz] and f0epsilon, i.e. fmax=(1+f0eps)*f0
    f0=0.22
    f0epsilon=0.1

    #Set whether or not DTRb and DTRt for the tower are teh same
    DTRsdiff=True    ##SET THIS TO TRUE IF YOU WANT DTRs to be different between base and top

    #Set the minminimum DTR allowed for jacket members; mostly for 60+waterdepths
    jcktDTRmin=22.

   #_____________________________________________________________#
   #________________ DO NOT MODIFY THE FOLLOWING ________________#
   #_____________________________________________________________#

    bounds=np.vstack((MnCnst,MxCnst))
    desvarmeans=np.mean(bounds,1)


    # Now Launch the assembly and pass all of the inputs

    myjckt=set_as_top(JacketSE(Jcktins.clamped,Jcktins.AFflag,Jcktins.PreBuildTPLvl>0))
    myjckt.JcktGeoIn=Jcktins
    myjckt.Soilinputs=Soilinputs
    myjckt.Waterinputs=Waterinputs
    myjckt.Windinputs=Windinputs
    myjckt.Pileinputs=Pileinputs
    myjckt.leginputs=leginputs
    myjckt.legbot_stmphin =legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0
    myjckt.Xbrcinputs=Xbrcinputs
    myjckt.Mbrcinputs=Mbrcinputs
    myjckt.Hbrcinputs=Hbrcinputs
    myjckt.TPlumpinputs=TPlumpinputs
    myjckt.TPinputs=TPinputs

    myjckt.Twrinputs=Twrinputs
    myjckt.TwrRigidTop=TwrRigidTop       #Account for RNA via math rather than a physical rigidmember
    myjckt.RNAinputs=RNAins
    myjckt.RNA_F=RNA_F

    myjckt.FrameAuxIns=FrameAuxIns


    return myjckt,f0,f0epsilon,jcktDTRmin,DTRsdiff,mxftprint,guesses,bounds.T
Exemplo n.º 4
0
def main():  # \
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_PyOPT for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_PyOPT.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    # Set inputs							     ###----ALL USER INPUT----###
    Jcktins = JcktGeoInputs()

    Jcktins.nlegs = 4
    Jcktins.nbays = 4
    Jcktins.batter = 30.5495  # =(-43.127+24.614)/(5.939-5.333)
    # Jcktins.dck_botz =15.651
    Jcktins.dck_botz = 16.15  # CJBe
    Jcktins.dck_width = 8.0 + 1.2
    Jcktins.weld2D = 0.0
    Jcktins.VPFlag = True  # vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped = (
        True
    )  # whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  # whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 0  # if >0, the TP is prebuilt according to rules per PreBuildTP

    # ______________________________________________#

    # Soil inputs
    Soilinputs = SoilGeoInputs()
    Soilinputs.zbots = -np.array([3.0, 5.0, 7.0, 15.0, 30.0, 50.0])
    Soilinputs.gammas = np.array([10000.0, 10000.0, 10000.0, 10000.0, 10000.0, 10000.0])
    Soilinputs.cus = np.array([60000.0, 60000.0, 60000.0, 60000.0, 60000.0, 60000.0])
    Soilinputs.phis = np.array(
        [26.0, 26.0, 26.0, 26.0, 26.0, 26]
    )  # np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta = 25.0
    Soilinputs.sndflg = True
    Soilinputs.PenderSwtch = False  # True
    Soilinputs.SoilSF = 1.0
    # ______________________________________________#

    # Water and wind inputs
    Waterinputs = WaterInputs()

    Waterinputs.wdepth = 50.0
    Waterinputs.wlevel = (
        50.0
    )  # Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T = 12.0  # Wave Period
    Waterinputs.HW = 10.0  # Wave Height
    Waterinputs.Cd = 3.0  # Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm = 8.0  # 2.  #ADded mass Coefficient

    Windinputs = WindInputs()
    Windinputs.HH = 88.15 + 2.4  # CHECK HOW THIS COMPLIES....
    Windinputs.U50HH = 30.0  # assumed gust speed
    Windinputs.Cdj = (
        4.0
    )  # Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt = 2  # Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    # ______________________________________________#

    # Pile data
    Pilematin = MatInputs()
    Pilematin.matname = np.array(["steel"])  # CJB Changed this from RC into steel
    Pilematin.E = np.array([2.1e11])
    Pilematin.G = np.array([8.07690e10])
    Pilematin.rho = (
        np.array([3339.12]) * 34274.82 / 36876.0
    )  # From Test04.txt in SD, to check with official FAST certtest

    Pileinputs = PileGeoInputs()
    Pileinputs.Pilematins = Pilematin
    Pileinputs.ndiv = 0  # CJB Change this from 1 to 0 #3			   ###----USER INPUT----###
    Pileinputs.Dpile = 2.082
    Pileinputs.tpile = 0.491
    Pileinputs.Lp = 0.0  # [m] Embedment length
    # ______________________________________________#

    # Legs data
    legmatin = MatInputs()
    legmatin.matname = ["steel"]
    legmatin.rho = np.array([7850.0])
    Dleg = np.asarray([1.2]).repeat(Jcktins.nbays + 1)  # e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg = np.asarray([0.05, 0.05, 0.035, 0.035, 0.035])

    leginputs = LegGeoInputs()
    leginputs.legZbot = 4.5  ###----USER INPUT----###
    leginputs.ndiv = 1  ###----USER INPUT----###
    leginputs.legmatins = legmatin
    leginputs.Dleg = Dleg
    leginputs.tleg = tleg

    # The following is a passthrough variables
    legbot_stmphin = 45.5 - 43.127  # =2.373 Distance from bottom of leg to second joint along z; must be>0
    # ______________________________________________#

    # Xbrc data
    Xbrcmatin = MatInputs()
    Xbrcmatin.matname = np.array(["steel"]).repeat(Jcktins.nbays)
    Xbrcmatin.rho = np.array([7850.0])

    Dbrc = np.asarray([0.8]).repeat(Jcktins.nbays)
    tbrc = np.asarray([0.02]).repeat(Jcktins.nbays)

    Xbrcinputs = XBrcGeoInputs()
    Xbrcinputs.Dbrc = Dbrc
    Xbrcinputs.tbrc = tbrc
    Xbrcinputs.ndiv = 1  ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins = Xbrcmatin
    Xbrcinputs.precalc = (
        False
    )  # This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    # ______________________________________________#

    # Mbrc data
    Mbrcmatin = MatInputs()
    Mbrcmatin.matname = np.array(["steel"])
    Mbrcmatin.rho = np.array([7850.0])

    Mbrcinputs = MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud = 0.8  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud = 0.02
    Mbrcinputs.ndiv = 2  ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins = Mbrcmatin
    Mbrcinputs.precalc = (
        False
    )  # This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    # ______________________________________________#

    # Hbrc data
    Hbrcmatin = MatInputs()
    Hbrcmatin.matname = np.array(["steel"])
    Hbrcmatin.rho = np.array([7850.0])
    Dbrc_hbrc = 1.1  ###----USER INPUT----###

    Hbrcinputs = HBrcGeoInputs()
    Hbrcinputs.Dbrch = Dbrc_hbrc  ###----USER INPUT----###
    Hbrcinputs.ndiv = 0
    Hbrcinputs.Hbrcmatins = Hbrcmatin
    Hbrcinputs.precalc = (
        True
    )  # This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    # ______________________________________________#

    # TP data

    # Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    # TP lumped mass data
    TPlumpinputs = TPlumpMass()  ###----ALL USER INPUT----###
    TPlumpinputs.mass = (
        666.0e3
    )  # -98385.33+( 7850.*4*np.pi/4.*(1.2**2-(1.2-2.*0.04)**2)*4)  #[kg]  TO MODIFY AFTER WE ASSESS OVERALL TP MASS, to be reduced for the steel weight
    TPlumpinputs.CMoff = np.array([0.0, 0.0, 2.0])  # CG of concrete block is 2 m above intersection of diagonal braces
    TPlumpinputs.I = (
        1.0
        / 12
        * TPlumpinputs.mass
        * np.array([8.0 ** 2 + 4.0 ** 2, 8.0 ** 2 + 4.0 ** 2, 8.0 ** 2 + 8.0 ** 2, 0.0, 0.0, 0.0])
    )

    TPstrtmatin = MatInputs()
    TPstmpsmatin = MatInputs()
    TPgirdmatin = MatInputs()
    TPbrcmatin = MatInputs()
    TPstemmatin = MatInputs()
    TPstmpsmatin.matname = np.array(["steel"])
    TPstmpsmatin.rho = np.array([7850.0])

    TPstrtmatin.matname = np.array(["steel"])
    TPstrtmatin.rho = np.array([1350.0])
    TPbrcmatin.matname = np.array(["steel"])
    TPbrcmatin.rho = np.array(
        [1350.0]
    )  # np.array([7850.]) tpstrucmass=np.pi/4*(1.2**2-(1.2-2*0.04)**2)*7850*4*4 7850.*tpstrucmass/myjckt.TP.TPouts.mass=1462.185
    TPgirdmatin.matname = np.array(["steel"])
    TPgirdmatin.rho = np.array([1350.0])
    TPstemmatin.matname = np.array(["steel"]).repeat(2)  ###----ALL USER INPUT----###
    TPstemmatin.rho = np.array([1350.0])

    TPinputs = TPGeoInputs()
    TPinputs.TPstrtmatins = TPstrtmatin
    TPinputs.TPbrcmatins = TPbrcmatin
    TPinputs.TPstemmatins = TPstemmatin
    TPinputs.TPstmpmatins = TPstmpsmatin
    TPinputs.TPgirdmatins = TPgirdmatin

    # Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut = 1.2  ###----ALL USER INPUT----###
    TPinputs.tstrut = 0.04
    TPinputs.Dgir = TPinputs.Dstrut
    TPinputs.tgir = TPinputs.tstrut
    TPinputs.Dbrc = TPinputs.Dstrut
    TPinputs.tbrc = TPinputs.tstrut
    ###----ALL USER INPUT----###
    TPinputs.hstump = 0.499  # (16.15-15.651)
    TPinputs.Dstump = 1.2
    TPinputs.tstump = 0.04

    TPinputs.stumpndiv = 1
    TPinputs.brcndiv = 1
    TPinputs.girndiv = 1
    TPinputs.strutndiv = 1
    TPinputs.stemndiv = 1
    TPinputs.nstems = 3
    TPinputs.Dstem = np.array([5.6]).repeat(TPinputs.nstems)
    TPinputs.tstem = np.array([0.032, 0.032, 0.032])
    TPinputs.hstem = np.array([(4.0) / TPinputs.nstems]).repeat(TPinputs.nstems)
    # ______________________________________________#

    # Tower data
    Twrmatin = MatInputs()
    Twrmatin.matname = np.array(["steel"])
    Twrmatin.rho = np.array([7850.0])

    Twrinputs = TwrGeoInputs()
    Twrinputs.Twrmatins = Twrmatin
    # Twrinputs.Htwr=88.15  #Trumped by HH
    Twrinputs.Htwr2frac = 1.0 / 88.15  # fraction of tower height with constant x-section
    Twrinputs.ndiv = np.array([1, 1])  # ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax = (
        5.0
    )  # [m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db = 5.6
    Twrinputs.DTRb = Twrinputs.Db / 0.032
    Twrinputs.Dt = 4.0
    Twrinputs.DTRt = Twrinputs.Dt / 0.03
    # Set whether or not DTRb and DTRt for the tower are the same. Note if next set to False it will trump DTRt setting above
    Twrinputs.DTRsdiff = True  ##SET THIS TO TRUE IF YOU WANT DTRs to be different between base and top

    # If you use the following 12 lines, The geometry defined above is ignored
    ztwr = np.array([20.15, 21.15, 32.15, 42.15, 54.15, 64.15, 74.15, 83.15, 88.15]) - 20.15
    Dtwr = np.array([5.6, 5.577, 5.318, 5.082, 4.8, 4.565, 4.329, 4.118, 4])
    ttwr = np.array([0.032, 0.032, 0.03, 0.028, 0.024, 0.022, 0.02, 0.03, 0.03])
    pmtwr = np.array(
        [np.array([20.15, 54.15, 88.15]) - 20.15, [1.9e3, 1.4e3, 1.0e3]]
    ).T  # (3,2) first col z's, second weights
    # Interpolate data to refine tower discretization
    dz = 1.0  # [m] maximum deltaz allowed in discretization
    ztwr2 = np.linspace(ztwr[0], ztwr[-1], round((ztwr[-1] - ztwr[0]) / dz))  # New discretization
    Dtwr_interp = interp1d(ztwr, Dtwr)
    ttwr_interp = interp1d(ztwr, ttwr)
    Twrinputs.ztwr = ztwr2
    Twrinputs.Dtwr = Dtwr_interp(ztwr2)
    Twrinputs.ttwr = ttwr_interp(ztwr2)
    Twrinputs.TwrlumpedMass = np.zeros([pmtwr.shape[0], 11])
    Twrinputs.TwrlumpedMass[:, 0:2] = pmtwr

    TwrRigidTop = False  # False=Account for RNA via math rather than a physical rigidmember
    # ______________________________________________#

    # RNA data
    RNAins = RNAprops()
    RNAins.mass = 350.0e3  # [kg]
    RNAins.I[0] = 86.579e6  # [kg m2]
    RNAins.I[1] = 53.530e6  # [kg m2]
    RNAins.I[2] = 58.112e6  # [kg m2]
    RNAins.CMoff[2] = 2.34  # [m]
    RNAins.Thoff[2] = 2.4  # [m]
    RNAins.yawangle = 45.0  # angle with respect to global X, CCW looking from above, wind from left
    RNAins.rna_weightM = True
    # ______________________________________________#

    # RNA loads              Fx-z,         Mxx-zz
    RNA_F = np.array(
        [1000.0e3, 0.0, 0.0, 0.0, 0.0, 0.0]
    )  # unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)
    # ______________________________________________#

    # Frame3DD parameters           									      ###----ALL USER INPUT----###
    FrameAuxIns = Frame3DDaux()
    FrameAuxIns.sh_fg = 1  # shear flag-->Timoshenko
    FrameAuxIns.deltaz = 5.0
    FrameAuxIns.geo_fg = 0
    FrameAuxIns.nModes = 6  # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1  # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0  # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9  # mode shape tolerance
    FrameAuxIns.shift = 0.0  # shift value ... for unrestrained structures
    FrameAuxIns.gvector = np.array([0.0, 0.0, -9.8065])  # GRAVITY

    # Decide whether or not to consider DLC 6.1 as well
    twodlcs = False

    # ______________________________________________#
    # ______________________________________________#

    # OTHER AUXILIARY CONSTRAINTS AND TARGETS FOR OPTIMIZATION #
    # ______________________________________________#
    # ______________________________________________#

    # Set Optimization Bounds and guesses for the various variables:
    #          x=  [ batter,  Dpile,    tpile,        Lp,   Dleg,     tleg,       Dbrc,   tbrc,     Dbrc_mud,   tbrc_mud,   Dgit,      tgir,      Db,   DTRb   Dt,   DTRt   Htwr2fac        dck_widthfact]
    MnCnst = np.array(
        [
            8.0,
            1.0,
            1.0 * 0.0254,
            20.0,
            1.0,
            1.0 * 0.0254,
            1.0,
            1.0 * 0.0254,
            1.0,
            1.0 * 0.0254,
            1.0,
            1.0 * 0.0254,
            5.0,
            120.0,
            3.0,
            120.0,
            0.05,
            2.0,
        ]
    )
    MxCnst = np.array(
        [
            15.0,
            2.5,
            5.0 * 0.0254,
            50.0,
            2.5,
            5.0 * 0.0254,
            2.0,
            5.0 * 0.0254,
            2.0,
            5.0 * 0.0254,
            2.0,
            5.0 * 0.0254,
            7.0,
            200.0,
            4.0,
            200.0,
            0.25,
            3.0,
        ]
    )
    guesses = np.array(
        [
            10.0,
            1.5,
            1.5 * 0.0254,
            26.0,
            1.8,
            1.5 * 0.0254,
            1.2,
            1.5 * 0.0254,
            1.2,
            1.5 * 0.0254,
            1.2,
            1.5 * 0.0254,
            6.0,
            140.0,
            3.5,
            150.0,
            0.2,
            2.0,
        ]
    )

    # SET Maximum Footprint [m]
    mxftprint = 30.0

    # Set target frequency [Hz] and f0epsilon, i.e. fmax=(1+f0eps)*f0
    f0 = 0.22
    f0epsilon = 0.1

    # Set the minminimum DTR allowed for jacket members; mostly for 60+waterdepths
    jcktDTRmin = 22.0

    # _____________________________________________________________#
    # ________________ DO NOT MODIFY THE FOLLOWING ________________#
    # _____________________________________________________________#

    bounds = np.vstack((MnCnst, MxCnst))
    desvarmeans = np.mean(bounds, 1)

    # Now Launch the assembly and pass all of the inputs
    # myjckt=set_as_top(JacketSE(Jcktins.clamped,Jcktins.AFflag,twodlcs=twodlcs, wlevel_Ulist=29))#CJB and JQ
    myjckt = set_as_top(JacketSE(Jcktins.clamped, Jcktins.AFflag, twodlcs=twodlcs))
    # pySubDyn Parameters CJB+
    # SDpySubDynA = pySubDynA()

    # INPUTS TO RUN SUBDYN-------------------------------------------------------
    # (PATH INFORMATION FOR INPUT FILE AND DRIVER)

    Base_name = "OC4_pySubDyn"  # Input name here

    # INPUT FILE PATH
    myjckt.InputFile_name = str(Base_name) + ".txt"
    # myjckt.SDpySubDynA.InputFile_name=str(Base_name)+".txt"
    myjckt.InputandDriverpath = "C:\wisdem\plugins\JacketSE\src\jacketse\SubDyn\CertTest"
    myjckt.InputFile_path = myjckt.InputandDriverpath + os.sep + str(myjckt.InputFile_name)

    # DRIVER PATH
    myjckt.Driver_name = str(Base_name) + "D" + ".txt"
    myjckt.Driver_path = myjckt.InputandDriverpath + os.sep + str(myjckt.Driver_name)
    myjckt.Driver_path = myjckt.InputandDriverpath + os.sep + str(myjckt.Driver_name)

    # PATH TO RUN SUBDYN
    SDEXEpath = "C:\wisdem\plugins\JacketSE\src\jacketse\SubDyn" + os.sep + "bin\SubDyn_Win32.exe"
    myjckt.SDpath = str(SDEXEpath) + " " + str(myjckt.Driver_path)
    # test.SDpath='r'+"'''"+test.SDEXEpath+' '+test.SDDriverpath+"'''"

    # PATH TO READ OUTPUT (INPUTS TO READ OUTPUT)
    myjckt.Readpath_out = str(myjckt.InputandDriverpath) + os.sep + str(Base_name) + ".SD.out"
    myjckt.Readpath_sum = str(myjckt.InputandDriverpath) + os.sep + str(Base_name) + ".SD.sum"
    myjckt.Delete_file = False  # Deletes driver, input, and output files. Does not delete Echo file.

    # INPUT FILE INPUTS----------------------------------------------------------

    # Simulation Control
    myjckt.Echo = np.array([False, "Echo", "- Echo input data to " "<rootname>.SD.ech" " (flag)"])
    myjckt.SDdeltaT = np.array(
        [
            "DEFAULT",
            "SDdeltaT",
            "- Local Integration Step. If " "default" ", the glue-code integration step will be used.",
        ]
    )
    myjckt.IntMethod = np.array([4, "IntMethod", "- Integration Method [1/2/3/4 = RK4/AB4/ABM4/AM2]."])
    myjckt.SttcSolve = np.array([False, "SttcSolve", "- Solve dynamics about static equilibrium point"])

    # FEA and CRAIG-BAMPTON PARAMETERS
    myjckt.FEMmod = np.array(
        [
            3,
            "- FEM switch: element model in the FEM. [1= Euler-Bernoulli(E-B);  2=Tapered E-B (unavailable);  3= 2-node Timoshenko;  4= 2-node tapered Timoshenko (unavailable)]",
        ]
    )
    myjckt.NDiv = np.array(
        [1, "NDiv", "- Number of sub-elements per member"]
    )  # CJB "HARDWIRED" INTO PYSUBDYN AS 1 TO ALLOW JACKETSE'S NODES TO BE USED AS SUBDYN'S JOINTS
    myjckt.CBMod = np.array(
        [
            False,
            "- [T/F] If True perform C-B reduction, else full FEM dofs will be retained. If True, select Nmodes to retain in C-B reduced system.",
        ]
    )
    myjckt.Nmodes = np.array(
        [75, "- Number of internal modes to retain (ignored if CBMod=False). If Nmodes=0 --> Guyan Reduction."]
    )
    myjckt.JDampings = np.array(
        [
            2,
            "JDampings",
            "- Damping Ratios for each retained mode (% of critical) If Nmodes>0, list Nmodes structural damping ratios for each retained mode (% of critical), or a single damping ratio to be applied to all retained modes. (last entered value will be used for all remaining modes).",
        ]
    )

    # Structure Joints
    myjckt.SDjointsHeader = np.array(
        [
            ["JointID", "JointXss", "JointYss", "JointZss", "[Coordinates of Member joints in SS-Coordinate System]"],
            ["(-)", "(m)", "(m)", "(m)"],
        ]
    )

    # Base Reaction Joints
    myjckt.BaseRxnJointsHeader = np.array(
        [
            [
                "RJointID",
                "RctTDXss",
                "RctTDYss",
                "RctTDZss",
                "RctRDXss",
                "RctRDYss",
                "RctRDZss",
                "[Global Coordinate System]",
            ],
            ["(-)", ("flag"), ("flag"), ("flag"), ("flag"), ("flag"), ("flag")],
        ]
    )

    # Interface Joints
    myjckt.InterfaceRxnJointsHeader = np.array(
        [
            [
                "IJointID",
                "ItfTDXss",
                "ItfTDYss",
                "ItfTDZss",
                "ItfRDXss",
                "ItfRDYss",
                "ItfRDZss",
                "[Global Coordinate System]",
            ],
            ["(-)", ("flag"), ("flag"), ("flag"), ("flag"), ("flag"), ("flag")],
        ]
    )

    # Members
    myjckt.MembersHeader = np.array(
        [
            ["MemberID", "MJointID1", "MJointID2", "MPropSetID1", "MPropSetID2", "COSMID"],
            ["(-)", "(-)", "(-)", "(-)", "(-)", "(-)"],
        ]
    )

    # MEMBER X-SECTION PROPERTY data 1/2
    myjckt.NPropSets = np.array(
        [
            6,
            "NPropSets",
            "- # of structurally unique x-sections (i.e. # of X-sectional props utilized throughout all of the members)",
        ]
    )
    myjckt.PropSet1Header = np.array(
        [
            ["PropSetID", "YoungE", "ShearG", "MatDens", "XsecD", "XsecT"],
            ["(-)", "(N/m2)", "(N/m2)", "(kg/m3)", "(m)", "(m)"],
        ]
    )

    # MEMBER X-SECTION PROPERTY data 2/2
    myjckt.PropSet2 = np.array([])
    myjckt.PropSet2Header = np.array(
        [
            ["PropSetID", "YoungE", "ShearG", "MatDens", "XsecA", "XsecAsx", "XsecAsy", "XsecJxx", "XsecJyy", "XsecJ0"],
            ["(-)", "(N/m2)", "(N/m2)", "(kg/m3)", "(m2)", "(m2)", "(m2)", "(m4)", "(m4)", "(m4)"],
        ]
    )

    # MEMBER COSINE MATRICES COSM(i,j)
    myjckt.COSMHeader = np.array(
        [
            [
                "COSMID",
                "COSM11",
                "COSMID12",
                "COSMID13",
                "COSMID21",
                "COSMID22",
                "COSMID23",
                "COSMID31",
                "COSMID32",
                "COSMID33",
            ],
            ["(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)", "(-)"],
        ]
    )
    myjckt.COSMs = np.array([])

    # JOINT ADDITIONAL CONCENTRATED MASSES
    myjckt.CmassHeader = np.array(
        [["CMJointID", "JMass", "JMXX", "JMYY", "JMZZ"], ["(-)", "(kg)", "(kg*m^2)", "(kg*m^2)", "(kg*m^2)"]]
    )
    myjckt.Cmass = np.array([])

    # OUTPUT: SUMMARY & OUTFILE
    myjckt.SSSum = np.array(
        [
            True,
            "SSSum",
            "- Output a Summary File (flag).It contains: matrices K,M  and C-B reduced M_BB, M-BM, K_BB, K_MM(OMG^2), PHI_R, PHI_L. It can also contain COSMs if requested.",
        ]
    )
    myjckt.OutCOSM = np.array(
        [True, "OutCOSM", "- Output cosine matrices with the selected output member forces (flag)"]
    )
    myjckt.OutAll = np.array([True, "OutAll", "- [T/F] Output all members' end forces "])
    myjckt.OutSwtch = np.array(
        [
            1,
            "OutSwtch",
            "- [1/2/3] Output requested channels to: 1=<rootname>.SD.out;  2=<rootname>.out (generated by FAST);  3=both files.",
        ]
    )
    myjckt.TabDelim = np.array([True, "TabDelim", "- Generate a tab-delimited output in the <rootname>.SD.out file"])
    myjckt.OutDec = np.array([1, "OutDec", "- Decimation of output in the <rootname>.SD.out file"])
    myjckt.OutFmt = np.array(
        ["Es11.4e2", "OutFmt", "- Output format for numerical results in the <rootname>.SD.out file"]
    )
    myjckt.OutSFmt = np.array(["A11", "OutFmt", "- Output format for header strings in the <rootname>.SD.out file"])

    # MEMBER OUTPUT LIST
    myjckt.MemOutListHeader = np.array(
        [
            [
                "MemberID",
                "NoutCnt",
                "NodeCnt",
                "[NOutCnt=how many nodes to get output for [< 10]; NodeCnt are local ordinal numbers from the start of the member, and must be >=1 and <= NDiv+1] If NMOutputs=0 leave blank as well.]",
            ],
            ["(-)", "(-)", "(-)"],
        ]
    )

    # SSOutline
    myjckt.SSOutlist = np.array(
        [
            [
                "ReactFXss, ReactFYss, ReactFZss, ReactMXss, ReactMYss, ReactMZss",
                "-Base reactions (forces onto SS structure)",
            ],
            [
                "IntfFXss,  IntfFYss,  IntfFZss,  IntfMXss, IntfMYss, IntfMZss",
                "-Interface reactions (forces from SS structure)",
            ],
            ["IntfTDXss,  IntfTDYss,  IntfTDZss,  IntfRDXss, IntfRDYss, IntfRDZss", "-Interface deflections "],
            ["IntfTAXss,  IntfTAYss,  IntfTAZss,  IntfRAXss, IntfRAYss, IntfRAZss", "Interface accelerations"],
        ]
    )

    myjckt.SDjoints = np.array(
        [
            [1, -5.93900, -5.93900, -43.12700],
            [2, 5.93900, -5.93900, -43.12700],
            [3, 5.93900, 5.93900, -43.12700],
            [4, -5.93900, 5.93900, -43.12700],
            [5, -4.01600, -4.01600, 15.65100],
            [6, 4.01600, -4.01600, 15.65100],
            [7, 4.01600, 4.01600, 15.65100],
            [8, -4.01600, 4.01600, 15.65100],
            [9, 0.00000, -4.79180, -8.06090],
            [10, 4.79180, 0.00000, -8.06090],
            [11, 0.00000, 4.79180, -8.06090],
            [12, -4.79180, 0.00000, -8.06090],
        ]
    )

    myjckt.BaseRxnJoints = np.array(
        [[1, 1, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1, 1], [3, 1, 1, 1, 1, 1, 1], [4, 1, 1, 1, 1, 1, 1]]
    )

    myjckt.InterfaceJointsFlags = np.array(
        [[5, 1, 1, 1, 1, 1, 1], [6, 1, 1, 1, 1, 1, 1], [7, 1, 1, 1, 1, 1, 1], [8, 1, 1, 1, 1, 1, 1]]
    )

    myjckt.Members = np.array(
        [
            [1, 1, 5, 2, 2],
            [2, 2, 6, 2, 2],
            [3, 3, 7, 2, 2],
            [4, 4, 8, 2, 2],
            [5, 1, 9, 3, 3],
            [6, 9, 6, 3, 3],
            [7, 5, 9, 3, 3],
            [8, 9, 2, 3, 3],
            [9, 2, 10, 3, 3],
            [10, 10, 7, 3, 3],
            [11, 6, 10, 3, 3],
            [12, 10, 3, 3, 3],
            [13, 3, 11, 3, 3],
            [14, 11, 8, 3, 3],
            [15, 7, 11, 3, 3],
            [16, 11, 4, 3, 3],
            [17, 4, 12, 3, 3],
            [18, 12, 5, 3, 3],
            [19, 8, 12, 3, 3],
            [20, 12, 1, 3, 3],
            [21, 5, 6, 3, 3],
            [22, 6, 7, 3, 3],
            [23, 7, 8, 3, 3],
            [24, 8, 5, 3, 3],
        ]
    )

    myjckt.MemOutList = np.array([[1, 2, 1, 2]])

    # DRIVER INPUTS--------------------------------------------------------------

    myjckt.EchoD = np.array([True, "Echo", "- Echo the input file data (flag)"])

    # Environmental Conditions
    myjckt.Gravity = np.array([9.81, "Gravity", "- Gravity (m/s^2)"])
    myjckt.WtrDpth = np.array([43.127, "WtrDpth", "- Water Depth (m) positive value"])

    # SubDyn
    myjckt.SDInputFile = np.array([myjckt.InputFile_path, "SDInputFile"])
    myjckt.OutRootName = np.array([str(myjckt.InputandDriverpath) + os.sep + str(Base_name), "OutRootName"])
    myjckt.NSteps = np.array([600, "NSteps", "- Number of time steps in the simulations (-)"])
    myjckt.TimeInterval = np.array([0.005, "TimeInterval", "- TimeInterval for the simulation (sec)"])
    myjckt.TP_RefPoint = np.array(
        [0.0, 0.0, 18.15, "TP_RefPoint", "- Location of the TP reference point in global coordinates (m)"]
    )
    myjckt.SubRotateZ = np.array(
        [0.0, "SubRotateZ", "- Rotation angle of the structure geometry in degrees about the global Z axis."]
    )

    # INPUTS
    myjckt.InputsMod = np.array(
        [
            1,
            "InputsMod",
            "- Inputs model {0: all inputs are zero for every timestep, 1: steadystate inputs, 2: read inputs from a file (InputsFile)} (switch)",
        ]
    )
    myjckt.InputsFile = np.array(['""', "InputsFile", "- Name of the inputs file if InputsMod = 2"])

    # STEADY INPUTS
    myjckt.uTPInSteady = np.array(
        [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, "uTPInSteady", "- input displacements and rotations ( m, rads )"]
    )
    myjckt.uDotTPInSteady = np.array(
        [
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            "uDotTPInSteady",
            "- input translational and rotational velocities ( m/s, rads/s)",
        ]
    )
    myjckt.uDotDotTPInSteady = np.array(
        [
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            0.0,
            "uDotDotTPInSteady",
            "- input translational and rotational accelerations ( m/s^2, rads/s^2)",
        ]
    )

    # myjckt.SDpySubDynA.run()
    myjckt.JcktGeoIn = Jcktins
    myjckt.Soilinputs = Soilinputs
    myjckt.Waterinputs = Waterinputs
    myjckt.Windinputs = Windinputs
    myjckt.Pileinputs = Pileinputs
    myjckt.leginputs = leginputs
    myjckt.legbot_stmphin = legbot_stmphin  # Distance from bottom of leg to second joint along z; must be>0
    myjckt.Xbrcinputs = Xbrcinputs
    myjckt.Mbrcinputs = Mbrcinputs
    myjckt.Hbrcinputs = Hbrcinputs
    myjckt.TPlumpinputs = TPlumpinputs
    myjckt.TPinputs = TPinputs

    myjckt.Twrinputs = Twrinputs
    myjckt.TwrRigidTop = TwrRigidTop  # Account for RNA via math rather than a physical rigidmember
    myjckt.RNAinputs = RNAins
    myjckt.RNA_F = RNA_F

    myjckt.FrameAuxIns = FrameAuxIns

    return myjckt, f0, f0epsilon, jcktDTRmin, mxftprint, guesses, bounds.T
Exemplo n.º 5
0
def main(): #\
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_Py&MDAOopt.py for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_Py&MDAOopt.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins=JcktGeoInputs()

    Jcktins.nlegs =4
    Jcktins.nbays =5
    Jcktins.batter=12.
    Jcktins.dck_botz =16.
    Jcktins.dck_width=2*6.
    Jcktins.weld2D   =0.5
    Jcktins.VPFlag = True    #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped= False    #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  #whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 5  #if >0, the TP is prebuilt according to rules per PreBuildTP

    #______________________________________________#

    #Soil inputs
    Soilinputs=SoilGeoInputs()
    Soilinputs.zbots   =-np.array([3.,5.,7.,15.,30.,50.])
    Soilinputs.gammas  =np.array([10000.,10000.,10000.,10000.,10000.,10000.])
    Soilinputs.cus     =np.array([60000.,60000.,60000.,60000.,60000.,60000.])
    Soilinputs.phis    =np.array([26.,26.,26.,26.,26.,26])#np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta   =25.
    Soilinputs.sndflg   =True
    Soilinputs.PenderSwtch   =False #True
    Soilinputs.SoilSF   =1.
    #______________________________________________#

    #Water and wind inputs
    Waterinputs=WaterInputs()
    Waterinputs.wdepth   =30.
    Waterinputs.wlevel   =30. #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T=12.  #Wave Period
    Waterinputs.HW=10. #Wave Height
    Waterinputs.Cd=3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm=8.#2.  #ADded mass Coefficient

    Windinputs=WindInputs()
    Windinputs.HH=100. #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH=30. #assumed gust speed
    Windinputs.Cdj=4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt=2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#

    #Pile data
    Pilematin=MatInputs()
    Pilematin.matname=np.array(['heavysteel'])

    Pileinputs=PileGeoInputs()
    Pileinputs.Pilematins=Pilematin
    Pileinputs.ndiv=0 #3			   ###----USER INPUT----###
    Pileinputs.Dpile=2.5
    Pileinputs.tpile=0.0254
    Pileinputs.Lp=20. #[m] Embedment length
    #______________________________________________#

    #Legs data
    legmatin=MatInputs()
    legmatin.matname=(['heavysteel','heavysteel','heavysteel','heavysteel'])
    Dleg=np.asarray([1.5]).repeat(Jcktins.nbays+1)                      #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg=np.asarray([1.5*0.0254]).repeat(Jcktins.nbays+1)

    leginputs=LegGeoInputs()
    leginputs.legZbot   = 1.0		 ###----USER INPUT----###
    leginputs.ndiv=1     			 ###----USER INPUT----###
    leginputs.legmatins=legmatin
    leginputs.Dleg0=Dleg[0]   #For optimization we just pass 1st value
    leginputs.tleg0=tleg[0]   #For optimization we just pass 1st value


    #The following is a passthrough variables
    legbot_stmphin =1.5  #Distance from bottom of leg to second joint along z; must be>0
    #______________________________________________#

    #Xbrc data
    Xbrcmatin=MatInputs()
    Xbrcmatin.matname=np.array(['heavysteel']).repeat(Jcktins.nbays)
    Dbrc=np.asarray([1.]).repeat(Jcktins.nbays)#np.array([1.,1.,0.8,0.8])
    tbrc=np.asarray([0.0254]).repeat(Jcktins.nbays)

    Xbrcinputs=XBrcGeoInputs()
    Xbrcinputs.Dbrc0=Dbrc[0]  #For optimization we just pass 1st value
    Xbrcinputs.tbrc0=tbrc[0]  #For optimization we just pass 1st value
    Xbrcinputs.ndiv=1				 ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins=Xbrcmatin
    Xbrcinputs.precalc=False   #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    #______________________________________________#

    #Mbrc data
    Mbrcmatin=MatInputs()
    Mbrcmatin.matname=np.array(['heavysteel'])

    Mbrcinputs=MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud=1.5                  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud=1.5*0.0254
    Mbrcinputs.ndiv=2					    ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins=Mbrcmatin
    Mbrcinputs.precalc=False   #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    #______________________________________________#

    #Hbrc data
    Hbrcmatin=MatInputs()
    Hbrcmatin.matname=np.array(['heavysteel'])
    Dbrc_hbrc=1.1				           ###----USER INPUT----###

    Hbrcinputs=HBrcGeoInputs()
    Hbrcinputs.Dbrch=Dbrc_hbrc					   ###----USER INPUT----###
    Hbrcinputs.ndiv=0#2
    Hbrcinputs.Hbrcmatins=Hbrcmatin
    Hbrcinputs.precalc=True   #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    #______________________________________________#

    #TP data


    #Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    #TP lumped mass data
    TPlumpinputs=TPlumpMass()						      ###----ALL USER INPUT----###
    TPlumpinputs.mass=200.e3 #[kg]
    TPlumpinputs.CMoff= np.zeros(3)
    TPlumpinputs.I=np.zeros(6) #Note that the code will assume the mass distributed at the corners of the TP for Ixx,Iyy,Izz purposes

    TPstrtmatin=MatInputs()
    TPstmpsmatin=MatInputs()
    TPgirdmatin=MatInputs()
    TPbrcmatin=MatInputs()
    TPstemmatin=MatInputs()
    TPstmpsmatin.matname=np.array(['heavysteel'])
    TPstrtmatin.matname=np.array(['heavysteel'])
    TPbrcmatin.matname=np.array(['heavysteel'])
    TPgirdmatin.matname=np.array(['heavysteel'])
    TPstemmatin.matname=np.array(['heavysteel']).repeat(2) ###----ALL USER INPUT----###

    TPinputs=TPGeoInputs()
    TPinputs.TPstrtmatins=TPstrtmatin
    TPinputs.TPbrcmatins=TPbrcmatin
    TPinputs.TPstemmatins=TPstemmatin
    TPinputs.TPstmpmatins=TPstmpsmatin
    TPinputs.TPgirdmatins=TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut=leginputs.Dleg[-1]				    ###----ALL USER INPUT----###
    TPinputs.tstrut=leginputs.tleg[-1]
    TPinputs.Dgir=Dbrc_hbrc
    TPinputs.tgir=0.0254
    TPinputs.Dbrc=TPinputs.Dgir
    TPinputs.tbrc=TPinputs.tgir
							     ###----ALL USER INPUT----###
    TPinputs.hstump=0.0#1.0
    TPinputs.Dstump=1.2
    TPinputs.tstump=0.04
    TPinputs.stumpndiv=1
    TPinputs.brcndiv=1
    TPinputs.girndiv=1
    TPinputs.strutndiv=1
    TPinputs.stemndiv=1
    TPinputs.nstems=3
    TPinputs.Dstem=np.array([6.]).repeat(TPinputs.nstems)
    TPinputs.tstem=np.array([0.1,0.11,0.11])
    TPinputs.hstem=np.array([6./TPinputs.nstems]).repeat(TPinputs.nstems)
    #______________________________________________#

    #Tower data
    Twrmatin=MatInputs()
    Twrmatin.matname=np.array(['heavysteel'])

    Twrinputs=TwrGeoInputs()
    Twrinputs.Twrmatins=Twrmatin
    #Twrinputs.Htwr=0.  #Trumped by HH
    Twrinputs.Htwr2frac=0.2  #fraction of tower height with constant x-section
    Twrinputs.ndiv=np.array([6,12])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax= 6. #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db=5.6
    Twrinputs.DTRb=130.
    Twrinputs.Dt=0.55*Twrinputs.Db
    Twrinputs.DTRt=150.
        #Set whether or not DTRb and DTRt for the tower are the same. Note if next set to False it will trump DTRt setting above
    Twrinputs.DTRsdiff=False    ##SET THIS TO TRUE IF YOU WANT DTRs to be different between base and top

        #If you use the following 14 lines, The geometry defined above is ignored
    ###ztwr=np.array([  52.   ,   54.522,   57.044,   59.566,   62.088,   64.61 , 67.132,   72.176,   77.22 ,   82.264,   87.308,   92.352, 97.396,  102.44 ,  107.484,  112.528,  117.572,  122.616, 127.66  ]]) -52.
    ###Dtwr=np.array([ 5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.39,  5.18, 4.97,  4.76,  4.55,  4.34,  4.13,  3.92,  3.71,  3.5 ,  3.29, 3.08])
    ###ttwr=np.array([ 0.04307692,  0.04307692,  0.04307692,  0.04307692,  0.04307692, 0.04307692,  0.04307692,  0.04119829,  0.03931966,  0.03744103, 0.03556239,  0.03368376,  0.03180513,  0.0299265 ,  0.02804786, 0.02616923,  0.0242906 ,  0.02241197, 0.02053])
    ###pmtwr=[]  #(3,2) first col z's, second weights
    ####Interpolate data to refine tower discretization
    ###dz=1. #[m] maximum deltaz allowed in discretization
    ###ztwr2=np.linspace(ztwr[0],ztwr[-1],round((ztwr[-1]-ztwr[0])/dz))   #New discretization
    ###Dtwr_interp=interp1d(ztwr,Dtwr)
    ###ttwr_interp=interp1d(ztwr,ttwr)
    ###Twrinputs.ztwr=ztwr2
    ###Twrinputs.Dtwr=Dtwr_interp(ztwr2)
    ###Twrinputs.ttwr=ttwr_interp(ztwr2)
    ###Twrinputs.TwrlumpedMass=np.zeros([pmtwr.shape[0],11])
    ###Twrinputs.TwrlumpedMass[:,0:2]=pmtwr

    TwrRigidTop=True           #False=Account for RNA via math rather than a physical rigidmember
    #______________________________________________#

    #RNA data
    RNAins=RNAprops()
    RNAins.mass=3*350.e3  #[kg]
    RNAins.I[0]=86.579E+6  #[kg m2]
    RNAins.I[1]=53.530E+6  #[kg m2]
    RNAins.I[2]=58.112E+6  #[kg m2]
    RNAins.CMoff[2]=2.34  #[m]
    RNAins.Thoff[2]=RNAins.CMoff[2]  #[m]
    RNAins.yawangle=45.  #angle with respect to global X, CCW looking from above, wind from left
    RNAins.rna_weightM=True
    #______________________________________________#

    #RNA loads              Fx-z,         Mxx-zz
    RNA_F=np.array([1000.e3,0.,0.,0.,0.,0.])   #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)
    #______________________________________________#

    # Frame3DD parameters           									      ###----ALL USER INPUT----###
    FrameAuxIns=Frame3DDaux()
    FrameAuxIns.sh_fg=1               #shear flag-->Timoshenko
    FrameAuxIns.deltaz=5.
    FrameAuxIns.geo_fg=0
    FrameAuxIns.nModes = 6             # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1            # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0               # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9             # mode shape tolerance
    FrameAuxIns.shift = 0.0            # shift value ... for unrestrained structures
    FrameAuxIns.gvector=np.array([0.,0.,-9.8065])    #GRAVITY

        #Decide whether or not to consider DLC 6.1 as well
    twodlcs=False

    #______________________________________________#
    #______________________________________________#

# OTHER AUXILIARY CONSTRAINTS AND TARGETS FOR OPTIMIZATION #
    #______________________________________________#
    #______________________________________________#

    #Set Optimization Bounds and guesses for the various variables:
    #          x=  [ batter,  Dpile,    tpile,        Lp,   Dleg,     tleg,       Dbrc,   tbrc,     Dbrc_mud,   tbrc_mud,   Dgit,      tgir,      Db,   DTRb   Dt,   DTRt   Htwr2fac        dck_widthfact]
    MnCnst = np.array([ 8.,      1.,    1.*0.0254,   20.,   1.,       1.*0.0254,  1.,    1.*0.0254,   1.,     1.*0.0254,      1.,     1.*0.0254,  5.,   120.,  3.,   120.,     0.05,         2.])
    MxCnst = np.array([ 15.,     2.5,   5.*0.0254,   50.,   2.5,      5.*0.0254,  2.,    5.*0.0254,   2.,     5.*0.0254,      2.,     5.*0.0254,  7.,   200.,  4.,   200.,     0.25,         3.])
    guesses= np.array([  10.,    1.5,   1.5*0.0254,  26.,   1.8,     1.5*0.0254,  1.2,   1.5*0.0254,  1.2,    1.5*0.0254,     1.2,    1.5*0.0254, 6.,   140.,  3.5,  150.,     0.2,          2.])

    #SET Maximum Footprint [m]
    mxftprint =30.

    #Set target frequency [Hz] and f0epsilon, i.e. fmax=(1+f0eps)*f0
    f0=0.22
    f0epsilon=0.1

    #Set the minminimum DTR allowed for jacket members; mostly for 60+waterdepths
    jcktDTRmin=22.

   #_____________________________________________________________#
   #________________ DO NOT MODIFY THE FOLLOWING ________________#
   #_____________________________________________________________#

    bounds=np.vstack((MnCnst,MxCnst))
    desvarmeans=np.mean(bounds,1)


    # Now Launch the assembly and pass all of the inputs

    myjckt=set_as_top(JacketSE(Jcktins.clamped,Jcktins.AFflag,twodlcs=twodlcs))
    myjckt.JcktGeoIn=Jcktins
    myjckt.Soilinputs=Soilinputs
    myjckt.Waterinputs=Waterinputs
    myjckt.Windinputs=Windinputs
    myjckt.Pileinputs=Pileinputs
    myjckt.leginputs=leginputs
    myjckt.legbot_stmphin =legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0
    myjckt.Xbrcinputs=Xbrcinputs
    myjckt.Mbrcinputs=Mbrcinputs
    myjckt.Hbrcinputs=Hbrcinputs
    myjckt.TPlumpinputs=TPlumpinputs
    myjckt.TPinputs=TPinputs

    myjckt.Twrinputs=Twrinputs
    myjckt.TwrRigidTop=TwrRigidTop       #Account for RNA via math rather than a physical rigidmember
    myjckt.RNAinputs=RNAins
    myjckt.RNA_F=RNA_F

    myjckt.FrameAuxIns=FrameAuxIns


    return myjckt,f0,f0epsilon,jcktDTRmin,mxftprint,guesses,bounds.T
def main(DesPrms,DesVars): #\
    """Function to Instantiate a JacketSE Assembly with Assigned Design Parameters:
       INPUTS
             DesVars: Class (structure) containing: batter,Dpile,tpile,Lp,Dleg,tleg,Dbrc,tbrc,Dbrc_mud,tbrc_mud,Dgir,tgir,Db,DTRb,Dt,DTRt,Htwr2frac. See JacketOpt_Peregrine.py.
             DesPrms: Class (structure) containing: dck_botz,wdepth,wlevel,Tp50,HW50,HH,U50HH,RNA_F,RNAins, TPlumpmass. See JacketOpt_Peregrine.py.
        """

         #wdepth=wdepth,wlevel=wlevel,): #we call this module with the main optimization parameters

    #______________________________________________#

              # NON-OPTIMIZATION VARIABLES #
    #______________________________________________#

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins=JcktGeoInputs()
    Jcktins.nlegs =4
    Jcktins.nbays =DesPrms.nbays
    Jcktins.batter=DesVars.batter
    Jcktins.dck_width=DesVars.dck_widthfact*DesVars.Db
    Jcktins.dck_botz =DesPrms.dck_botz
    Jcktins.weld2D   =0.5
    Jcktins.VPFlag= True    #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped= False #False    #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.

    #The following is a passthrough variables
    legbot_stmphin =1.5  #Distance from bottom of leg to second joint along z; must be>0

    #______________________________________________#
    #Soil inputs
    Soilinputs=SoilGeoInputs()							 ###----ALL USER INPUT----###
    Soilinputs.zbots   =-np.array([3.,5.,7.,15.,30.,50.])
    Soilinputs.gammas  =np.array([10000.,10000.,10000.,10000.,10000.,10000.])
    Soilinputs.cus     =np.array([60000.,60000.,60000.,60000.,60000.,60000.])
    Soilinputs.phis    =np.array([36.,33.,26.,37.,35.,37.5])#np.array([26.,26.,26.,26.,26.,26])#np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta   =25.
    Soilinputs.sndflg   =True
    Soilinputs.SoilSF   =1.25 #Safety factor for Lp and stiffness from soil
    Soilinputs.PenderSwtch   =False #True

    #______________________________________________#
    #Water and wind inputs
    Waterinputs=WaterInputs()					      ###----ALL USER INPUT----###
    Waterinputs.wdepth   =DesPrms.wdepth
    Waterinputs.wlevel   =DesPrms.wdepth #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T=        DesPrms.Tp50  #Wave Period
    Waterinputs.HW=       DesPrms.HW50 #Wave Height: peak-to-peak for Andrew's load routine, 0.5*peak-to-peak for mine in case I activate.
    Waterinputs.Cd=3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm=8.#2.  #ADded mass Coefficient

    Windinputs=WindInputs()
    Windinputs.HH=    DesPrms.HH #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH=DesPrms.U50HH #20.  # Since we are assuming operational conditions, pick a wind speed near rated
    Windinputs.Cdj=4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt=2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#
    #RNA loads              Fx-z,         Mxx-zz
    RNA_F=DesPrms.RNA_F    #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)

    #Torque at rated with 95% efficiency generator: +12564863.93   Nm

    #______________________________________________#
    #RNA Properties
    RNAins=RNAprops()						    ###----ALL USER INPUT----###
    RNAins.mass=DesPrms.RNAins.mass
    RNAins.Ixx=DesPrms.RNAins.Ixx    #249.667E+6           #
    RNAins.Iyy=DesPrms.RNAins.Iyy    #169.667E+6         #
    RNAins.Izz=DesPrms.RNAins.Izz   #162.200E+6          #
    RNAins.CMzoff=DesPrms.RNAins.CMzoff
    RNAins.CMxoff=DesPrms.RNAins.CMxoff#positive means downwind  -4.95#
    RNAins.Thzoff=DesPrms.RNAins.Thzoff  #From UHreact Excel

    RNAins.yawangle=45.
    TwrRigidTop=True #False       #False=Account for RNA via math rather than a physical rigidmember


    #______________________________________________#
    #TP mass data
    TPlumpinputs=TPlumpMass()						      ###----ALL USER INPUT----###
    TPlumpinputs.mass=DesPrms.TPlumpmass#0. #200.e3 #[kg]
    #______________________________________________#
									      ###----ALL USER INPUT----###
    # Frame3DD parameters
    FrameAuxIns=Frame3DDaux()
    FrameAuxIns.sh_fg=1               #shear flag-->Timoshenko
    FrameAuxIns.deltaz=5.
    FrameAuxIns.geo_fg=0
    FrameAuxIns.nModes = 6             # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1            # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0               # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9             # mode shape tolerance
    FrameAuxIns.shift = 0.0            # shift value ... for unrestrained structures
    FrameAuxIns.gvector=np.array([0.,0.,9.8065])    #GRAVITY



    #______________________________________________#

              # OPTIMIZATION VARIABLES #
              #Note: materials are fixed
    #______________________________________________#

    #Legs Data
    legmatin=MatInputs()
    legmatin.matname=(['heavysteel','heavysteel','heavysteel','heavysteel'])
    Dleg=np.asarray([DesVars.Dleg]).repeat(Jcktins.nbays+1)                      #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg=np.asarray([DesVars.tleg]).repeat(Jcktins.nbays+1)

    leginputs=LegGeoInputs()
    leginputs.legZbot   = 0.0		 ###----USER INPUT----###
    leginputs.ndiv=DesPrms.legndiv			 ###----USER INPUT----###
    leginputs.legmatins=legmatin
    leginputs.Dleg=Dleg
    leginputs.tleg=tleg


    #Xbrc data
    Xbrcmatin=MatInputs()
    Xbrcmatin.matname=np.array(['heavysteel']).repeat(Jcktins.nbays)
    Dbrc=np.asarray([DesVars.Dbrc]).repeat(Jcktins.nbays)#np.array([1.,1.,0.8,0.8])
    tbrc=np.asarray([DesVars.tbrc]).repeat(Jcktins.nbays)

    Xbrcinputs=XBrcGeoInputs()
    Xbrcinputs.Dbrc=Dbrc
    Xbrcinputs.tbrc=tbrc
    Xbrcinputs.ndiv=1				 ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins=Xbrcmatin
    Xbrcinputs.precalc=False   #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten


    #Mbrc data
    Mbrcmatin=MatInputs()
    Mbrcmatin.matname=np.array(['heavysteel'])

    Mbrcinputs=MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud=DesVars.Dbrc_mud
    Mbrcinputs.tbrc_mud=DesVars.tbrc_mud
    Mbrcinputs.ndiv=2					    ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins=Mbrcmatin
    Mbrcinputs.precalc=False   #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten


    #Hbrc data
    Hbrcmatin=MatInputs()
    Hbrcmatin.matname=np.array(['heavysteel'])
    Dbrc_hbrc=1.1				           ###----USER INPUT----###

    Hbrcinputs=HBrcGeoInputs()
    Hbrcinputs.Dbrch=Dbrc_hbrc					   ###----USER INPUT----###
    Hbrcinputs.ndiv=0#2
    Hbrcinputs.Hbrcmatins=Hbrcmatin
    Hbrcinputs.precalc=True   #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten


    #TP data
    TPstrtmatin=MatInputs()
    TPstmpsmatin=MatInputs()
    TPgirdmatin=MatInputs()
    TPbrcmatin=MatInputs()
    TPstemmatin=MatInputs()
    TPstmpsmatin.matname=np.array(['heavysteel'])
    TPbrcmatin.matname=np.array(['heavysteel'])
    TPgirdmatin.matname=np.array(['heavysteel'])
    TPstemmatin.matname=np.array(['heavysteel']).repeat(2) ###----ALL USER INPUT----###

    TPinputs=TPGeoInputs()
    TPinputs.TPstrtmatins=TPstrtmatin
    TPinputs.TPbrcmatins=TPbrcmatin
    TPinputs.TPstemmatins=TPstemmatin
    TPinputs.TPstmpmatins=TPstmpsmatin
    TPinputs.TPgirdmatins=TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut=DesVars.Dleg				    ###----ALL USER INPUT----###
    TPinputs.tstrut=DesVars.Dleg
    TPinputs.Dgir=DesVars.Dgir
    TPinputs.tgir=DesVars.tgir
    TPinputs.Dbrc=TPinputs.Dgir
    TPinputs.tbrc=TPinputs.tgir
							     ###----ALL USER INPUT----###
    TPinputs.hstump=0.0#1.0
    TPinputs.stumpndiv=1
    TPinputs.brcndiv=1
    TPinputs.girndiv=1
    TPinputs.strutndiv=1
    TPinputs.stemndiv=1
    TPinputs.nstems=3
    TPinputs.Dstem=np.array([DesVars.Db]).repeat(TPinputs.nstems)
    TPinputs.tstem=1.5*np.array([DesVars.Db/DesVars.DTRb]).repeat(TPinputs.nstems)
    TPinputs.hstem=np.array([6./TPinputs.nstems]).repeat(TPinputs.nstems)

    #Pile data
    Pilematin=MatInputs()
    Pilematin.matname=np.array(['heavysteel'])

    Pileinputs=PileGeoInputs()
    Pileinputs.Pilematins=Pilematin
    Pileinputs.ndiv=0 #3			   ###----USER INPUT----###
    Pileinputs.Dpile=DesVars.Dpile
    Pileinputs.tpile=DesVars.tpile
    Pileinputs.AFflag=False			   ###----USER INPUT----###
    Pileinputs.Lp=DesVars.Lp #[m] Embedment length



    #Tower data
    Twrmatin=MatInputs()
    Twrmatin.matname=np.array(['heavysteel'])

    Twrinputs=TwrGeoInputs()
    Twrinputs.Twrmatins=Twrmatin
    #Twrinputs.Htwr=0.  #Trumped by HH
    Twrinputs.Htwr2frac=DesVars.Htwr2frac   #fraction of tower height with constant x-section
    Twrinputs.ndiv=np.array([6,12])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax= 6. #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db=DesVars.Db
    Twrinputs.DTRb=DesVars.DTRb
    Twrinputs.Dt=DesVars.Dt
    Twrinputs.DTRt=DesVars.DTRt


    # Now Launch the assembly and pass all of the inputs

    myjckt=set_as_top(JacketAsmly())

    myjckt.JcktGeoIn=Jcktins

    myjckt.Soilinputs=Soilinputs
    myjckt.Waterinputs=Waterinputs
    myjckt.Windinputs=Windinputs

    myjckt.RNAinputs=RNAins
    myjckt.TwrRigidTop=TwrRigidTop       #Account for RNA via math rather than a physical rigidmember
    myjckt.RNA_F=RNA_F

    myjckt.leginputs=leginputs
        #The following is a passthrough variables
    myjckt.legbot_stmphin =legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0

    myjckt.Xbrcinputs=Xbrcinputs
    myjckt.Mbrcinputs=Mbrcinputs

    myjckt.Hbrcinputs=Hbrcinputs
    myjckt.TPlumpinputs=TPlumpinputs

    myjckt.PrebuildTP=True				###----USER INPUT----###
    myjckt.PreBuildTPLvl=5                 ###----USER INPUT----###

    myjckt.TPinputs=TPinputs
    myjckt.Pileinputs=Pileinputs
    myjckt.Twrinputs=Twrinputs
    myjckt.FrameAuxIns=FrameAuxIns

    return myjckt
Exemplo n.º 7
0
def main():  #\
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_Py&MDAOopt.py for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_Py&MDAOopt.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins = JcktGeoInputs()

    Jcktins.nlegs = 4
    Jcktins.nbays = 5
    Jcktins.batter = 12.
    Jcktins.dck_botz = 16.
    Jcktins.dck_width = 2 * 6.
    Jcktins.weld2D = 0.5
    Jcktins.VPFlag = True  #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped = False  #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  #whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 5  #if >0, the TP is prebuilt according to rules per PreBuildTP

    #______________________________________________#

    #Soil inputs
    Soilinputs = SoilGeoInputs()
    Soilinputs.zbots = -np.array([3., 5., 7., 15., 30., 50.])
    Soilinputs.gammas = np.array(
        [10000., 10000., 10000., 10000., 10000., 10000.])
    Soilinputs.cus = np.array([60000., 60000., 60000., 60000., 60000., 60000.])
    Soilinputs.phis = np.array(
        [26., 26., 26., 26., 26., 26]
    )  #np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta = 25.
    Soilinputs.sndflg = True
    Soilinputs.PenderSwtch = False  #True
    Soilinputs.SoilSF = 1.
    #______________________________________________#

    #Water and wind inputs
    Waterinputs = WaterInputs()
    Waterinputs.wdepth = 30.
    Waterinputs.wlevel = 30.  #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T = 12.  #Wave Period
    Waterinputs.HW = 10.  #Wave Height
    Waterinputs.Cd = 3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm = 8.  #2.  #ADded mass Coefficient

    Windinputs = WindInputs()
    Windinputs.HH = 100.  #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH = 30.  #assumed gust speed
    Windinputs.Cdj = 4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt = 2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#

    #Pile data
    Pilematin = MatInputs()
    Pilematin.matname = np.array(['heavysteel'])

    Pileinputs = PileGeoInputs()
    Pileinputs.Pilematins = Pilematin
    Pileinputs.ndiv = 0  #3			   ###----USER INPUT----###
    Pileinputs.Dpile = 2.5
    Pileinputs.tpile = 0.0254
    Pileinputs.Lp = 20.  #[m] Embedment length
    #______________________________________________#

    #Legs data
    legmatin = MatInputs()
    legmatin.matname = ([
        'heavysteel', 'heavysteel', 'heavysteel', 'heavysteel'
    ])
    Dleg = np.asarray([1.5]).repeat(Jcktins.nbays +
                                    1)  #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg = np.asarray([1.5 * 0.0254]).repeat(Jcktins.nbays + 1)

    leginputs = LegGeoInputs()
    leginputs.legZbot = 1.0  ###----USER INPUT----###
    leginputs.ndiv = 1  ###----USER INPUT----###
    leginputs.legmatins = legmatin
    leginputs.Dleg0 = Dleg[0]  #For optimization we just pass 1st value
    leginputs.tleg0 = tleg[0]  #For optimization we just pass 1st value

    #The following is a passthrough variables
    legbot_stmphin = 1.5  #Distance from bottom of leg to second joint along z; must be>0
    #______________________________________________#

    #Xbrc data
    Xbrcmatin = MatInputs()
    Xbrcmatin.matname = np.array(['heavysteel']).repeat(Jcktins.nbays)
    Dbrc = np.asarray([1.]).repeat(Jcktins.nbays)  #np.array([1.,1.,0.8,0.8])
    tbrc = np.asarray([0.0254]).repeat(Jcktins.nbays)

    Xbrcinputs = XBrcGeoInputs()
    Xbrcinputs.Dbrc0 = Dbrc[0]  #For optimization we just pass 1st value
    Xbrcinputs.tbrc0 = tbrc[0]  #For optimization we just pass 1st value
    Xbrcinputs.ndiv = 1  ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins = Xbrcmatin
    Xbrcinputs.precalc = False  #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    #______________________________________________#

    #Mbrc data
    Mbrcmatin = MatInputs()
    Mbrcmatin.matname = np.array(['heavysteel'])

    Mbrcinputs = MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud = 1.5  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud = 1.5 * 0.0254
    Mbrcinputs.ndiv = 2  ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins = Mbrcmatin
    Mbrcinputs.precalc = False  #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    #______________________________________________#

    #Hbrc data
    Hbrcmatin = MatInputs()
    Hbrcmatin.matname = np.array(['heavysteel'])
    Dbrc_hbrc = 1.1  ###----USER INPUT----###

    Hbrcinputs = HBrcGeoInputs()
    Hbrcinputs.Dbrch = Dbrc_hbrc  ###----USER INPUT----###
    Hbrcinputs.ndiv = 0  #2
    Hbrcinputs.Hbrcmatins = Hbrcmatin
    Hbrcinputs.precalc = True  #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    #______________________________________________#

    #TP data

    #Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    #TP lumped mass data
    TPlumpinputs = TPlumpMass()  ###----ALL USER INPUT----###
    TPlumpinputs.mass = 200.e3  #[kg]
    TPlumpinputs.CMoff = np.zeros(3)
    TPlumpinputs.I = np.zeros(
        6
    )  #Note that the code will assume the mass distributed at the corners of the TP for Ixx,Iyy,Izz purposes

    TPstrtmatin = MatInputs()
    TPstmpsmatin = MatInputs()
    TPgirdmatin = MatInputs()
    TPbrcmatin = MatInputs()
    TPstemmatin = MatInputs()
    TPstmpsmatin.matname = np.array(['heavysteel'])
    TPstrtmatin.matname = np.array(['heavysteel'])
    TPbrcmatin.matname = np.array(['heavysteel'])
    TPgirdmatin.matname = np.array(['heavysteel'])
    TPstemmatin.matname = np.array(['heavysteel'
                                    ]).repeat(2)  ###----ALL USER INPUT----###

    TPinputs = TPGeoInputs()
    TPinputs.TPstrtmatins = TPstrtmatin
    TPinputs.TPbrcmatins = TPbrcmatin
    TPinputs.TPstemmatins = TPstemmatin
    TPinputs.TPstmpmatins = TPstmpsmatin
    TPinputs.TPgirdmatins = TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut = leginputs.Dleg[-1]  ###----ALL USER INPUT----###
    TPinputs.tstrut = leginputs.tleg[-1]
    TPinputs.Dgir = Dbrc_hbrc
    TPinputs.tgir = 0.0254
    TPinputs.Dbrc = TPinputs.Dgir
    TPinputs.tbrc = TPinputs.tgir
    ###----ALL USER INPUT----###
    TPinputs.hstump = 0.0  #1.0
    TPinputs.Dstump = 1.2
    TPinputs.tstump = 0.04
    TPinputs.stumpndiv = 1
    TPinputs.brcndiv = 1
    TPinputs.girndiv = 1
    TPinputs.strutndiv = 1
    TPinputs.stemndiv = 1
    TPinputs.nstems = 3
    TPinputs.Dstem = np.array([6.]).repeat(TPinputs.nstems)
    TPinputs.tstem = np.array([0.1, 0.11, 0.11])
    TPinputs.hstem = np.array([6. / TPinputs.nstems]).repeat(TPinputs.nstems)
    #______________________________________________#

    #Tower data
    Twrmatin = MatInputs()
    Twrmatin.matname = np.array(['heavysteel'])

    Twrinputs = TwrGeoInputs()
    Twrinputs.Twrmatins = Twrmatin
    #Twrinputs.Htwr=0.  #Trumped by HH
    Twrinputs.Htwr2frac = 0.2  #fraction of tower height with constant x-section
    Twrinputs.ndiv = np.array([
        6, 12
    ])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax = 6.  #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db = 5.6
    Twrinputs.DTRb = 130.
    Twrinputs.Dt = 0.55 * Twrinputs.Db
    Twrinputs.DTRt = 150.
    #Set whether or not DTRb and DTRt for the tower are the same. Note if next set to False it will trump DTRt setting above
    Twrinputs.DTRsdiff = False  ##SET THIS TO TRUE IF YOU WANT DTRs to be different between base and top

    #If you use the following 14 lines, The geometry defined above is ignored
    ###ztwr=np.array([  52.   ,   54.522,   57.044,   59.566,   62.088,   64.61 , 67.132,   72.176,   77.22 ,   82.264,   87.308,   92.352, 97.396,  102.44 ,  107.484,  112.528,  117.572,  122.616, 127.66  ]]) -52.
    ###Dtwr=np.array([ 5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.6 ,  5.39,  5.18, 4.97,  4.76,  4.55,  4.34,  4.13,  3.92,  3.71,  3.5 ,  3.29, 3.08])
    ###ttwr=np.array([ 0.04307692,  0.04307692,  0.04307692,  0.04307692,  0.04307692, 0.04307692,  0.04307692,  0.04119829,  0.03931966,  0.03744103, 0.03556239,  0.03368376,  0.03180513,  0.0299265 ,  0.02804786, 0.02616923,  0.0242906 ,  0.02241197, 0.02053])
    ###pmtwr=[]  #(3,2) first col z's, second weights
    ####Interpolate data to refine tower discretization
    ###dz=1. #[m] maximum deltaz allowed in discretization
    ###ztwr2=np.linspace(ztwr[0],ztwr[-1],round((ztwr[-1]-ztwr[0])/dz))   #New discretization
    ###Dtwr_interp=interp1d(ztwr,Dtwr)
    ###ttwr_interp=interp1d(ztwr,ttwr)
    ###Twrinputs.ztwr=ztwr2
    ###Twrinputs.Dtwr=Dtwr_interp(ztwr2)
    ###Twrinputs.ttwr=ttwr_interp(ztwr2)
    ###Twrinputs.TwrlumpedMass=np.zeros([pmtwr.shape[0],11])
    ###Twrinputs.TwrlumpedMass[:,0:2]=pmtwr

    TwrRigidTop = True  #False=Account for RNA via math rather than a physical rigidmember
    #______________________________________________#

    #RNA data
    RNAins = RNAprops()
    RNAins.mass = 3 * 350.e3  #[kg]
    RNAins.I[0] = 86.579E+6  #[kg m2]
    RNAins.I[1] = 53.530E+6  #[kg m2]
    RNAins.I[2] = 58.112E+6  #[kg m2]
    RNAins.CMoff[2] = 2.34  #[m]
    RNAins.Thoff[2] = RNAins.CMoff[2]  #[m]
    RNAins.yawangle = 45.  #angle with respect to global X, CCW looking from above, wind from left
    RNAins.rna_weightM = True
    #______________________________________________#

    #RNA loads              Fx-z,         Mxx-zz
    RNA_F = np.array(
        [1000.e3, 0., 0., 0., 0., 0.]
    )  #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)
    #______________________________________________#

    # Frame3DD parameters           									      ###----ALL USER INPUT----###
    FrameAuxIns = Frame3DDaux()
    FrameAuxIns.sh_fg = 1  #shear flag-->Timoshenko
    FrameAuxIns.deltaz = 5.
    FrameAuxIns.geo_fg = 0
    FrameAuxIns.nModes = 6  # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1  # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0  # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9  # mode shape tolerance
    FrameAuxIns.shift = 0.0  # shift value ... for unrestrained structures
    FrameAuxIns.gvector = np.array([0., 0., -9.8065])  #GRAVITY

    #Decide whether or not to consider DLC 6.1 as well
    twodlcs = False

    #______________________________________________#
    #______________________________________________#

    # OTHER AUXILIARY CONSTRAINTS AND TARGETS FOR OPTIMIZATION #
    #______________________________________________#
    #______________________________________________#

    #Set Optimization Bounds and guesses for the various variables:
    #          x=  [ batter,  Dpile,    tpile,        Lp,   Dleg,     tleg,       Dbrc,   tbrc,     Dbrc_mud,   tbrc_mud,   Dgit,      tgir,      Db,   DTRb   Dt,   DTRt   Htwr2fac        dck_widthfact]
    MnCnst = np.array([
        8., 1., 1. * 0.0254, 20., 1., 1. * 0.0254, 1., 1. * 0.0254, 1.,
        1. * 0.0254, 1., 1. * 0.0254, 5., 120., 3., 120., 0.05, 2.
    ])
    MxCnst = np.array([
        15., 2.5, 5. * 0.0254, 50., 2.5, 5. * 0.0254, 2., 5. * 0.0254, 2.,
        5. * 0.0254, 2., 5. * 0.0254, 7., 200., 4., 200., 0.25, 3.
    ])
    guesses = np.array([
        10., 1.5, 1.5 * 0.0254, 26., 1.8, 1.5 * 0.0254, 1.2, 1.5 * 0.0254, 1.2,
        1.5 * 0.0254, 1.2, 1.5 * 0.0254, 6., 140., 3.5, 150., 0.2, 2.
    ])

    #SET Maximum Footprint [m]
    mxftprint = 30.

    #Set target frequency [Hz] and f0epsilon, i.e. fmax=(1+f0eps)*f0
    f0 = 0.22
    f0epsilon = 0.1

    #Set the minminimum DTR allowed for jacket members; mostly for 60+waterdepths
    jcktDTRmin = 22.

    #_____________________________________________________________#
    #________________ DO NOT MODIFY THE FOLLOWING ________________#
    #_____________________________________________________________#

    bounds = np.vstack((MnCnst, MxCnst))
    desvarmeans = np.mean(bounds, 1)

    # Now Launch the assembly and pass all of the inputs

    myjckt = set_as_top(
        JacketSE(Jcktins.clamped, Jcktins.AFflag, twodlcs=twodlcs))
    myjckt.JcktGeoIn = Jcktins
    myjckt.Soilinputs = Soilinputs
    myjckt.Waterinputs = Waterinputs
    myjckt.Windinputs = Windinputs
    myjckt.Pileinputs = Pileinputs
    myjckt.leginputs = leginputs
    myjckt.legbot_stmphin = legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0
    myjckt.Xbrcinputs = Xbrcinputs
    myjckt.Mbrcinputs = Mbrcinputs
    myjckt.Hbrcinputs = Hbrcinputs
    myjckt.TPlumpinputs = TPlumpinputs
    myjckt.TPinputs = TPinputs

    myjckt.Twrinputs = Twrinputs
    myjckt.TwrRigidTop = TwrRigidTop  #Account for RNA via math rather than a physical rigidmember
    myjckt.RNAinputs = RNAins
    myjckt.RNA_F = RNA_F

    myjckt.FrameAuxIns = FrameAuxIns

    return myjckt, f0, f0epsilon, jcktDTRmin, mxftprint, guesses, bounds.T
Exemplo n.º 8
0
def main():  #\
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_PyOPT for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             DTRsdiff    -Boolean,     Set this to True if DTRs are to be different between base and top. \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_PyOPT.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins = JcktGeoInputs()

    Jcktins.nlegs = 4
    Jcktins.nbays = 4
    Jcktins.batter = 30.5495  #=(-43.127+24.614)/(5.939-5.333)
    Jcktins.dck_botz = 15.651
    Jcktins.dck_width = 8. + 1.2
    Jcktins.weld2D = 0.
    Jcktins.VPFlag = True  #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped = True  #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  #whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 0  #if >0, the TP is prebuilt according to rules per PreBuildTP

    #______________________________________________#

    #Soil inputs
    Soilinputs = SoilGeoInputs()
    Soilinputs.zbots = -np.array([3., 5., 7., 15., 30., 50.])
    Soilinputs.gammas = np.array(
        [10000., 10000., 10000., 10000., 10000., 10000.])
    Soilinputs.cus = np.array([60000., 60000., 60000., 60000., 60000., 60000.])
    Soilinputs.phis = np.array(
        [26., 26., 26., 26., 26., 26]
    )  #np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta = 25.
    Soilinputs.sndflg = True
    Soilinputs.PenderSwtch = False  #True
    Soilinputs.SoilSF = 1.
    #______________________________________________#

    #Water and wind inputs
    Waterinputs = WaterInputs()
    Waterinputs.wdepth = 50.
    Waterinputs.wlevel = 50.  #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T = 12.  #Wave Period
    Waterinputs.HW = 10.  #Wave Height
    Waterinputs.Cd = 3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm = 8.  #2.  #ADded mass Coefficient

    Windinputs = WindInputs()
    Windinputs.HH = 88.15 + 2.4  #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH = 30.  #assumed gust speed
    Windinputs.Cdj = 4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt = 2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#

    #Pile data
    Pilematin = MatInputs()
    Pilematin.matname = np.array(['RC'])
    Pilematin.E = np.array([2.1e11])
    Pilematin.G = np.array([8.07690e+10])
    Pilematin.rho = np.array(
        [3339.12]
    ) * 34274.82 / 36876.  #From Test04.txt in SD, to check with official FAST certtest

    Pileinputs = PileGeoInputs()
    Pileinputs.Pilematins = Pilematin
    Pileinputs.ndiv = 1  #3			   ###----USER INPUT----###
    Pileinputs.Dpile = 2.082
    Pileinputs.tpile = 0.491
    Pileinputs.AFflag = False  ###----USER INPUT----###
    Pileinputs.Lp = 0.  #[m] Embedment length
    #______________________________________________#

    #Legs data
    legmatin = MatInputs()
    legmatin.matname = (['steel'])
    legmatin.rho = np.array([7850.])
    Dleg = np.asarray([1.2]).repeat(Jcktins.nbays +
                                    1)  #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg = np.asarray([0.05, 0.05, 0.035, 0.035, 0.035])

    leginputs = LegGeoInputs()
    leginputs.legZbot = 4.5  ###----USER INPUT----###
    leginputs.ndiv = 1  ###----USER INPUT----###
    leginputs.legmatins = legmatin
    leginputs.Dleg = Dleg
    leginputs.tleg = tleg

    #The following is a passthrough variables
    legbot_stmphin = (
        45.5 - 43.127
    )  #=2.373 Distance from bottom of leg to second joint along z; must be>0
    #______________________________________________#

    #Xbrc data
    Xbrcmatin = MatInputs()
    Xbrcmatin.matname = np.array(['steel']).repeat(Jcktins.nbays)
    Xbrcmatin.rho = np.array([7850.])

    Dbrc = np.asarray([0.8]).repeat(Jcktins.nbays)
    tbrc = np.asarray([0.02]).repeat(Jcktins.nbays)

    Xbrcinputs = XBrcGeoInputs()
    Xbrcinputs.Dbrc = Dbrc
    Xbrcinputs.tbrc = tbrc
    Xbrcinputs.ndiv = 1  ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins = Xbrcmatin
    Xbrcinputs.precalc = False  #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    #______________________________________________#

    #Mbrc data
    Mbrcmatin = MatInputs()
    Mbrcmatin.matname = np.array(['steel'])
    Mbrcmatin.rho = np.array([7850.])

    Mbrcinputs = MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud = 0.8  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud = 0.02
    Mbrcinputs.ndiv = 2  ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins = Mbrcmatin
    Mbrcinputs.precalc = False  #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    #______________________________________________#

    #Hbrc data
    Hbrcmatin = MatInputs()
    Hbrcmatin.matname = np.array(['steel'])
    Hbrcmatin.rho = np.array([7850.])
    Dbrc_hbrc = 1.1  ###----USER INPUT----###

    Hbrcinputs = HBrcGeoInputs()
    Hbrcinputs.Dbrch = Dbrc_hbrc  ###----USER INPUT----###
    Hbrcinputs.ndiv = 0
    Hbrcinputs.Hbrcmatins = Hbrcmatin
    Hbrcinputs.precalc = True  #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    #______________________________________________#

    #TP data

    #Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    #TP lumped mass data
    TPlumpinputs = TPlumpMass()  ###----ALL USER INPUT----###
    TPlumpinputs.mass = 666.e3  #-98385.33+( 7850.*4*np.pi/4.*(1.2**2-(1.2-2.*0.04)**2)*4)  #[kg]  TO MODIFY AFTER WE ASSESS OVERALL TP MASS, to be reduced for the steel weight
    TPlumpinputs.CMoff = np.array([
        0., 0., 2.
    ])  #CG of concrete block is 2 m above intersection of diagonal braces
    TPlumpinputs.I = 1. / 12 * TPlumpinputs.mass * np.array(
        [8.**2 + 4.**2, 8.**2 + 4.**2, 8.**2 + 8.**2, 0., 0., 0.])

    TPstrtmatin = MatInputs()
    TPstmpsmatin = MatInputs()
    TPgirdmatin = MatInputs()
    TPbrcmatin = MatInputs()
    TPstemmatin = MatInputs()
    TPstmpsmatin.matname = np.array(['steel'])
    TPstmpsmatin.rho = np.array([7850.])

    TPstrtmatin.matname = np.array(['steel'])
    TPstrtmatin.rho = np.array([1350.])
    TPbrcmatin.matname = np.array(['steel'])
    TPbrcmatin.rho = np.array(
        [1350.]
    )  #np.array([7850.]) tpstrucmass=np.pi/4*(1.2**2-(1.2-2*0.04)**2)*7850*4*4 7850.*tpstrucmass/myjckt.TP.TPouts.mass=1462.185
    TPgirdmatin.matname = np.array(['steel'])
    TPgirdmatin.rho = np.array([1350.])
    TPstemmatin.matname = np.array(['steel'
                                    ]).repeat(2)  ###----ALL USER INPUT----###
    TPstemmatin.rho = np.array([1350.])

    TPinputs = TPGeoInputs()
    TPinputs.TPstrtmatins = TPstrtmatin
    TPinputs.TPbrcmatins = TPbrcmatin
    TPinputs.TPstemmatins = TPstemmatin
    TPinputs.TPstmpmatins = TPstmpsmatin
    TPinputs.TPgirdmatins = TPgirdmatin

    #Set TP dimensions as leg and brace dimensions
    TPinputs.Dstrut = 1.2  ###----ALL USER INPUT----###
    TPinputs.tstrut = 0.04
    TPinputs.Dgir = TPinputs.Dstrut
    TPinputs.tgir = TPinputs.tstrut
    TPinputs.Dbrc = TPinputs.Dstrut
    TPinputs.tbrc = TPinputs.tstrut
    ###----ALL USER INPUT----###
    TPinputs.hstump = 0.499  #(16.15-15.651)
    TPinputs.Dstump = 1.2
    TPinputs.tstump = 0.04

    TPinputs.stumpndiv = 1
    TPinputs.brcndiv = 1
    TPinputs.girndiv = 1
    TPinputs.strutndiv = 1
    TPinputs.stemndiv = 1
    TPinputs.nstems = 3
    TPinputs.Dstem = np.array([5.6]).repeat(TPinputs.nstems)
    TPinputs.tstem = np.array([0.032, 0.032, 0.032])
    TPinputs.hstem = np.array([(4.) / TPinputs.nstems]).repeat(TPinputs.nstems)
    #______________________________________________#

    #Tower data
    Twrmatin = MatInputs()
    Twrmatin.matname = np.array(['steel'])
    Twrmatin.rho = np.array([7850.])

    Twrinputs = TwrGeoInputs()
    Twrinputs.Twrmatins = Twrmatin
    #Twrinputs.Htwr=88.15  #Trumped by HH
    Twrinputs.Htwr2frac = 1. / 88.15  #fraction of tower height with constant x-section
    Twrinputs.ndiv = np.array([
        1, 1
    ])  #ndiv for uniform and tapered section			   ###----USER INPUT----###
    Twrinputs.DeltaZmax = 5.  #[m], maximum FE element length allowed in the tower members (i.e. the uniform and the tapered members)
    Twrinputs.Db = 5.6
    Twrinputs.DTRb = Twrinputs.Db / 0.032
    Twrinputs.Dt = 4.
    Twrinputs.DTRt = Twrinputs.Dt / 0.03

    #If you use the following 12 lines, The geometry defined above is ignored
    ztwr = np.array([
        20.15, 21.15, 32.15, 42.15, 54.15, 64.15, 74.15, 83.15, 88.15
    ]) - 20.15
    Dtwr = np.array([5.6, 5.577, 5.318, 5.082, 4.8, 4.565, 4.329, 4.118, 4])
    ttwr = np.array(
        [0.032, 0.032, 0.03, 0.028, 0.024, 0.022, 0.02, 0.03, 0.03])
    pmtwr = np.array(
        [np.array([20.15, 54.15, 88.15]) - 20.15,
         [1.9e3, 1.4e3, 1.0e3]]).T  #(3,2) first col z's, second weights
    #Interpolate data to refine tower discretization
    dz = 1.  #[m] maximum deltaz allowed in discretization
    ztwr2 = np.linspace(ztwr[0], ztwr[-1], round(
        (ztwr[-1] - ztwr[0]) / dz))  #New discretization
    Dtwr_interp = interp1d(ztwr, Dtwr)
    ttwr_interp = interp1d(ztwr, ttwr)
    Twrinputs.ztwr = ztwr2
    Twrinputs.Dtwr = Dtwr_interp(ztwr2)
    Twrinputs.ttwr = ttwr_interp(ztwr2)
    Twrinputs.TwrlumpedMass = np.zeros([pmtwr.shape[0], 11])
    Twrinputs.TwrlumpedMass[:, 0:2] = pmtwr

    TwrRigidTop = False  #False=Account for RNA via math rather than a physical rigidmember
    #______________________________________________#

    #RNA data
    RNAins = RNAprops()
    RNAins.mass = 350.e3  #[kg]
    RNAins.I[0] = 86.579E+6  #[kg m2]
    RNAins.I[1] = 53.530E+6  #[kg m2]
    RNAins.I[2] = 58.112E+6  #[kg m2]
    RNAins.CMoff[2] = 2.34  #[m]
    RNAins.Thoff[2] = 2.4  #[m]
    RNAins.yawangle = 45.  #angle with respect to global X, CCW looking from above, wind from left
    RNAins.rna_weightM = True
    #______________________________________________#

    #RNA loads              Fx-z,         Mxx-zz
    RNA_F = np.array(
        [1000.e3, 0., 0., 0., 0., 0.]
    )  #unfactored thrust, though accounting for gust and dynamic effects (no IEC PSF though)
    #______________________________________________#

    # Frame3DD parameters           									      ###----ALL USER INPUT----###
    FrameAuxIns = Frame3DDaux()
    FrameAuxIns.sh_fg = 1  #shear flag-->Timoshenko
    FrameAuxIns.deltaz = 5.
    FrameAuxIns.geo_fg = 0
    FrameAuxIns.nModes = 6  # number of desired dynamic modes of vibration
    FrameAuxIns.Mmethod = 1  # 1: subspace Jacobi     2: Stodola
    FrameAuxIns.lump = 0  # 0: consistent mass ... 1: lumped mass matrix
    FrameAuxIns.tol = 1e-9  # mode shape tolerance
    FrameAuxIns.shift = 0.0  # shift value ... for unrestrained structures
    FrameAuxIns.gvector = np.array([0., 0., -9.8065])  #GRAVITY
    #______________________________________________#
    #______________________________________________#

    # OTHER AUXILIARY CONSTRAINTS AND TARGETS FOR OPTIMIZATION #
    #______________________________________________#
    #______________________________________________#

    #Set Optimization Bounds and guesses for the various variables:
    #          x=  [ batter,  Dpile,    tpile,        Lp,   Dleg,     tleg,       Dbrc,   tbrc,     Dbrc_mud,   tbrc_mud,   Dgit,      tgir,      Db,   DTRb   Dt,   DTRt   Htwr2fac        dck_widthfact]
    MnCnst = np.array([
        8., 1., 1. * 0.0254, 20., 1., 1. * 0.0254, 1., 1. * 0.0254, 1.,
        1. * 0.0254, 1., 1. * 0.0254, 5., 120., 3., 120., 0.05, 2.
    ])
    MxCnst = np.array([
        15., 2.5, 5. * 0.0254, 50., 2.5, 5. * 0.0254, 2., 5. * 0.0254, 2.,
        5. * 0.0254, 2., 5. * 0.0254, 7., 200., 4., 200., 0.25, 3.
    ])
    guesses = np.array([
        10., 1.5, 1.5 * 0.0254, 26., 1.8, 1.5 * 0.0254, 1.2, 1.5 * 0.0254, 1.2,
        1.5 * 0.0254, 1.2, 1.5 * 0.0254, 6., 140., 3.5, 150., 0.2, 2.
    ])

    #SET Maximum Footprint [m]
    mxftprint = 30.

    #Set target frequency [Hz] and f0epsilon, i.e. fmax=(1+f0eps)*f0
    f0 = 0.22
    f0epsilon = 0.1

    #Set whether or not DTRb and DTRt for the tower are teh same
    DTRsdiff = True  ##SET THIS TO TRUE IF YOU WANT DTRs to be different between base and top

    #Set the minminimum DTR allowed for jacket members; mostly for 60+waterdepths
    jcktDTRmin = 22.

    #_____________________________________________________________#
    #________________ DO NOT MODIFY THE FOLLOWING ________________#
    #_____________________________________________________________#

    bounds = np.vstack((MnCnst, MxCnst))
    desvarmeans = np.mean(bounds, 1)

    # Now Launch the assembly and pass all of the inputs

    myjckt = set_as_top(
        JacketSE(Jcktins.clamped, Jcktins.AFflag, Jcktins.PreBuildTPLvl > 0))
    myjckt.JcktGeoIn = Jcktins
    myjckt.Soilinputs = Soilinputs
    myjckt.Waterinputs = Waterinputs
    myjckt.Windinputs = Windinputs
    myjckt.Pileinputs = Pileinputs
    myjckt.leginputs = leginputs
    myjckt.legbot_stmphin = legbot_stmphin  #Distance from bottom of leg to second joint along z; must be>0
    myjckt.Xbrcinputs = Xbrcinputs
    myjckt.Mbrcinputs = Mbrcinputs
    myjckt.Hbrcinputs = Hbrcinputs
    myjckt.TPlumpinputs = TPlumpinputs
    myjckt.TPinputs = TPinputs

    myjckt.Twrinputs = Twrinputs
    myjckt.TwrRigidTop = TwrRigidTop  #Account for RNA via math rather than a physical rigidmember
    myjckt.RNAinputs = RNAins
    myjckt.RNA_F = RNA_F

    myjckt.FrameAuxIns = FrameAuxIns

    return myjckt, f0, f0epsilon, jcktDTRmin, DTRsdiff, mxftprint, guesses, bounds.T
Exemplo n.º 9
0
def main(): #\
    """Function to Instantiate a JacketSE Assembly: \n
       INPUTS \n
             All hardwired, so edit the quantities below all the way to the line "#________________ DO NOT MODIFY THE FOLLOWING ________________#" \n
             -See JacketOpt_PyOPT for more information. \n
       OUTPUTS \n
             myjckt -jacket assembly instance \n\n

             Optimization parameters:    \n\n

             f0          -float, target frequency [Hz]
             f0epsilon   -float,  f0*(1+f0epsilon) will not be exceeded \n
             DTRsdiff    -Boolean,     Set this to True if DTRs are to be different between base and top. \n
             jcktDTRmin  -Float, minimum jacket member DTR allowed, mostly for 60+waterdepths. \n
             mxftprint   -Float, max allowed foot print [m]
             guesses     -Float(n), guesses for all design variables check out DesVar class. \n
             bounds      -Float(n,2), bounds for all design variables check out DesVar class. \n\n
             SAMPLE CALLS: \n
             1.OPTIMIZATION: python JacketOpt_ExtCobyla.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
             2.OPTIMIZATION: python JacketOpt_PyOPT.py C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py True \n
             3.BUILD JACKET: python >>> myjacket=C:\RRD\PYTHON\WISDEM\JacketSE\src\jacketse\MyJacketInputs.py \n
        """

    #Set inputs							     ###----ALL USER INPUT----###
    Jcktins=JcktGeoInputs()

    Jcktins.nlegs =4
    Jcktins.nbays =5
    Jcktins.batter=12.
    Jcktins.dck_botz =16.
    Jcktins.dck_width=2*6.
    Jcktins.weld2D   =0.5
    Jcktins.VPFlag = True    #vertical pile T/F;  to enable piles in frame3DD set pileinputs.ndiv>0
    Jcktins.clamped= False    #whether or not the bottom of the structure is rigidly connected. Use False when equivalent spring constants are being used.
    Jcktins.AFflag = False  #whether or not to use apparent fixity piles
    Jcktins.PreBuildTPLvl = 5  #if >0, the TP is prebuilt according to rules per PreBuildTP

    #______________________________________________#

    #Soil inputs
    Soilinputs=SoilGeoInputs()
    Soilinputs.zbots   =-np.array([3.,5.,7.,15.,30.,50.])
    Soilinputs.gammas  =np.array([10000.,10000.,10000.,10000.,10000.,10000.])
    Soilinputs.cus     =np.array([60000.,60000.,60000.,60000.,60000.,60000.])
    Soilinputs.phis    =np.array([26.,26.,26.,26.,26.,26])#np.array([36.,33.,26.,37.,35.,37.5])#np.array([36.,33.,26.,37.,35.,37.5])
    Soilinputs.delta   =25.
    Soilinputs.sndflg   =True
    Soilinputs.PenderSwtch   =False #True
    Soilinputs.SoilSF   =1.
    #______________________________________________#

    #Water and wind inputs
    Waterinputs=WaterInputs()
    Waterinputs.wdepth   =30.
    Waterinputs.wlevel   =30. #Distance from bottom of structure to surface  THIS, I believe is no longer needed as piles may be negative in z, to check and remove in case
    Waterinputs.T=12.  #Wave Period
    Waterinputs.HW=10. #Wave Height
    Waterinputs.Cd=3.  #Drag Coefficient, enhanced to account for marine growth and other members not calculated
    Waterinputs.Cm=8.#2.  #ADded mass Coefficient

    Windinputs=WindInputs()
    Windinputs.HH=100. #CHECK HOW THIS COMPLIES....
    Windinputs.U50HH=30. #assumed gust speed
    Windinputs.Cdj=4.  #Drag Coefficient for jacket members, enhanced to account for TP drag not calculated otherwise
    Windinputs.Cdt=2  #Drag Coefficient for tower, enhanced to account for TP drag not calculated otherwise
    #______________________________________________#

    #Pile data
    Pilematin=MatInputs()
    Pilematin.matname=np.array(['heavysteel'])

    Pileinputs=PileGeoInputs()
    Pileinputs.Pilematins=Pilematin
    Pileinputs.ndiv=0 #3			   ###----USER INPUT----###
    Pileinputs.Dpile=2.5
    Pileinputs.tpile=0.0254
    Pileinputs.AFflag=False			   ###----USER INPUT----###
    Pileinputs.Lp=20. #[m] Embedment length
    #______________________________________________#

    #Legs data
    legmatin=MatInputs()
    legmatin.matname=(['heavysteel','heavysteel','heavysteel','heavysteel'])
    Dleg=np.asarray([1.5]).repeat(Jcktins.nbays+1)                      #e.g., np.array([2.0,1.8,1.6,1.6,1.6])
    tleg=np.asarray([1.5*0.0254]).repeat(Jcktins.nbays+1)

    leginputs=LegGeoInputs()
    leginputs.legZbot   = 1.0		 ###----USER INPUT----###
    leginputs.ndiv=1     			 ###----USER INPUT----###
    leginputs.legmatins=legmatin
    leginputs.Dleg=Dleg
    leginputs.tleg=tleg


    #The following is a passthrough variables
    legbot_stmphin =1.5  #Distance from bottom of leg to second joint along z; must be>0
    #______________________________________________#

    #Xbrc data
    Xbrcmatin=MatInputs()
    Xbrcmatin.matname=np.array(['heavysteel']).repeat(Jcktins.nbays)
    Dbrc=np.asarray([1.]).repeat(Jcktins.nbays)#np.array([1.,1.,0.8,0.8])
    tbrc=np.asarray([0.0254]).repeat(Jcktins.nbays)

    Xbrcinputs=XBrcGeoInputs()
    Xbrcinputs.Dbrc=Dbrc
    Xbrcinputs.tbrc=tbrc
    Xbrcinputs.ndiv=1				 ###----USER INPUT----###
    Xbrcinputs.Xbrcmatins=Xbrcmatin
    Xbrcinputs.precalc=False   #This can be set to true if we want Xbraces to be precalculated in D and t, in which case the above set Dbrc and tbrc would be overwritten
    #______________________________________________#

    #Mbrc data
    Mbrcmatin=MatInputs()
    Mbrcmatin.matname=np.array(['heavysteel'])

    Mbrcinputs=MudBrcGeoInputs()
    Mbrcinputs.Dbrc_mud=1.5                  ###----USER INPUT----###
    Mbrcinputs.tbrc_mud=1.5*0.0254
    Mbrcinputs.ndiv=2					    ###----USER INPUT----###
    Mbrcinputs.Mbrcmatins=Mbrcmatin
    Mbrcinputs.precalc=False   #This can be set to true if we want Mudbrace to be precalculated in D and t, in which case the above set Dbrc_mud and tbrc_mud would be overwritten
    #______________________________________________#

    #Hbrc data
    Hbrcmatin=MatInputs()
    Hbrcmatin.matname=np.array(['heavysteel'])
    Dbrc_hbrc=1.1				           ###----USER INPUT----###

    Hbrcinputs=HBrcGeoInputs()
    Hbrcinputs.Dbrch=Dbrc_hbrc					   ###----USER INPUT----###
    Hbrcinputs.ndiv=0#2
    Hbrcinputs.Hbrcmatins=Hbrcmatin
    Hbrcinputs.precalc=True   #This can be set to true if we want Hbrace to be set=Xbrace top D and t, in which case the above set Dbrch and tbrch would be overwritten
    #______________________________________________#

    #TP data


    #Note PrebuildTPLvl is set in JacketIns				           ###----USER INPUT----###
    #TP lumped mass data
    TPlumpinputs=TPlumpMass()						      ###----ALL USER INPUT----###
    TPlumpinputs.mass=200.e3 #[kg]
	TPlumpinputs.CMoff= np.zeros(3)
	TPlumpinputs.I=np.zeros(6) #Note that the code will assume the mass distributed at the corners of the TP for Ixx,Iyy,Izz purposes