Exemple #1
0
def getQoIParams(params):
    paramsQ = Params()
    paramsQ.CD = params.CD
    paramsQ.BC = params.BC
    paramsQ.m = params.m
    paramsQ.efpaWR = params.efpaWR
    paramsQ.vmagWR = params.vmagWR
    paramsQ.m_Y = params.m_Y
    paramsQ.CD_Y = params.CD_Y
    paramsQ.efpa_Y = params.efpa_Y
    paramsQ.vmag_Y = params.vmag_Y
    paramsQ.atm_Ys = params.atm_Ys
    
    return paramsQ
Exemple #2
0
atm_YsList = []

outname = './results/' + params.p.name + '_' + str(Nmc) + '_' + datestring

for i_trial in range(Nmc):
    # generate density function for this trial
    params.dFun, params.atm_Ys = getKLEdensfun(evals, evecs, densSampMean, d, h)
    
    # generate input realizations
    params.efpa_Y = norm.rvs(size = 1).item(0)
    params.efpaWR = efpamean + efpastd * params.efpa_Y
    
    params.vmag_Y = norm.rvs(size = 1).item(0)
    params.vmagWR = vmagmean + vmagstd * params.vmag_Y
    
    params.CD_Y = norm.rvs(size = 1).item(0)
    params.CD = CDmean + CDstd * params.CD_Y
    
    params.m_Y = norm.rvs(size = 1).item(0)
    params.m = mmean + mstd * params.m_Y
    
    params.BC = params.m / (params.CD * Anom)
    params.A = Anom
    
    
    # run sim
    print('\nTrial {}'.format(i_trial+1))
    outs = Outs()
    outsList.append(mainAD(params, tspan, events, outs))
    paramsList.append(getQoIParams(params))
    m_YList.append(params.m_Y)