diff --git a/.github/workflows/CI_RAFT.yml b/.github/workflows/CI_RAFT.yml index 8e42ff8..3e8cce5 100644 --- a/.github/workflows/CI_RAFT.yml +++ b/.github/workflows/CI_RAFT.yml @@ -18,6 +18,7 @@ jobs: os: ["ubuntu-latest", "macOS-latest", "windows-latest"] python-version: ["3.10", "3.11"] + steps: - name: checkout repository uses: actions/checkout@v4 diff --git a/examples/VolturnUS-S_example.yaml b/examples/VolturnUS-S_example.yaml index 2c14782..6f0f3f0 100644 --- a/examples/VolturnUS-S_example.yaml +++ b/examples/VolturnUS-S_example.yaml @@ -27,10 +27,10 @@ cases: turbine: - mRNA : 991000 # [kg] RNA mass + mRNA : 1001505.907 # [kg] RNA mass: m_blades = 3*68076.969 = 204230.907 kg (from ED.sum), m_yawbearing = 100000 kg, m_hub = 190000 kg, m_nacelle = 507275 kg IxRNA : 0 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2] IrRNA : 0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2] - xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m) + xCG_RNA : -7.27 # [m] x location of RNA center of mass [m]: xg_blades = -13.0 m, xg_hub = -11.0 m, xg_nac = -4.99 m, xg_yaw = 0.0 m hHub : 150.0 # [m] hub height above water line [m] #rRNA : [0,0, 148.742] # [m] Can use the position of the RNA reference point (which the RNA yaws about) with respect to the FOWT reference point. If also providing hHub, the z coord be overwritten. Fthrust : 1500.0E3 # [N] temporary thrust force to use @@ -43,7 +43,7 @@ turbine: precone : 4.0 # [deg] shaft_tilt : 6.0 # [deg] overhang : -12.0313 # [m] - aeroMod : 1 # 0 aerodynamics off; 1 aerodynamics on + aeroServoMod : 1 # 0 aerodynamics off; 1 aerodynamics on blade: diff --git a/pyproject.toml b/pyproject.toml index a00bcdc..a940a80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "OpenRAFT" -version = "1.3.1" +version = "1.3.2" description = "RAFT: Response Amplitudes of Floating Turbines" readme = "README.md" requires-python = ">=3.9" diff --git a/raft/omdao_raft.py b/raft/omdao_raft.py index d97b4de..3345faa 100644 --- a/raft/omdao_raft.py +++ b/raft/omdao_raft.py @@ -600,7 +600,7 @@ def compute(self, inputs, outputs, discrete_inputs, discrete_outputs): ring_spacing = inputs[m_name+'ring_spacing'] n_stiff = 0 if ring_spacing == 0.0 else int(np.floor(s_height / ring_spacing)) s_ring = (np.arange(1, n_stiff + 0.1) - 0.5) * (ring_spacing / s_height) - if s_ring: + if np.any(s_ring): if not m_shape == 'rect': d_ring = np.interp(s_ring, s_grid, design['platform']['members'][i]['d']) else: @@ -623,7 +623,7 @@ def compute(self, inputs, outputs, discrete_inputs, discrete_outputs): t_cap = t_cap[:-1] di_cap = di_cap[:-1] # Combine with ring stiffeners - if s_ring: + if np.any(s_ring): s_cap = np.r_[s_ring, s_cap] t_cap = np.r_[inputs[m_name+'ring_t']*np.ones(n_stiff), t_cap] di_cap = np.r_[d_ring-2*inputs[m_name+'ring_h'], di_cap] diff --git a/raft/raft_fowt.py b/raft/raft_fowt.py index 8db58fe..02388ed 100644 --- a/raft/raft_fowt.py +++ b/raft/raft_fowt.py @@ -3,7 +3,7 @@ import os import matplotlib.pyplot as plt import numpy as np -from scipy.interpolate import interp1d, interp2d, griddata +from scipy.interpolate import interp1d, RegularGridInterpolator, griddata import raft.member2pnl as pnl from raft.helpers import * @@ -1575,14 +1575,13 @@ def calcQTF_slenderBody(self, waveHeadInd, Xi0=None, verbose=False, iCase=None, f_rslb += - rho*v_i * aux - # ----- axial/end effects ------ + # ----- end effects ------ # note : v_i and a_i work out to zero for non-tapered sections or non-end sections + # TODO: Should probably skip this part if along the length of the element, i.e. if a_i and v_i are different from zero due to tapering if circ: v_i = np.pi/12.0 * abs((mem.ds[il]+mem.drs[il])**3 - (mem.ds[il]-mem.drs[il])**3) # volume assigned to this end surface - a_i = np.pi*mem.ds[il] * mem.drs[il] # signed end area (positive facing down) = mean diameter of strip * radius change of strip else: v_i = np.pi/12.0 * ((np.mean(mem.ds[il]+mem.drs[il]))**3 - (np.mean(mem.ds[il]-mem.drs[il]))**3) # so far just using sphere eqn and taking mean of side lengths as d - a_i = (mem.ds[il,0]+mem.drs[il,0])*(mem.ds[il,1]+mem.drs[il,1]) - (mem.ds[il,0]-mem.drs[il,0])*(mem.ds[il,1]-mem.drs[il,1]) f_2ndPot += mem.a_i[il]*p_2nd*mem.q # 2nd order pressure f_2ndPot += rho*v_i*Ca_End*np.matmul(mem.qMat, acc_2ndPot) # 2nd order axial acceleration @@ -1593,6 +1592,11 @@ def calcQTF_slenderBody(self, waveHeadInd, Xi0=None, verbose=False, iCase=None, p_drop = -2*0.25*0.5*rho*np.dot(np.matmul(mem.p1Mat + mem.p2Mat, u[:,i1, il]-nodeV[:, i1, il]), np.conj(np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u[:,i2, il]-nodeV[:, i2, il]))) f_conv += mem.a_i[il]*p_drop*mem.q + u1_aux = np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u1_aux) + u2_aux = np.matmul(Ca_p1*mem.p1Mat + Ca_p2*mem.p2Mat, u2_aux) + f_transv = 0.25*mem.a_i[il]*rho*(np.conj(u1_aux)*nodeV_axial_rel[i2, il] + u2_aux*np.conj(nodeV_axial_rel[i1, il])) + f_conv += f_transv + F_2ndPot += translateForce3to6DOF(f_2ndPot, mem.r[il,:]) F_conv += translateForce3to6DOF(f_conv, mem.r[il,:]) F_axdv += translateForce3to6DOF(f_axdv, mem.r[il,:]) @@ -1788,10 +1792,15 @@ def calcHydroForce_2ndOrd(self, beta, S0, iCase=None, iWT=None, interpMode='qtf' else: f = np.zeros([self.nDOF, self.nw]) # Force amplitude for idof in range(0,self.nDOF): - # Interpolate the QTF matrix to the same frequencies as the wave spectrum. Need to interpolate real and imaginary part separately. - qtf_interp_Re = interp2d(self.w1_2nd, self.w1_2nd, qtf_interpBeta[:,:, idof].real, bounds_error=False, fill_value=(0))(self.w, self.w) - qtf_interp_Im = interp2d(self.w1_2nd, self.w1_2nd, qtf_interpBeta[:,:, idof].imag, bounds_error=False, fill_value=(0))(self.w, self.w) - qtf_interp = qtf_interp_Re + 1j*qtf_interp_Im + qtf_interp_Re_interpolator = RegularGridInterpolator((self.w1_2nd, self.w1_2nd), qtf_interpBeta[:, :, idof].real, bounds_error=False, fill_value=0) + qtf_interp_Im_interpolator = RegularGridInterpolator((self.w1_2nd, self.w1_2nd), qtf_interpBeta[:, :, idof].imag, bounds_error=False, fill_value=0) + + w_mesh = np.meshgrid(self.w, self.w, indexing='ij') + points = np.array([w_mesh[0].ravel(), w_mesh[1].ravel()]).T + + qtf_interp_Re = qtf_interp_Re_interpolator(points).reshape(len(self.w), len(self.w)) + qtf_interp_Im = qtf_interp_Im_interpolator(points).reshape(len(self.w), len(self.w)) + qtf_interp = qtf_interp_Re + 1j * qtf_interp_Im for imu in range(1, self.nw): # Loop the difference frequencies Saux = np.zeros(self.nw) diff --git a/raft/raft_member.py b/raft/raft_member.py index 0ee875d..35c338c 100644 --- a/raft/raft_member.py +++ b/raft/raft_member.py @@ -150,7 +150,11 @@ def __init__(self, mi, nw, BEM=[], heading=0): self.cap_stations = [] else: self.cap_t = getFromDict(mi, 'cap_t' , shape=cap_stations.shape[0]) # thicknesses [m] - self.cap_d_in = getFromDict(mi, 'cap_d_in', shape=cap_stations.shape[0]) # inner diameter (if it isn't a solid plate) [m] + if self.shape == 'circular': + self.cap_d_in = getFromDict(mi, 'cap_d_in', shape=cap_stations.shape[0]) # inner diameter (if it isn't a solid plate) [m] + elif self.shape == 'rectangular': + self.cap_d_in = getFromDict(mi, 'cap_d_in', shape=[cap_stations.shape[0],2]) # inner diameter (if it isn't a solid plate) [m] + self.cap_stations = (cap_stations - st[0])/(st[-1] - st[0])*self.l # calculate station positions along the member axis from 0 to l [m] @@ -449,7 +453,7 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): v_shell = V_outer-V_inner # volume of hollow frustum with shell thickness [m^3] m_shell = v_shell*rho_shell # mass of hollow frustum [kg] - hc_shell = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) # center of volume of hollow frustum with shell thickness [m] + hc_shell = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) if V_outer-V_inner!=0 else 0 # center of volume of hollow frustum with shell thickness [m] dBi_fill = (dBi-dAi)*(l_fill/l) + dAi # interpolated inner diameter of frustum that ballast is filled to [m] v_fill, hc_fill = FrustumVCV(dAi, dBi_fill, l_fill) # volume and center of volume of solid inner frustum that ballast occupies [m^3] [m] @@ -459,7 +463,7 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): # then the ballast sits on top of the end cap. Depending on the thickness of the end cap, this can affect m_fill, hc_fill, and MoI_fill >>>>> mass = m_shell + m_fill # total mass of the submember [kg] - hc = ((hc_fill*m_fill) + (hc_shell*m_shell))/mass # total center of mass of the submember from the submember's rA location [m] + hc = ((hc_fill*m_fill) + (hc_shell*m_shell))/mass if mass!=0 else 0 # total center of mass of the submember from the submember's rA location [m] # MOMENT OF INERTIA @@ -492,14 +496,14 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): v_shell = V_outer-V_inner # volume of hollow frustum with shell thickness [m^3] m_shell = v_shell*rho_shell # mass of hollow frustum [kg] - hc_shell = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) # center of volume of the hollow frustum with shell thickness [m] + hc_shell = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) if V_outer-V_inner!=0 else 0 # center of volume of the hollow frustum with shell thickness [m] slBi_fill = (slBi-slAi)*(l_fill/l) + slAi # interpolated side lengths of frustum that ballast is filled to [m] v_fill, hc_fill = FrustumVCV(slAi, slBi_fill, l_fill) # volume and center of volume of inner frustum that ballast occupies [m^3] m_fill = v_fill*rho_fill # mass of ballast in the submember [kg] mass = m_shell + m_fill # total mass of the submember [kg] - hc = ((hc_fill*m_fill) + (hc_shell*m_shell))/mass # total center of mass of the submember from the submember's rA location [m] + hc = ((hc_fill*m_fill) + (hc_shell*m_shell))/mass if mass !=0 else 0 # total center of mass of the submember from the submember's rA location [m] # MOMENT OF INERTIA @@ -602,7 +606,7 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): V_inner, hci = FrustumVCV(dAi, dBi, h) v_cap = V_outer-V_inner m_cap = v_cap*rho_cap # assume it's made out of the same material as the shell for now (can add in cap density input later if needed) - hc_cap = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) + hc_cap = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) if V_outer-V_inner!=0 else 0 I_rad_end_outer, I_ax_outer = FrustumMOI(dA, dB, h, rho_cap) I_rad_end_inner, I_ax_inner = FrustumMOI(dAi, dBi, h, rho_cap) @@ -622,11 +626,12 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): if L==self.stations[0]: # if the cap is on the bottom end of the member slA = sl[0,:] - slB = np.interp(L+h, self.stations, sl) + slB = np.zeros(slA.shape) + slB = np.array([np.interp(L+h, self.stations, sl[:,0]), np.interp(L+h, self.stations, sl[:,1])]) slAi = sl_hole slBi = slB*(slAi/slA) # keep the same proportion in d_hole from bottom to top elif L==self.stations[-1]: # if the cap is on the top end of the member - slA = np.interp(L-h, self.stations, sl) + slA = np.array([np.interp(L-h, self.stations, sl[:,0]), np.interp(L-h, self.stations, sl[:,1])]) slB = sl[-1,:] slAi = slA*(slBi/slB) slBi = sl_hole @@ -659,10 +664,10 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): V_inner, hci = FrustumVCV(slAi, slBi, h) v_cap = V_outer-V_inner m_cap = v_cap*rho_cap # assume it's made out of the same material as the shell for now (can add in cap density input later if needed) - hc_cap = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) + hc_cap = ((hco*V_outer)-(hci*V_inner))/(V_outer-V_inner) if V_outer-V_inner!=0 else 0 - Ixx_end_outer, Iyy_end_outer, Izz_end_outer = RectangularFrustumMOI(slA, slB, h, rho_cap) - Ixx_end_inner, Iyy_end_inner, Izz_end_inner = RectangularFrustumMOI(slAi, slBi, h, rho_cap) + Ixx_end_outer, Iyy_end_outer, Izz_end_outer = RectangularFrustumMOI(slA[0], slA[1], slB[0], slB[1], h, rho_cap) + Ixx_end_inner, Iyy_end_inner, Izz_end_inner = RectangularFrustumMOI(slAi[0], slAi[1], slBi[0], slBi[1], h, rho_cap) Ixx_end = Ixx_end_outer-Ixx_end_inner Iyy_end = Iyy_end_outer-Iyy_end_inner Izz_end = Izz_end_outer-Izz_end_inner @@ -699,7 +704,8 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p): # translate this submember's local inertia matrix to the PRP and add it to the total member's M_struc matrix self.M_struc += translateMatrix6to6DOF(Mmat, center_cap) # mass matrix of the member about the PRP - + self.mshell = mshell + self.mfill = mfill mass = self.M_struc[0,0] # total mass of the entire member [kg] center = mass_center/mass # total center of mass of the entire member from the PRP [m] diff --git a/raft/raft_model.py b/raft/raft_model.py index 491ea72..09a4fab 100644 --- a/raft/raft_model.py +++ b/raft/raft_model.py @@ -525,7 +525,9 @@ def solveStatics(self, case, display=0): X_initial[6*i:6*i+6] = np.array([fowt.x_ref, fowt.y_ref,0,0,0,0]) fowt.setPosition(X_initial[6*i:6*i+6]) # zero platform offsets - fowt.calcStatics() + if case: + fowt.calcTurbineConstants(case, ptfm_pitch=0) # for turbine forces >>> still need to update to use current fowt pose <<< + fowt.calcStatics() # Recompute statics because turbine heading may have changed due to yaw control if statics_mod == 0: K_hydrostatic.append(fowt.C_struc + fowt.C_hydro) @@ -541,8 +543,7 @@ def solveStatics(self, case, display=0): if display > 1: print('Fowt ' + str(i)) print(case) - - fowt.calcTurbineConstants(case, ptfm_pitch=0) # for turbine forces >>> still need to update to use current fowt pose <<< + fowt.calcHydroConstants() F_env_constant[6*i:6*i+6] = np.sum(fowt.f_aero0, axis=1) + fowt.calcCurrentLoads(case) @@ -639,6 +640,7 @@ def eval_func_equil(X, args): case['wind_speed'] = caseorig['wind_speed'][i] fowt.calcTurbineConstants(case, ptfm_pitch=r6[4]) # for turbine forces >>> still need to update to use current fowt pose <<< + fowt.calcStatics() # Recompute statics because turbine heading may have changed due to yaw control fowt.calcHydroConstants() # prep for drag force and mean drift Fnet[6*i:6*i+6] += np.sum(fowt.f_aero0, axis=1) # sum mean turbine force across turbines @@ -789,7 +791,7 @@ def step_func_equil(X, args, Y, oths, Ytarget, err, tol_, iter, maxIter): for i, fowt in enumerate(self.fowtList): print(f"Found mean offets of FOWT {i+1} with surge = {fowt.Xi0[0]: .2f} m, sway = {fowt.Xi0[1]: .2f}, and heave = {fowt.Xi0[2]: .2f} m") - print(f" roll = {fowt.Xi0[3]*180/np.pi: .2f} deg, pitch = {fowt.Xi0[4]*180/np.pi: .2f}, and yaw = {fowt.Xi0[5]*180/np.pi: .2f} deg") + print(f" roll = {fowt.Xi0[3]*180/np.pi: .2f} deg, pitch = {fowt.Xi0[4]*180/np.pi: .2f} deg, and yaw = {fowt.Xi0[5]*180/np.pi: .2f} deg") #dsolvePlot(info) # plot solver convergence trajectories diff --git a/raft/raft_rotor.py b/raft/raft_rotor.py index 2785ec2..db2d812 100644 --- a/raft/raft_rotor.py +++ b/raft/raft_rotor.py @@ -391,14 +391,12 @@ def setPosition(self, r6=np.zeros(6), R=None): # Store platform heading for use with nacelle yaw self.platform_heading = r6[5] - # Apply nacelle yaw depending on the yaw mode - self.setYaw() - # Update RNA point locations [m] w.r.t. PRP in global orientations self.r_RRP_rel = np.matmul(self.R_ptfm, self.r_rel) # RNA ref point - self.r_CG_rel = self.r_RRP_rel + self.q*self.xCG_RNA # RNA CG location - self.r_hub_rel = self.r_RRP_rel + self.q*self.overhang # rotor hub location - + + # Apply nacelle yaw depending on the yaw mode + self.setYaw() + ''' self.r_RRP = ? # RNA reference point self.r_CG = ? # RNA CG location @@ -456,6 +454,10 @@ def setYaw(self, yaw=None): # Compute shaft axis unit vector in FOWT and global frames self.q_rel = np.matmul(R_q_rel, np.array([1,0,0]) ) self.q = np.matmul(self.R_ptfm, self.q_rel) # Write in the global frame + + # Update RNA point locations [m] w.r.t. PRP in global orientations + self.r_CG_rel = self.r_RRP_rel + self.q*self.xCG_RNA # RNA CG location + self.r_hub_rel = self.r_RRP_rel + self.q*self.overhang # rotor hub location return self.yaw @@ -636,7 +638,7 @@ def calcHydroConstants(self, dgamma=0, rho=1025, g=9.81): return A_hydro, I_hydro - def calcCavitation(self, case, azimuth=0, clearance_margin=1.0, Patm=101325, Pvap=2500, error_on_cavitation=False): + def calcCavitation(self, case, azimuth=0, clearance_margin=1.0, Patm=101325, Pvap=2300, error_on_cavitation=False): ''' Method to calculate the cavitation number of the rotor (wind speed (m/s), rotor speed (RPM), pitch angle (deg), azimuth (deg)) @@ -838,7 +840,7 @@ def calcAero(self, case, current=False, display=0): # Set up vectors in axis frame. Assuming CCBlade forces (but not # moments) are relative to the rotor axis forces_axis = np.array([loads["T"][0], loads["Y"][0], loads["Z" ][0]]) - moments_axis = np.array([loads["My"][0], loads["Q"][0], loads["Mz"][0]]) + moments_axis = np.array([loads["Q"][0], loads["My"][0], loads["Mz"][0]]) # Rotate forces and moments to be relative to global orientation (but still wrt hub) self.f0[:3] = np.matmul(self.R_q, forces_axis) @@ -870,7 +872,7 @@ def calcAero(self, case, current=False, display=0): b_inflow[0,0,:] = dT_dU # Excitation vector - f_inflow = np.zeros([6,len(self.w)], dtype=np.complex_) + f_inflow = np.zeros([6,len(self.w)], dtype=np.complex128) f_inflow[0,:] = dT_dU*self.V_w # Rotate to global orientations @@ -895,10 +897,10 @@ def calcAero(self, case, current=False, display=0): a_aer = np.zeros_like(self.w) b_aer = np.zeros_like(self.w) - C = np.zeros_like(self.w,dtype=np.complex_) - C2 = np.zeros_like(self.w,dtype=np.complex_) - D = np.zeros_like(self.w,dtype=np.complex_) - E = np.zeros_like(self.w,dtype=np.complex_) + C = np.zeros_like(self.w,dtype=np.complex128) + C2 = np.zeros_like(self.w,dtype=np.complex128) + D = np.zeros_like(self.w,dtype=np.complex128) + E = np.zeros_like(self.w,dtype=np.complex128) # Roots of characteristic equation, helps w/ debugging # p = np.array([-self.I_drivetrain, (dQ_dOm + self.kp_beta * dQ_dPi - self.Ng * kp_tau), self.ki_beta* dQ_dPi - self.Ng * ki_tau]) diff --git a/tests/test_data/IEA15MW.yaml b/tests/test_data/IEA15MW.yaml index f666f1e..6e18034 100644 --- a/tests/test_data/IEA15MW.yaml +++ b/tests/test_data/IEA15MW.yaml @@ -14,10 +14,10 @@ site: shearExp : 0.12 # shear exponent turbine: - mRNA : 991000 # [kg] RNA mass + mRNA : 1001505.907 # [kg] RNA mass: m_blades = 3*68076.969 = 204230.907 kg (from ED.sum), m_yawbearing = 100000 kg, m_hub = 190000 kg, m_nacelle = 507275 kg IxRNA : 0 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2] IrRNA : 0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2] - xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m) + xCG_RNA : -7.27 # [m] x location of RNA center of mass [m]: xg_blades = -13.0 m, xg_hub = -11.0 m, xg_nac = -4.99 m, xg_yaw = 0.0 m hHub : 150.0 # [m] hub height above water line [m] Fthrust : 1500.0E3 # [N] temporary thrust force to use @@ -29,7 +29,7 @@ turbine: precone : 4.0 # [deg] shaft_tilt : 6.0 # [deg] overhang : -12.0313 # [m] - aeroMod : 1 # 0 aerodynamics off; 1 aerodynamics on + aeroServoMod : 1 # 0 aerodynamics off; 1 aerodynamics on blade: diff --git a/tests/test_data/IEA15MW_true_calcAero-yaw_mode0.pkl b/tests/test_data/IEA15MW_true_calcAero-yaw_mode0.pkl index 9924f00..514a15b 100644 Binary files a/tests/test_data/IEA15MW_true_calcAero-yaw_mode0.pkl and b/tests/test_data/IEA15MW_true_calcAero-yaw_mode0.pkl differ diff --git a/tests/test_data/IEA15MW_true_calcAero-yaw_mode1.pkl b/tests/test_data/IEA15MW_true_calcAero-yaw_mode1.pkl index 196aa34..7097225 100644 Binary files a/tests/test_data/IEA15MW_true_calcAero-yaw_mode1.pkl and b/tests/test_data/IEA15MW_true_calcAero-yaw_mode1.pkl differ diff --git a/tests/test_data/IEA15MW_true_calcAero-yaw_mode2.pkl b/tests/test_data/IEA15MW_true_calcAero-yaw_mode2.pkl index 1a43903..0c494cc 100644 Binary files a/tests/test_data/IEA15MW_true_calcAero-yaw_mode2.pkl and b/tests/test_data/IEA15MW_true_calcAero-yaw_mode2.pkl differ diff --git a/tests/test_data/IEA15MW_true_calcAero-yaw_mode3.pkl b/tests/test_data/IEA15MW_true_calcAero-yaw_mode3.pkl index 1a43903..0c494cc 100644 Binary files a/tests/test_data/IEA15MW_true_calcAero-yaw_mode3.pkl and b/tests/test_data/IEA15MW_true_calcAero-yaw_mode3.pkl differ diff --git a/tests/test_data/OC3spar_true_analyzeCases.pkl b/tests/test_data/OC3spar_true_analyzeCases.pkl index 71700ea..c1328d2 100644 Binary files a/tests/test_data/OC3spar_true_analyzeCases.pkl and b/tests/test_data/OC3spar_true_analyzeCases.pkl differ diff --git a/tests/test_data/VolturnUS-S.yaml b/tests/test_data/VolturnUS-S.yaml index 41dcd0b..0c271f3 100644 --- a/tests/test_data/VolturnUS-S.yaml +++ b/tests/test_data/VolturnUS-S.yaml @@ -25,10 +25,10 @@ cases: turbine: - mRNA : 991000 # [kg] RNA mass + mRNA : 1001505.907 # [kg] RNA mass: m_blades = 3*68076.969 = 204230.907 kg (from ED.sum), m_yawbearing = 100000 kg, m_hub = 190000 kg, m_nacelle = 507275 kg IxRNA : 0 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2] IrRNA : 0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2] - xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m) + xCG_RNA : -7.27 # [m] x location of RNA center of mass [m]: xg_blades = -13.0 m, xg_hub = -11.0 m, xg_nac = -4.99 m, xg_yaw = 0.0 m hHub : 150.0 # [m] hub height above water line [m] Fthrust : 1500.0E3 # [N] temporary thrust force to use @@ -40,7 +40,7 @@ turbine: precone : 4.0 # [deg] shaft_tilt : 6.0 # [deg] overhang : -12.0313 # [m] - aeroMod : 1 # 0 aerodynamics off; 1 aerodynamics on + aeroServoMod : 1 # 0 aerodynamics off; 1 aerodynamics on blade: @@ -1082,6 +1082,11 @@ platform: dlsMax : 5.0 # maximum node splitting section amount for platform members; can't be 0 potModMaster : 1 + potSecOrder : 1 # [int] master switch for computing second-order wave forces; 0=do not compute, 1=compute QTFs using slender body approximation, 2=read QTF file in WAMIT format (.11d or .12d) + min_freq2nd : 0.040 # [Hz] minimum frequency for second-order wave forces + df_freq2nd : 0.008 # [Hz] frequency step for second-order wave forces + max_freq2nd : 0.200 # [Hz] maximum frequency for second-order wave forces + members: # list all members here @@ -1092,6 +1097,7 @@ platform: shape : circ # [-] circular or rectangular gamma : 0.0 # [deg] twist angle about the member's z-axis potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory + MCF : True # --- outer shell including hydro--- stations : [0, 1] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB d : 9.85 # [m] diameters if circular or side lengths if rectangular (can be pairs) @@ -1115,6 +1121,7 @@ platform: shape : circ # [-] circular or rectangular gamma : 0.0 # [deg] twist angle about the member's z-axis potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory + MCF : True # --- outer shell including hydro--- stations : [0, 35] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB d : 12.23 # [m] diameters if circular or side lengths if rectangular (can be pairs) diff --git a/tests/test_data/VolturnUS-S_farm.yaml b/tests/test_data/VolturnUS-S_farm.yaml index c65b74b..a99b5ea 100644 --- a/tests/test_data/VolturnUS-S_farm.yaml +++ b/tests/test_data/VolturnUS-S_farm.yaml @@ -42,10 +42,10 @@ array_mooring: # option for array-level mooring system turbine: - mRNA : 991000 # [kg] RNA mass + mRNA : 1001505.907 # [kg] RNA mass: m_blades = 3*68076.969 = 204230.907 kg (from ED.sum), m_yawbearing = 100000 kg, m_hub = 190000 kg, m_nacelle = 507275 kg IxRNA : 0 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2] IrRNA : 0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2] - xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m) + xCG_RNA : -7.27 # [m] x location of RNA center of mass [m]: xg_blades = -13.0 m, xg_hub = -11.0 m, xg_nac = -4.99 m, xg_yaw = 0.0 m hHub : 150.0 # [m] hub height above water line [m] Fthrust : 1500.0E3 # [N] temporary thrust force to use diff --git a/tests/test_data/VolturnUS-S_farm_true_analyzeCases.pkl b/tests/test_data/VolturnUS-S_farm_true_analyzeCases.pkl index 976f9c2..30dc18f 100644 Binary files a/tests/test_data/VolturnUS-S_farm_true_analyzeCases.pkl and b/tests/test_data/VolturnUS-S_farm_true_analyzeCases.pkl differ diff --git a/tests/test_data/VolturnUS-S_true_analyzeCases.pkl b/tests/test_data/VolturnUS-S_true_analyzeCases.pkl index 1975e2b..abc5c02 100644 Binary files a/tests/test_data/VolturnUS-S_true_analyzeCases.pkl and b/tests/test_data/VolturnUS-S_true_analyzeCases.pkl differ diff --git a/tests/test_data/VolturnUS-S_true_calcQTF_slenderBody.pkl b/tests/test_data/VolturnUS-S_true_calcQTF_slenderBody.pkl new file mode 100644 index 0000000..98e9d9b Binary files /dev/null and b/tests/test_data/VolturnUS-S_true_calcQTF_slenderBody.pkl differ diff --git a/tests/test_data/VolturnUS-S_true_hydroExcitation.pkl b/tests/test_data/VolturnUS-S_true_hydroExcitation.pkl index 7aac668..ec78d66 100644 Binary files a/tests/test_data/VolturnUS-S_true_hydroExcitation.pkl and b/tests/test_data/VolturnUS-S_true_hydroExcitation.pkl differ diff --git a/tests/test_fowt.py b/tests/test_fowt.py index f36c337..3080a71 100644 --- a/tests/test_fowt.py +++ b/tests/test_fowt.py @@ -35,7 +35,7 @@ ''' # Structure related quantities desired_rCG = [ - np.array([ 2.34101810e-15, 7.81354773e-16, -2.03398326e+00]), + np.array([-3.78742736e-01, 7.80925410e-16, -1.91132267e+00]), np.array([ 0, 0, -78.03525272 ]), ] desired_rCG_sub = [ @@ -49,12 +49,12 @@ ] desired_M_struc = [ - np.array([[ 1.91081767e+07, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, -3.88657114e+07, -1.49302650e-08], - [ 0.00000000e+00, 1.91081767e+07, 0.00000000e+00, 3.88657114e+07, 0.00000000e+00, 4.47325874e-08], - [ 0.00000000e+00, 0.00000000e+00, 1.91081767e+07, 1.49302650e-08, -4.47325874e-08, 0.00000000e+00], - [ 0.00000000e+00, 3.88657114e+07, 1.49302650e-08, 4.22011083e+10, 9.54605639e-07, 4.76371497e-07], - [-3.88657114e+07, 0.00000000e+00, -4.47325874e-08, 9.54605639e-07, 4.22011083e+10, 4.76371497e-07], - [-1.49302650e-08, 4.47325874e-08, 0.00000000e+00, 5.96046448e-07, 4.76371497e-07, 2.05595816e+10]]), + np.array([[ 1.91186826e+07, 0.00000000e+00, -7.72177272e-12, 0.00000000e+00, -3.65419714e+07, -1.49302650e-08], + [ 0.00000000e+00, 1.91186826e+07, 0.00000000e+00, 3.65419714e+07, 0.00000000e+00, -7.24106215e+06], + [ 1.30711139e-11, 0.00000000e+00, 1.91186826e+07, 1.49302650e-08, 7.24106215e+06, 0.00000000e+00], + [ 0.00000000e+00, 3.65419714e+07, 1.49302650e-08, 4.26605281e+10, 9.54605639e-07, 1.08255551e+09], + [-3.65419714e+07, 0.00000000e+00, 7.24106215e+06, 9.54605639e-07, 4.27128822e+10, 4.76371497e-07], + [-1.49302650e-08, -7.24106215e+06, 0.00000000e+00, 1.08255551e+09, 4.76371497e-07, 2.06119358e+10]]), np.array([[ 8.08951257e+06, 0.00000000e+00, -3.63797881e-12, 0.00000000e+00, -6.31267158e+08, 0.00000000e+00], [ 0.00000000e+00, 8.08951257e+06, 0.00000000e+00, 6.31267158e+08, 0.00000000e+00, 0.00000000e+00], [ 3.63797881e-12, 0.00000000e+00, 8.08951257e+06, 0.00000000e+00, 3.25832739e-10, 0.00000000e+00], @@ -82,8 +82,8 @@ np.array([[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], - [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 3.81272628e+08, 0.00000000e+00, 0.00000000e+00], - [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 3.81272628e+08, 0.00000000e+00], + [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 3.58476739e+08, 0.00000000e+00, 0.00000000e+00], + [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 3.58476739e+08, 0.00000000e+00], [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]]), np.array([[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], [ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00], @@ -94,7 +94,7 @@ ] desired_W_struc = [ - np.array([ 0.00000000e+00, 0.00000000e+00, -1.87451213e+08, -2.38651410e-07, 3.58093530e-07, 0.00000000e+00]), + np.array([ 0.00000000e+00, 0.00000000e+00, -1.87554276e+08, -2.38651410e-07, -7.10348197e+07, 0.00000000e+00]), np.array([ 0.00000000e+00, 0.00000000e+00, -7.93581183e+07, 0.00000000e+00, 0.00000000e+00, 0.00000000e+00]), ] @@ -283,6 +283,32 @@ def test_calcCurrentLoads(index_and_fowt): assert_allclose(D, desired_current_drag[index], rtol=1e-05, atol=1e-3) +def test_calcQTF_slenderBody(index_and_fowt, flagSaveValues=False): + # Set flagSaveValues to true to replace the true values file with the values calculated below + index, fowt = index_and_fowt + + if fowt.potSecOrder: # Check only cases that compute the QTFs + true_values_file = list_files[index].replace('.yaml', '_true_calcQTF_slenderBody.pkl') + + testCase = {'wave_heading': 30, 'wave_period': 12, 'wave_height': 6} # Testing one case only + fowt.calcHydroConstants() # Need to call this one before calcHydroExcitation + fowt.calcHydroExcitation(testCase, memberList=fowt.memberList) # Need to call this one before calcQTF_slenderBody + fowt.calcQTF_slenderBody(0) # Testing for the body considered to be fixed. Model class should take care of cases with motion + + if flagSaveValues: + true_values={ + 'case': testCase, + 'qtf': fowt.qtf, + } + else: + with open(true_values_file, 'rb') as f: + true_values = pickle.load(f) + assert_allclose(fowt.qtf, true_values['qtf'], rtol=1e-05, atol=1e-3) + + if flagSaveValues: + with open(true_values_file, 'wb') as f: + pickle.dump(true_values, f) + ''' To run as a script. Useful for debugging. @@ -305,3 +331,6 @@ def test_calcCurrentLoads(index_and_fowt): fowt = create_fowt(list_files[index]) test_calcCurrentLoads((index,fowt)) + fowt = create_fowt(list_files[index]) + test_calcQTF_slenderBody((index,fowt)) + diff --git a/tests/test_model.py b/tests/test_model.py index 03b1ccb..ce7fc08 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -70,24 +70,24 @@ def index_and_model(request): desired_X0 = { 'wind': [ - np.array([ 1.27750843e+01, 1.04270725e+01, -5.01403771e-01, -3.48692268e-02, 5.90533519e-02, -3.22418223e-02]), - np.array([ 1.10831732e+01, 5.22389760e+00, -8.09325191e-01, -2.37567722e-02, 4.02685757e-02, -8.38412801e-02]), - np.array([ 1.67861341e+01, 1.12637020e+01, 6.65451797e-01, -3.01629231e-02, 5.68383850e-02, -5.12690113e-02, 1.61811048e+03, 1.07595392e+01, 1.03868611e+00, -3.13622101e-02, 5.90181250e-02, 1.65113590e-02]) + np.array([ 1.31233298e+01, 1.07387644e+01, -5.24494379e-01, -1.81027406e-02, 3.71705447e-02, -6.61884531e-03]), + np.array([ 1.09704957e+01, 5.30341749e+00, -8.08255233e-01, -2.20791574e-02, 4.00562243e-02, -1.88931043e-02]), + np.array([ 1.69682164e+01, 1.13133692e+01, 6.43325363e-01, -1.49816934e-02, 3.67094643e-02, -3.46615026e-02, 1.61831746e+03, 1.16883178e+01, 1.01673549e+00, -1.50552064e-02, 3.79424789e-02, 4.38179867e-02]) ], 'wave': [ - np.array([ 1.69712005e-02, -1.93781208e-17, -4.28261180e-01, -1.21300094e-18, 2.26746861e-05, -2.30847610e-23]), + np.array([ 4.27925162e-01, -9.00035158e-17, -4.51814991e-01, -5.63389767e-18, -2.54250076e-02, -1.07219357e-22]), np.array([-1.64267049e-05, -2.83795893e-15, -6.65861624e-01, 3.88717546e-19, -5.94238978e-11, -4.02571352e-17]), - np.array([-5.01177348e-01, 1.11798952e-15, 8.82461053e-01, 4.91932000e-17, 4.39038724e-04, 8.69456218e-19, 1.60050118e+03, 9.82053320e-16, 8.82460768e-01, 4.27743746e-17, -4.39066827e-04, -8.32305085e-19]) + np.array([-3.28437405e-01, 1.37380291e-15, 8.59345726e-01, 6.09528763e-17, -2.31870486e-02, 9.89478513e-19, 1.60065726e+03, 9.12847486e-16, 8.59907935e-01, 3.91868383e-17, -2.40815624e-02, -8.63499424e-19]) ], 'current': [ - np.array([ 3.07647856e+00, 8.09230061e-01, -4.29676672e-01, 6.33390732e-04, -2.49217661e-03, 3.80888009e-03]), + np.array([ 3.46491856e+00, 8.10382757e-01, -4.53718903e-01, 6.48535991e-04, -2.79078335e-02, 3.71621922e-03]), np.array([ 3.86072176e+00, 9.22694246e-01, -6.74898762e-01, -2.64759824e-04, 9.82529767e-04, -1.03532699e-05]), - np.array([ 3.24739802e+00, 1.08484956e+00, 8.42959914e-01, 7.16963134e-04, -1.22097638e-03, -5.87434156e-03, 1.60424961e+03, 1.10109258e+00, 9.21764906e-01, 7.58137041e-04, -2.11268701e-03, 6.56575162e-03]) + np.array([ 3.43402590e+00, 1.08780658e+00, 8.19500640e-01, 7.10970656e-04, -2.47671283e-02, -5.93700672e-03, 1.60441156e+03, 1.09887425e+00, 8.99148002e-01, 7.76337021e-04, -2.58189091e-02, 6.49661703e-03]) ], 'wind_wave_current': [ - np.array([ 1.49894720e+01, 1.16765061e+01, -5.14161071e-01, -3.42338575e-02, 5.66634437e-02, -2.76885509e-02]), - np.array([ 1.52428293e+01, 5.61793710e+00, -8.60576419e-01, -2.40342388e-02, 4.11894593e-02, -8.77292315e-02]), - np.array([ 2.05127673e+01, 1.23010332e+01, 6.26628389e-01, -2.94743425e-02, 5.49413694e-02, -5.38145777e-02, 1.62214085e+03, 1.22293955e+01, 1.07721320e+00, -3.05889945e-02, 5.76177298e-02, 2.63915249e-02]) + np.array([ 1.53213197e+01, 1.19846300e+01, -5.37552077e-01, -1.74035124e-02, 3.48566650e-02, -2.72880384e-03]), + np.array([ 1.51819382e+01, 5.67973367e+00, -8.56976995e-01, -2.23553755e-02, 4.09788544e-02, -2.60679623e-02]), + np.array([ 2.07005182e+01, 1.23527653e+01, 6.04380340e-01, -1.43462329e-02, 3.48812794e-02, -3.78041365e-02, 1.62236585e+03, 1.32021152e+01, 1.05518596e+00, -1.41134650e-02, 3.65034177e-02, 5.57420290e-02]) ] } @@ -123,69 +123,69 @@ def test_solveStatics_Wind_Wave_Current(index_and_model): desired_fn = { 'unloaded': [ - np.array([0.00780613, 0.00781769, 0.06073888, 0.03861193, 0.03862018, 0.01239692]), + np.array([0.00782180, 0.00779927, 0.06073036, 0.03829455, 0.03823218, 0.01238992]), np.array([0.00796903, 0.00796903, 0.03245079, 0.03383781, 0.03384323, 0.15347415]), - np.array([0.01074625, 0.00716318, 0.05084381, 0.03748606, 0.03783757, 0.01574022, 0.00756192, 0.00704588, 0.05086277, 0.03748700, 0.03779494, 0.01547133]) + np.array([0.01074526, 0.00704213, 0.05083874, 0.03718830, 0.03746220, 0.01573330, 0.00756069, 0.00716294, 0.05085846, 0.03718910, 0.03751292, 0.01545850]) ], 'loaded': [ - np.array([0.00983469, 0.00711507, 0.06075487, 0.03837915, 0.03917206, 0.01327898]), - np.array([0.00730761, 0.00938691, 0.03246216, 0.03384494, 0.03390347, 0.15560606]), - np.array([0.01065828, 0.00721512, 0.05086059, 0.03788729, 0.03835768, 0.01772042, 0.00740785, 0.00644214, 0.05081994, 0.03679016, 0.03751815, 0.01330817]) + np.array([0.00987260, 0.00712184, 0.06074470, 0.03805314, 0.03879976, 0.01324559]), + np.array([0.00730352, 0.00939103, 0.03246224, 0.03384297, 0.03390545, 0.1555763 ]), + np.array([0.01065943, 0.00720493, 0.05085334, 0.03762357, 0.03800233, 0.01769749, 0.00744181, 0.00644391, 0.05081630, 0.03648770, 0.03722345, 0.01325040]), ], } desired_modes = { 'unloaded': [ - np.array([[-9.99999802e-01, -3.58177566e-14, -5.47524722e-08, -4.39990138e-13, -9.90311437e-01, -2.35694740e-15], - [-2.09525757e-20, 9.99999800e-01, -1.41067090e-16, 9.90300308e-01, -1.02414825e-14, -1.13370282e-01], - [ 1.27034965e-06, 1.14269752e-18, -1.00000000e+00, -5.06576752e-16, -3.61024872e-05, -9.89217552e-20], - [-1.92236308e-20, 6.27336513e-04, 2.26769079e-18, -1.38943513e-01, 1.44181432e-15, -1.78996143e-04], - [ 6.30061473e-04, 2.26235065e-17, 1.61898091e-07, -6.16893988e-14, -1.38864162e-01, -2.13805104e-17], - [ 3.40207703e-20, -8.15805381e-05, 4.18327175e-18, 1.97802394e-05, -7.70377924e-18, -9.93552790e-01]]), + np.array([[-9.99999807e-01, 4.86100318e-14, -1.63567304e-03, -5.45667034e-14, -9.89726132e-01, 2.04003988e-15], + [-3.37568579e-20, -9.99999728e-01, -6.29828842e-16, -9.90218873e-01, 1.25468775e-17, 5.86275118e-01], + [ 8.23145082e-05, -5.26031153e-18, 9.99998628e-01, -9.74821863e-16, -2.64733741e-02, 3.12143871e-18], + [ 6.39974802e-21, -6.48163950e-04, 1.35297744e-16, 1.39458388e-01, -2.50093227e-18, 1.89793501e-03], + [ 6.15814470e-04, -3.03812746e-17, -2.63383311e-04, -7.74519594e-15, -1.40503895e-01, 1.86798683e-17], + [ 3.49993342e-20, 3.51214780e-04, -2.70592359e-18, -4.23584082e-03, -7.96472948e-18, 8.10109797e-01]]), np.array([[ 9.99999999e-01, -5.75186507e-10, -3.66356915e-10, -8.67852276e-14, 9.99898193e-01, -2.99686750e-14], [ 3.92738961e-10, -9.99999999e-01, -3.31616203e-17, 9.99898194e-01, 3.23260804e-14, 2.06096172e-03], [ 7.45752595e-11, -2.85321785e-18, 1.00000000e+00, -2.72406265e-18, 2.31375465e-10, -1.10751480e-16], [ 2.12335674e-14, -5.40653002e-05, 4.24138273e-19, -1.42689340e-02, -4.31499026e-16, -2.94481141e-05], [-5.40646648e-05, 3.10972493e-14, -4.68816970e-12, -1.23789014e-15, 1.42689404e-02, -1.94677827e-16], [ 1.95726867e-18, -5.58669353e-09, 9.44626575e-17, 4.97628953e-06, -2.81458719e-18, -9.99997876e-01]]), - np.array([[-7.07063968e-01, 1.71887064e-16, -1.30340226e-02, -2.82542470e-14, 6.94863002e-01, 3.85153580e-16, 7.07066034e-01, -6.53986496e-17, 1.25007531e-02, 2.80098589e-14, 6.92313443e-01, 5.76639921e-16], - [-7.25250255e-15, 7.07099398e-01, 1.75093624e-14, -6.97995773e-01, -3.82099078e-14, 6.98639459e-01, 7.80689701e-14, -7.07100871e-01, -1.97524808e-14, 6.97890097e-01, -2.17875817e-14, 6.96282021e-01], - [ 7.78086989e-03, -1.31547996e-19, -7.06986675e-01, 3.69809461e-15, -3.37914294e-02, 1.87852753e-17, -7.58851866e-03, -1.14893765e-18, 7.06996195e-01, -3.54499811e-15, -4.84772086e-02, 1.82168142e-17], - [-4.42008293e-18, 3.85533504e-04, -1.95389309e-16, 1.13310010e-01, 6.59117155e-15, 2.20799443e-03, 4.26954391e-17, -3.95913134e-04, -2.00243504e-16, -1.13574765e-01, 3.57431861e-15, 2.50916481e-03], - [ 4.66972697e-05, -6.69897247e-19, -2.08076011e-04, -5.37783516e-15, 1.26573873e-01, -7.03266775e-19, -1.90337265e-04, 7.23965014e-19, 1.52684219e-04, 5.23638666e-15, 1.35481349e-01, -4.06301593e-18], - [ 4.59941229e-17, -3.22196475e-03, 8.14219936e-18, -2.53785685e-03, -1.51955686e-16, 1.09079638e-01, -3.47492945e-16, 2.85012022e-03, -5.76771539e-18, 2.46481410e-03, -4.41443842e-17, 1.23225467e-01], - [ 7.07063969e-01, 1.23317808e-16, 1.30340204e-02, 5.92119539e-15, 6.94866599e-01, 5.63370023e-16, 7.07066037e-01, -2.39412617e-17, 1.25007650e-02, 7.52362237e-15, -6.92309081e-01, 1.94827127e-16], - [ 8.83463633e-17, -7.07099273e-01, -2.67391452e-17, -6.97934777e-01, 8.19753287e-15, -6.98638992e-01, -9.46449353e-15, -7.07100982e-01, -4.28411155e-18, -6.97951671e-01, -9.99882707e-15, 6.96282772e-01], - [ 7.78087658e-03, 3.67247159e-19, -7.06986551e-01, 1.17996039e-15, 3.37916947e-02, 1.50031146e-18, 7.58851869e-03, -5.80489109e-19, -7.06996319e-01, 6.76458394e-16, -4.84769765e-02, 8.65225494e-18], - [ 1.23387652e-19, -3.85533550e-04, 3.22484756e-18, 1.13300083e-01, -1.34298598e-15, -2.20798839e-03, -4.64803567e-18, -3.95913299e-04, 3.40496951e-18, 1.13584760e-01, 1.62276251e-15, 2.50916234e-03], - [-4.66966628e-05, 9.52249103e-19, 2.08075991e-04, 1.35742924e-15, 1.26574617e-01, 5.81538035e-18, -1.90337282e-04, -1.14034186e-18, 1.52684170e-04, 1.19298438e-15, -1.35480553e-01, 4.27926093e-19], - [-2.06368074e-18, -3.22196433e-03, 3.25247512e-19, 2.53764084e-03, -2.87786844e-17, 1.09079545e-01, -6.15608121e-17, -2.85012079e-03, -4.84193205e-19, 2.46503742e-03, 3.86906564e-17, -1.23225573e-01]]) + np.array([[ 7.07825719e-01, -3.15055001e-17, -1.32630905e-02, -2.19914192e-14, -8.64609540e-01, -4.24293074e-16, 7.06326558e-01, -7.31382701e-18, 9.61558420e-03, 1.32162934e-14, -4.93902244e-01, -4.29224066e-16], + [-4.89583244e-17, 7.85911667e-01, 4.52106432e-15, -8.56521395e-01, 5.28474752e-15, -7.93284272e-01, 3.76977173e-14, -6.14665922e-01, -5.22230082e-15, 5.25433719e-01, 1.64307174e-14, -6.54712295e-01], + [-7.76765072e-03, 5.73003997e-18, -7.96969430e-01, 2.78055517e-15, 1.88343250e-02, -1.51849968e-17, -7.58106566e-03, -4.04692741e-18, 6.03839362e-01, -1.60196034e-15, 5.13083496e-04, -1.30251428e-17], + [-3.34340760e-19, 4.27427506e-04, -3.85068942e-16, 1.40135770e-01, -7.45324253e-16, -2.90906806e-03, 2.04954676e-17, -3.25330035e-04, -5.30992268e-16, -8.63333133e-02, -2.79405527e-15, -2.68890829e-03], + [-5.37598733e-05, -1.30564706e-18, 2.92009853e-05, -4.24958991e-15, -1.69811876e-01, 1.64600958e-18, -1.75528113e-04, 9.68430673e-19, -6.94904252e-05, 2.46004337e-15, -8.77291683e-02, 2.51343153e-18], + [ 2.49224761e-19, -3.28472446e-03, 9.44014612e-18, -8.17009389e-03, 3.98091977e-17, -1.18508842e-01, -1.74458248e-16, 2.90949567e-03, 8.33507402e-18, 4.93133876e-03, 1.68009630e-16, -1.10277637e-01], + [-7.06301389e-01, 8.24649949e-17, 1.21359094e-02, -2.17933632e-16, 4.59748625e-01, -8.10522725e-17, 7.07804746e-01, -9.84864194e-17, 1.53870931e-02, 1.16752336e-14, -8.46545575e-01, 2.46067501e-16], + [-8.42294853e-18, 6.18325170e-01, -1.55808794e-17, -4.90097261e-01, 7.77558316e-15, 5.89473068e-01, -4.63212600e-15, 7.88774350e-01, -1.36301789e-17, -8.35220796e-01, -1.11866279e-14, -7.35135054e-01], + [-7.79477632e-03, 1.73669598e-18, -6.03751937e-01, 6.28609948e-16, 5.62953547e-02, 5.06431194e-18, 7.59532320e-03, -1.23691005e-19, -7.96899379e-01, 1.58470155e-15, -7.93424870e-02, -6.41876055e-18], + [-5.87906282e-20, 3.60238282e-04, 2.66938307e-18, 8.04358236e-02, -1.27892213e-15, 1.55576021e-03, -2.34040824e-18, 4.46937680e-04, 3.59783942e-18, 1.37275491e-01, 1.84260199e-15, -2.28372214e-03], + [ 3.48598674e-05, 1.02289764e-18, 3.66943933e-04, 1.51868457e-16, 9.33893614e-02, -5.08719895e-18, -2.05513389e-04, -6.32993020e-19, 4.20980484e-04, 2.10891028e-15, -1.59465553e-01, -3.61168296e-18], + [ 4.28338626e-19, 2.39454188e-03, -1.72295654e-19, -1.03376490e-03, 1.55565829e-17, -9.57409855e-02, -2.91825502e-17, 3.47247537e-03, -3.73375983e-19, -1.81895138e-03, -2.27130818e-17, 1.36947655e-01]]), ], 'loaded': [ - np.array([[-9.81986152e-01, -1.88286824e-01, 5.59946554e-03, 2.61193228e-01, -9.72955253e-01, -3.08726352e-01], - [ 1.88900743e-01, -9.82107189e-01, 2.98408290e-03, 9.54498808e-01, 1.89261310e-01, -6.94110416e-01], - [ 4.31605153e-03, 3.58498427e-03, 9.99979861e-01, -2.03285632e-02, 2.34980450e-02, 2.70719416e-02], - [ 2.08031966e-04, -5.07233886e-04, -5.66479516e-05, -1.37388601e-01, -2.53976025e-02, 1.24094800e-02], - [ 9.11364493e-04, 1.07208858e-04, 1.20997966e-04, 3.76971113e-02, -1.27830009e-01, 7.71061585e-03], - [-4.52439252e-04, -6.48214886e-04, -2.48529247e-05, 4.15507018e-04, 7.24248385e-04, 6.49578656e-01]]), - np.array([[-9.64427970e-01, -2.63275240e-01, -2.19940087e-02, 5.55127926e-01, 6.76736640e-01, -5.39080693e-03], - [ 2.64046519e-01, -9.64654426e-01, -1.04287809e-02, -8.31628275e-01, 7.35752801e-01, 1.95933294e-03], - [ 1.25597856e-02, 1.12293654e-02, 9.99703591e-01, 1.34671593e-03, 2.21214750e-02, -1.64280220e-03], - [ 1.39293939e-05, -8.52234984e-05, 2.02695624e-04, 1.18481555e-02, -1.04808808e-02, -1.78310745e-04], - [ 5.46588215e-05, 3.29682334e-05, -4.22850783e-04, 7.92105029e-03, 9.65143171e-03, -9.99432432e-05], - [ 6.12997995e-04, -1.37073518e-03, 1.17914717e-04, 4.73951683e-03, -1.72558944e-03, 9.99982180e-01]]), - np.array([[-7.72780208e-01, 1.35468412e-01, -1.77495566e-02, 4.22842581e-01, -7.32826057e-01, 1.07921591e-01, 5.95578887e-01, -1.87722800e-01, 4.79726175e-03, -1.83129519e-03, -1.72205796e-02, -1.44056530e-01], - [-2.28519471e-03, -9.77326843e-01, -1.74843237e-04, -8.88837415e-01, -6.53268410e-01, -9.54807874e-01, 2.05369622e-01, -6.41688285e-02, 3.56670017e-05, -3.02582744e-03, 2.46120155e-02, 6.30228760e-02], - [ 8.50862335e-03, -1.27740285e-03, -9.69677742e-01, -2.66634251e-02, 5.60030809e-02, -1.43192612e-02, -6.36785160e-03, 1.98135470e-03, 2.43677208e-01, -3.31096809e-03, 1.06565881e-02, 1.48729311e-03], - [-2.14147548e-07, -5.13051234e-04, 2.28569369e-05, 1.46348523e-01, 1.03860372e-01, -8.38713717e-03, 1.11521615e-04, -4.39100546e-05, -3.88676030e-06, 3.89544548e-04, -4.17391596e-03, -1.20687744e-04], - [ 3.50229130e-05, 4.81508566e-05, -2.96471440e-04, 7.95770662e-02, -1.38834167e-01, -2.81132282e-03, -2.08014641e-04, 7.50030410e-05, 1.16277632e-04, 1.13920287e-03, -7.01170226e-03, -8.83950465e-05], - [-8.25205229e-05, 2.97095677e-03, 5.83651248e-05, -4.00418833e-03, -2.30212529e-03, -2.40166282e-01, -2.55349690e-04, -1.02689336e-04, -1.45133749e-05, -7.17160421e-05, 1.72592987e-04, -3.61621868e-03], - [ 6.33918522e-01, 1.62082701e-01, -3.39536374e-03, 5.09072525e-02, -5.43724190e-02, 8.05114239e-02, 7.01183592e-01, -2.94123355e-01, -1.51879157e-02, -2.87259623e-01, 9.22402696e-01, 2.36651590e-01], - [-2.89806557e-02, -1.40197163e-02, 6.27951672e-04, -7.98679610e-03, 2.09851086e-03, 1.10471065e-01, -3.33697652e-01, -9.34933041e-01, 2.50812940e-03, -9.42830766e-01, -3.36459026e-01, -9.52181619e-01], - [ 6.12262049e-03, 1.54700079e-03, 2.43717017e-01, -2.73706238e-03, 5.41124848e-03, 7.14441628e-04, 7.03656560e-03, -1.60801493e-03, 9.69722323e-01, 6.75971380e-03, 4.42384895e-02, 4.03303739e-03], - [-7.31124374e-05, -2.43839230e-05, -2.50078305e-05, 9.22017629e-04, -4.24008169e-04, 4.83394158e-06, -2.41322773e-04, -4.82461803e-04, -9.63686678e-05, 1.57899450e-01, 5.19950014e-02, -6.52497993e-04], - [-6.60885996e-05, -3.13030222e-05, -4.59073676e-06, 5.58053584e-03, -3.54713531e-03, -2.21919732e-05, -1.89441252e-04, -6.23442736e-05, -1.80039164e-04, -5.95345943e-02, 1.73855081e-01, 1.09011091e-03], - [-1.74789101e-03, 2.81715003e-04, -9.04124903e-07, 9.27870178e-05, 1.81765117e-06, -6.72796711e-03, -2.50526577e-03, -5.23512364e-03, -4.85249735e-06, 2.19802909e-03, 1.10782634e-05, 1.12199961e-01]]) + np.array([[ 9.82150856e-01, -1.87921630e-01, 4.07842531e-03, -2.55747246e-01, -9.61277765e-01, -1.95088862e-01], + [-1.88040577e-01, -9.82177055e-01, 2.19364068e-03, -9.56013224e-01, 2.41727181e-01, -3.54696639e-01], + [-4.42335800e-03, 3.65499013e-03, 9.99989268e-01, 1.52938349e-03, 2.70364948e-03, 5.97092474e-03], + [-1.77150592e-04, -5.11302213e-04, 7.18018030e-05, 1.38821901e-01, -3.27231465e-02, 1.96677683e-02], + [-8.84556439e-04, 8.96831659e-05, -1.18293930e-04, -3.66668232e-02, -1.28150299e-01, 1.14171188e-02], + [ 2.38840973e-04, -2.53960948e-04, -3.07164190e-06, -3.70754867e-03, 3.52357057e-03, 9.14099451e-01]]), + np.array([[-9.64378242e-01, -2.63590752e-01, -2.10946483e-02, 6.67618956e-01, 7.11326547e-01, -3.97038343e-03], + [ 2.64226439e-01, -9.64567735e-01, -1.08535955e-02, -7.44333038e-01, 7.02378251e-01, 2.46425477e-03], + [ 1.25912062e-02, 1.12874097e-02, 9.99718461e-01, 5.36744834e-03, 2.17700278e-02, -4.08761745e-04], + [ 1.12508015e-05, -8.58285900e-05, 2.09146973e-04, 1.06044546e-02, -1.00067204e-02, -1.76052849e-04], + [ 5.54046589e-05, 2.84236886e-05, -4.10342190e-04, 9.52540836e-03, 1.01447352e-02, -8.89069168e-05], + [ 6.73636151e-04, -1.25989426e-03, 3.44483770e-05, 4.61085742e-03, -1.53377328e-03, 9.99988979e-01]]), + np.array([[ 7.70914018e-01, -1.17395863e-01, -1.61715593e-02, 4.59701692e-01, 7.57267114e-01, 1.15686564e-01, 5.92241261e-01, -2.11326383e-01, -4.84261186e-03, 2.91306009e-03, -6.28586978e-03, 1.77870103e-01], + [ 2.76336921e-03, 9.83111079e-01, 7.71148014e-04, -8.70214552e-01, 6.25819046e-01, -9.61018495e-01, 1.74059753e-01, -6.40952347e-02, 2.21741739e-04, 3.07456670e-03, 1.53015857e-02, -6.52865349e-02], + [-8.46849828e-03, 1.12234659e-03, -9.62918857e-01, -2.91133365e-02, -1.60565961e-02, -1.07370021e-02, -6.33313466e-03, 2.23523718e-03, -2.69267884e-01, 3.07129058e-03, 9.13867744e-03, -1.89938445e-03], + [-6.92466645e-06, 5.06740412e-04, -1.38450410e-04, 1.43646953e-01, -1.01646527e-01, -8.92085192e-03, 8.34784720e-05, -3.97573892e-05, -4.00085053e-05, -2.94989477e-04, -2.66978184e-03, 1.33226866e-04], + [-3.80000792e-05, -3.18718207e-05, -1.63568996e-05, 8.70645571e-02, 1.46136988e-01, -3.32403955e-03, -1.88439589e-04, 7.75417900e-05, -4.50382342e-05, -1.13345175e-03, -6.23085504e-03, 9.89278222e-05], + [ 1.32346905e-04, -3.03127923e-03, 5.28930412e-05, -1.05060309e-02, 2.84137592e-03, -2.24436041e-01, -2.93715708e-04, -7.33395067e-05, 1.54107755e-05, 1.22940365e-04, 3.12930602e-04, 3.93381356e-03], + [-6.35823018e-01, -1.39839802e-01, -4.12875454e-03, 4.64975038e-02, 5.38456530e-02, 4.25073519e-02, 6.90307833e-01, -3.26425122e-01, 1.63428644e-02, 2.68287842e-01, 9.07672647e-01, -1.31558228e-01], + [ 3.60619974e-02, 1.19588699e-02, 4.65390067e-04, -6.12538918e-03, -2.13691125e-03, 1.03129205e-01, -3.77271639e-01, -9.19045505e-01, -1.64956437e-03, 9.47996995e-01, -3.70527401e-01, 9.65489660e-01], + [-6.21316965e-03, -1.32552092e-03, 2.69272852e-01, -2.30252304e-03, -5.03775015e-03, 5.34681309e-04, 7.05692246e-03, -1.78745500e-03, -9.62912928e-01, 2.06635847e-02, 6.83944327e-02, 1.94739912e-04], + [ 5.73877577e-05, 1.73869447e-05, 1.55155496e-05, 7.34971902e-04, 3.91788360e-04, -3.59118324e-05, -2.45527237e-04, -4.91453005e-04, -6.20538865e-05, -1.60713894e-01, 5.82005468e-02, 3.92650678e-04], + [ 5.35217661e-05, 2.69720933e-05, -7.92408612e-05, 4.79170446e-03, 3.69617884e-03, -5.29046880e-05, -2.03450513e-04, -6.51449327e-05, 4.25820931e-04, 5.51040523e-02, 1.74216186e-01, -1.49517626e-03], + [ 1.48946042e-03, -4.11837504e-04, 8.78835414e-06, -1.37529855e-05, -3.50704978e-05, -6.31055822e-03, -2.13519130e-03, -5.14879469e-03, -3.15665253e-05, 1.47542156e-03, -4.49606559e-03, -1.20832552e-01]]) ], }