Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VirtFlow_GUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Weissenbrunner
VirtFlow_GUI
Commits
8415fffb
Commit
8415fffb
authored
2 years ago
by
Andreas Weissenbrunner
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc
+0
-0
0 additions, 0 deletions
FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc
Flow_class.py
+10
-8
10 additions, 8 deletions
Flow_class.py
with
10 additions
and
8 deletions
FlowProfiles/__pycache__/class_flowprofiles.cpython-38.pyc
+
0
−
0
View file @
8415fffb
No preview for this file type
This diff is collapsed.
Click to expand it.
Flow_class.py
+
10
−
8
View file @
8415fffb
...
@@ -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
(
dl
s
)
print
(
dl
k
)
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment