diff --git a/Flow_class.py b/Flow_class.py index 685f094ba040b24f02b376bfa8ff67372c7e367d..646e2b073349543ea56f26ce82c34a3357ab754c 100644 --- a/Flow_class.py +++ b/Flow_class.py @@ -66,29 +66,6 @@ def do_reconstruct_path(A,phi,Nmodes=0,umean = 0): return umean + np.real(u_tilde) -def get_POD_coeffs(rk,dist,interpol_list,inttype): - # A is the coefficient matrix that is recovert from interpolation A.shape[1] must be number of used modes - rk = np.array(rk) - dist = np.array(dist) - A = np.zeros((*rk.shape,len(interpol_list) )) - if len(A.shape) == 1: - A = A.reshape(1,A.shape[0]) - A = A.T - # - for i, inter_i in enumerate(interpol_list): - if inttype == "lin": - A[i] = inter_i((rk,dist)).T - elif inttype == "rbf": - A[i] = inter_i(rk,dist).T - elif inttype == "spline": - A = np.zeros((rk.size,dist.size,len(interpol_list) )) - if len(A.shape) == 1: - A = A.reshape(1,A.shape[0]) - A = A.T - # print(A.shape) - A[i] = inter_i(rk,dist).T - return A.T - def do_reconstruct_add(A,phi,Nmodes,u_tilde,umean = 0): #u_tilde = np.zeros((A.shape[0],phi.shape[0])) diff --git a/GUI_Elbow.py b/GUI_Elbow.py index 57ce6f88d59314be7adbc8c322acafdf64af2019..4146b6b23fd71d1d4c99dde217f60cf9c4020fe6 100644 --- a/GUI_Elbow.py +++ b/GUI_Elbow.py @@ -1040,12 +1040,10 @@ class mainPanel(wx.Panel): all_phi = phi # if flow.case == "SingleElbow": - # gather all + # gather all parameters and maka the ND-Matrixes rcgrid, distgrid, phigrid = np.meshgrid(all_Rc,all_dist,all_phi,indexing='ij') - # ugrid = flow.get_profile(distgrid,rcgrid) all_fm = self.regint_fm((rcgrid,distgrid,phigrid)) - # flatten the first two dimensions - # ugrid = ugrid.reshape(-1,*ugrid.shape[2:]) + # else: # also variate the inbetween distance dl if self.dl_u > 0: @@ -1054,8 +1052,7 @@ class mainPanel(wx.Panel): all_dl = np.linspace(lim0,lim1 , Ndl) else: all_dl = dl - # and ghater all - + # gather all parameters and maka the ND-Matrixes rcgrid,dlgrid, distgrid, phigrid = np.meshgrid(all_Rc,all_dl,all_dist,all_phi,indexing='ij') # ugrid = flow.get_profile(distgrid,rcgrid) print("discretisation: " + str(rcgrid.shape)) diff --git a/README.md b/README.md index d4a79f5cad9746ccf48d51b171ced8d22525a43a..e4f28cf5ddfe50dc3352991aeb494f4308b452ae 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,21 @@ # VirtFlow_GUI -A User Interface, which enables the inspection of velocity profiles downstream of a single elbow with parameter variation of: +To use just start **GUI_Elbow.py** in a python3 environment. Necessary packages: Numpy, Scipy, json -- curvature radius (between 0.51 to 10 times the diameter (D)) -- downstream distances (from 0 to 95 D) +## Functionality + +A User Interface, which enables the inspection of velocity profiles downstream of a single elbow, double elbow out-of-plane, and double-S-elbow, with parameter variation of: + +- curvature radius (between 0.51 to 10 times the diameter (D) for the single elbow, and 0.51 to 5.51 for the other cases) +- downstream distances (from 0 to 100 D) - Reynolds numbers (from 5e4 to 1e6) - pipe wall roughness (from 0 to ?? ks/D) -- angular path (from -pi to pi) - +- angular path (from -180 to 180) -## To do: +Ultrasonic flow meters can be evaluated at the moment only for diametral paths with any number of reflections +Uncertainties can be evaluated by quasi monte carlo -- uncertainty for each and all parameter -- flow meter kalibration/correction factor calculation -- interpolation in the xy-space -- extension to two elbows in a row (out-of- and in-plane) \ No newline at end of file +## ToDo: +- Ultrasonic non-diagonal paths therefore interpolation of the modes is necessary +- Electro-Magnetic flow meters +- deletion of unused functions \ No newline at end of file diff --git a/test.py b/test.py deleted file mode 100644 index a1d99c1e064ccdf3fefc1a5395a2a0efbe788a76..0000000000000000000000000000000000000000 --- a/test.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Tue Aug 9 13:07:03 2022 - -@author: weisse02 -""" - -import wx - -class Example(wx.Frame): - - def __init__(self, parent, title): - super(Example, self).__init__(parent, title = title, size = (200,300)) - - self.InitUI() - self.Centre() - self.Show() - - def InitUI(self): - p = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - l1 = wx.StaticText(p,label = "Enter a number",style = wx.ALIGN_CENTRE ) - vbox.Add(l1,0, wx.ALL|wx.EXPAND, 20) - - - b1 = wx.Button(p, label = "Btn1") - vbox.Add(b1,1,wx.SHAPED) - - b2 = wx.Button(p, label = "Btn2") - vbox.Add(b2,0, wx.RESERVE_SPACE_EVEN_IF_HIDDEN) - - - t = wx.TextCtrl(p) - vbox.Add(t,1,wx.EXPAND,10) - hbox = wx.BoxSizer(wx.HORIZONTAL) - l2 = wx.StaticText(p,label = "Label2", style = wx.ALIGN_CENTRE) - - hbox.Add(l2,0,wx.EXPAND) - b3 = wx.Button(p,label = "Btn3") - hbox.AddStretchSpacer(1) - hbox.Add(b3,0,wx.ALIGN_LEFT,20) - vbox.Add(hbox,1,wx.ALL|wx.EXPAND) - p.SetSizer(vbox) - -app = wx.App() -Example(None, title = 'BoxSizer demo') -app.MainLoop() \ No newline at end of file diff --git a/test_reg.npz b/test_reg.npz deleted file mode 100644 index 717ddd53fdda347f5a6d2d10325183aeccc7fafb..0000000000000000000000000000000000000000 Binary files a/test_reg.npz and /dev/null differ