Skip to content
Snippets Groups Projects
Commit 8415fffb authored by Andreas Weissenbrunner's avatar Andreas Weissenbrunner
Browse files

reduced the distances that are evaluated in the flow meter calculation

parent a6529a27
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -234,23 +234,24 @@ class Elbow_profile(): ...@@ -234,23 +234,24 @@ class Elbow_profile():
self.regint_ux = [] self.regint_ux = []
self.regint_uy = [] self.regint_uy = []
self.regint_uz = [] self.regint_uz = []
methodstr = 'linear'
# the spline interpolation attention it can only evaluate ordered input arrays # the spline interpolation attention it can only evaluate ordered input arrays
if case=="SingleElbow": if case=="SingleElbow":
for i in range(0,self.Nmodes): 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_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_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.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_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 = 'cubic',bounds_error = False,fill_value=None))#,bounds_error = True,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 = '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 = methodstr, bounds_error = False,fill_value=None))#,bounds_error = True,fill_value=None ))
else: else:
for i in range(0,self.Nmodes): 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_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_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.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_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 = 'cubic',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 = 'cubic',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 #self.coeffs_z = coeffs_z
del coeffs_x del coeffs_x
del coeffs_y del coeffs_y
...@@ -632,7 +633,7 @@ class Elbow_profile(): ...@@ -632,7 +633,7 @@ class Elbow_profile():
# #
# if no distnces and Rcs given it will calculate them for all # if no distnces and Rcs given it will calculate them for all
# the sampled distances and Rc # 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 Rcs == None: Rcs = self.Rk
if dls == None: dls = self.dl if dls == None: dls = self.dl
# get the distances and length of the us-paths # get the distances and length of the us-paths
...@@ -656,8 +657,9 @@ class Elbow_profile(): ...@@ -656,8 +657,9 @@ class Elbow_profile():
print("Rc") print("Rc")
print(rci) print(rci)
for k,dlk in enumerate(dls): for k,dlk in enumerate(dls):
print(dls) print(dlk)
for j,distj in enumerate(dists): for j,distj in enumerate(dists):
#print(distj)
#run through all the path reflections and integrate them for all angles #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) 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) regInt = interpol.RegularGridInterpolator((self.Rk,self.dl,self.dist,self.phi[:,0]),Int,bounds_error = False,fill_value=None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment