diff --git a/FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc b/FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc index b82d606b235e30a0f5c6aad6d8db96fefb09cd5c..1b7dd32d3779c0407169227fe8b3bf9f395edf13 100644 Binary files a/FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc and b/FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc differ diff --git a/Flow_class.py b/Flow_class.py index de8c05a2149ade6790760f1d64ad7a276992a30f..175456e78e01ff79afb709164aa23516dcea626d 100644 --- a/Flow_class.py +++ b/Flow_class.py @@ -234,23 +234,24 @@ class Elbow_profile(): self.regint_ux = [] self.regint_uy = [] self.regint_uz = [] + methodstr = 'linear' # the spline interpolation attention it can only evaluate ordered input arrays if case=="SingleElbow": for i in range(0,self.Nmodes): # self.splineint_ux.append(interpol.RectBivariateSpline(self.dist,self.Rk,self.dl,pod_x["coeffs"][:,:,i].T,kx= polydeg,ky=polydeg )) # self.splineint_uy.append(interpol.RectBivariateSpline(self.dist,self.Rk,self.dl,pod_y["coeffs"][:,:,i].T,kx= polydeg,ky=polydeg )) # self.splineint_uz.append(interpol.RectBivariateSpline(self.dist,self.Rk,self.dl,pod_z["coeffs"][:,:,i].T,kx= polydeg,ky=polydeg )) - self.regint_ux.append(interpol.RegularGridInterpolator((self.Rk,self.dist), coeffs_x[:,:,i],method = 'cubic',bounds_error = False,fill_value=None))#,bounds_error = False,fill_value=None )) - self.regint_uy.append(interpol.RegularGridInterpolator((self.Rk,self.dist), coeffs_y[:,:,i],method = 'cubic',bounds_error = False,fill_value=None))#,bounds_error = True,fill_value=None )) - self.regint_uz.append(interpol.RegularGridInterpolator((self.Rk,self.dist), coeffs_z[:,:,i],method = 'cubic',bounds_error = False,fill_value=None))#,bounds_error = True,fill_value=None )) + self.regint_ux.append(interpol.RegularGridInterpolator((self.Rk,self.dist), coeffs_x[:,:,i],method = methodstr, bounds_error = False,fill_value=None))#,bounds_error = False,fill_value=None )) + self.regint_uy.append(interpol.RegularGridInterpolator((self.Rk,self.dist), coeffs_y[:,:,i],method = methodstr, bounds_error = False,fill_value=None))#,bounds_error = True,fill_value=None )) + self.regint_uz.append(interpol.RegularGridInterpolator((self.Rk,self.dist), coeffs_z[:,:,i],method = methodstr, bounds_error = False,fill_value=None))#,bounds_error = True,fill_value=None )) else: for i in range(0,self.Nmodes): # self.splineint_ux.append(interpol.RectBivariateSpline(self.dist,self.Rk,self.dl,pod_x["coeffs"][:,:,i].T,kx= polydeg,ky=polydeg )) # self.splineint_uy.append(interpol.RectBivariateSpline(self.dist,self.Rk,self.dl,pod_y["coeffs"][:,:,i].T,kx= polydeg,ky=polydeg )) # self.splineint_uz.append(interpol.RectBivariateSpline(self.dist,self.Rk,self.dl,pod_z["coeffs"][:,:,i].T,kx= polydeg,ky=polydeg )) - self.regint_ux.append(interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist), coeffs_x[:,:,:,i],method = 'cubic',bounds_error = False,fill_value=None )) - self.regint_uy.append(interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist), coeffs_y[:,:,:,i],method = 'cubic',bounds_error = False,fill_value=None )) - self.regint_uz.append(interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist), coeffs_z[:,:,:,i],method = 'cubic',bounds_error = False,fill_value=None )) + self.regint_ux.append(interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist), coeffs_x[:,:,:,i],method = methodstr ,bounds_error = False,fill_value=None )) + self.regint_uy.append(interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist), coeffs_y[:,:,:,i],method = methodstr ,bounds_error = False,fill_value=None )) + self.regint_uz.append(interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist), coeffs_z[:,:,:,i],method = methodstr ,bounds_error = False,fill_value=None )) #self.coeffs_z = coeffs_z del coeffs_x del coeffs_y @@ -632,7 +633,7 @@ class Elbow_profile(): # # if no distnces and Rcs given it will calculate them for all # the sampled distances and Rc - if dists == None: dists = self.dist + if dists == None: dists = np.concatenate((self.dist[0:1],self.dist[1:-1:5],self.dist[-1:])) if Rcs == None: Rcs = self.Rk if dls == None: dls = self.dl # get the distances and length of the us-paths @@ -656,8 +657,9 @@ class Elbow_profile(): print("Rc") print(rci) for k,dlk in enumerate(dls): - print(dls) + print(dlk) for j,distj in enumerate(dists): + #print(distj) #run through all the path reflections and integrate them for all angles Int[i,k,j] = self.get_pathint_allphi_de(dz + distj,dL,weights,rci,dlk,L,makeplot=makeplot) regInt = interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist,self.phi[:,0]),Int,bounds_error = False,fill_value=None)