diff --git a/source/AppImageBuilder.yml b/source/AppImageBuilder.yml index 2266e20..78f7e06 100644 --- a/source/AppImageBuilder.yml +++ b/source/AppImageBuilder.yml @@ -2,6 +2,8 @@ version: 1 #notes: #if you get a permission denied error from self.unix_socket, run this command: # sudo chmod 0666 /var/run/docker.sock + # + # You need to make sure MAFOT was compiled into the HEAT directory script: # Remove any previous build @@ -39,8 +41,11 @@ script: - cp -rn /opt/openfoam/openfoam-OpenFOAM-v1912/etc AppDir/usr/opt/openfoam/openfoam1912/etc - cp -rn /opt/openfoam/openfoam-OpenFOAM-v1912/bin AppDir/usr/opt/openfoam/openfoam1912/bin - cp -rn /opt/openfoam/openfoam-OpenFOAM-v1912/platforms AppDir/usr/opt/openfoam/openfoam1912/platforms + # set up environment var files for openfoam inside appimage - rm AppDir/usr/opt/openfoam/openfoam1912/etc/bashrc - mv AppDir/usr/opt/openfoam/openfoam1912/etc/bashrc_HEAT AppDir/usr/opt/openfoam/openfoam1912/etc/bashrc + - rm AppDir/usr/opt/openfoam/openfoam1912/etc/config.sh/setup + - mv AppDir/usr/opt/openfoam/openfoam1912/etc/config.sh/setupHEAT AppDir/usr/opt/openfoam/openfoam1912/etc/config.sh/setup # copy swak4foam bins and libs (for groovyBC) - cp -rn /home/tom/OpenFOAM/tom-v1912/platforms/linux64GccDPInt32Opt/bin/* AppDir/usr/opt/openfoam/openfoam1912/platforms/linux64GccDPInt32Opt/bin - cp -rn /home/tom/OpenFOAM/tom-v1912/platforms/linux64GccDPInt32Opt/lib/* AppDir/usr/opt/openfoam/openfoam1912/platforms/linux64GccDPInt32Opt/lib @@ -68,7 +73,7 @@ AppDir: id: HEATAppimage name: HEAT_AppImage icon: flame - version: v1.1-beta + version: v1.2-beta # # Set the python executable as entry point # exec: usr/bin/python3 # # Set the application main script path as argument. Use '$@' to forward CLI parameters @@ -89,6 +94,7 @@ AppDir: # key_url: 'https://dl.openfoam.com/pubkey.gpg' include: + - qt5-default - libc6-dev - bash - libnglib-6.2.1804 @@ -96,8 +102,8 @@ AppDir: - python3 - python3-pkg-resources - python3-tk - - mdsplus-python - python3-distutils + - mdsplus-python # FreeCAD # - freecad-python3 # - freecad @@ -175,6 +181,10 @@ AppDir: PyLib: '3.8' MATPLOTLIBDATA: '${APPDIR}/usr/lib/python3.8/site-packages/matplotlib/mpl-data' MATPLOTLIBRC: '${APPDIR}/usr/lib/python3.8/site-packages/matplotlib/mpl-data/matplotlibrc' + # openFOAM no user files + FOAM_CONFIG_NOUSER: 'True' + # for debbuging qt errors + #QT_DEBUG_PLUGINS: '1' test: fedora: diff --git a/source/GUIclass.py b/source/GUIclass.py index 31099b2..af5dfeb 100644 --- a/source/GUIclass.py +++ b/source/GUIclass.py @@ -318,7 +318,7 @@ def findPsiSepfromPFCs(self, t, rNew=None): Both MHD and PFC objects must be defined before running this function """ tIdx = np.where(t==self.MHD.timesteps)[0][0] - gfile = self.MHD.shotPath + '/' + '{:06d}/'.format(t) + 'g{:6d}.{:05d}'.format(self.MHD.shot, t) + gfile = self.MHD.shotPath + '{:06d}/'.format(t) + 'g{:06d}.{:05d}'.format(self.MHD.shot, t) #redefine LCFS to be tangent to CAD maximum R (because rNew=None) self.newLCFS(t, rNew=rNew, zNew=None, psiSep=None) print("CAD rTangent: {:f}".format(self.MHD.rTangent)) @@ -405,7 +405,7 @@ def newLCFS(self, t, rNew=None, zNew=None, psiSep=None): self.MHD.rTangent = rNew #overwrite existing gfile - gfile = self.MHD.shotPath + '/' + '{:06d}/'.format(t) + 'g{:06d}.{:05d}'.format(self.MHD.shot, t) + gfile = self.MHD.shotPath + '{:06d}/'.format(t) + 'g{:06d}.{:05d}'.format(self.MHD.shot, t) self.MHD.writeGfile(gfile, shot=self.MHD.shot, time=t, ep=ep) self.MHD.ep[idx] = EP.equilParams(gfile) for PFC in self.PFCs: diff --git a/source/GUIscripts/postProcessFunctions.py b/source/GUIscripts/postProcessFunctions.py index 2a486de..e1a18ea 100644 --- a/source/GUIscripts/postProcessFunctions.py +++ b/source/GUIscripts/postProcessFunctions.py @@ -13,39 +13,79 @@ #data = np.genfromtxt(file,comments="#", autostrip=True) #fig = px.line(x=data[:,0],y=data[:,1]) -root = '/home/tom/HEAT/data/d3d_000002/openFoam/heatFoam/' -file1 = root+'T002/postProcessing/probes/0/T' -file2 = root+'T101A/postProcessing/probes/0/T' +root = '/home/tom/results/WGPFC_Validation/staticScans/memo010_1.1/nstx_116313_LwrOut/openFoam/heatFoam/' +file1 = root+'SOLID844/postProcessing/probes/0/T' +file2 = root+'E-ED1408-284/postProcessing/probes/0/T' data1 = np.genfromtxt(file1,comments="#", autostrip=True) data2 = np.genfromtxt(file2,comments="#", autostrip=True) fig = go.Figure() -fig.add_trace(go.Scatter(x=data1[:,0], y=data1[:,1], name="T002", line=dict(color='royalblue', width=6, dash='dashdot'))) -fig.add_trace(go.Scatter(x=data2[:,0],y=data2[:,1],name="T101A", line=dict(color='magenta', width=6))) +fig.add_trace(go.Scatter(x=data1[:,0], y=data1[:,1], name="IBDH", line=dict(color='royalblue', width=6, dash='dot'))) +fig.add_trace(go.Scatter(x=data2[:,0],y=data2[:,1],name="OBD", line=dict(color='magenta', width=6))) fig.add_trace(go.Scatter( - x=[0, 3.2], + x=[0, 6], y=[1873, 1873], mode="lines+markers+text", - name="Sublimation T", + name="Limit", text=["Limit", "Limit"], textposition="top center", line=dict(color='firebrick', width=3, dash='dot'), - textfont=dict(family="Arial", size=16, color="firebrick"), + textfont=dict(family="Arial", size=18, color="firebrick"), )) fig.update_layout( -title="Temperature Probe Time Evolution: D3D negD", +#title="Temperature Probe Time Evolution", xaxis_title="Time [s]", yaxis_title="Temperature [K]", font=dict( -family="Arial", -size=24, -color="Black" + family="Arial", + size=24, + color="Black" +), +margin=dict( + l=5, + r=5, + b=5, + t=5, + pad=2 ), ) + +fig.update_layout(legend=dict( + yanchor="top", + y=0.99, + xanchor="left", + x=0.01 +)) + +fig.add_annotation(x=3.0, y=1000, + text="IBDH T(5s) = 2533 K", + showarrow=False, + yshift=20, + font=dict( + family="Arial", + size=24, + color="royalblue", + ), + ) + +fig.add_annotation(x=3.0, y=850, + text=" OBD T(5s) = 1935 K", + showarrow=False, + yshift=20, + font=dict( + family="Arial", + size=24, + color="magenta", + ), + ) + + + fig.show() +fig.write_image("/home/tom/phd/papers/2020Fall_FST_HEATintro/HEATintro/figures/hf_case1_2.svg") import pandas as pd diff --git a/source/__pycache__/GUIclass.cpython-38.pyc b/source/__pycache__/GUIclass.cpython-38.pyc index 695bef8..1819f4c 100644 Binary files a/source/__pycache__/GUIclass.cpython-38.pyc and b/source/__pycache__/GUIclass.cpython-38.pyc differ diff --git a/source/dashGUI.py b/source/dashGUI.py index d2df0c4..9136bea 100644 --- a/source/dashGUI.py +++ b/source/dashGUI.py @@ -878,8 +878,6 @@ def loadRes(n_clicks, ROIGridRes, gridRes, MachFlag): [State('CAD-upload', 'contents'), State('MachFlag', 'value')]) def loadCAD(STPfile, STPcontents, MachFlag): - if STPfile is None: - raise PreventUpdate if MachFlag is None: return [html.Label("Select a machine first", style={'color':'#fc0313'})] else: diff --git a/source/inputs/NSTXU/30degLwrDiv.csv b/source/inputs/NSTXU/30degLwrDiv.csv index f081661..4a1ca4a 100644 --- a/source/inputs/NSTXU/30degLwrDiv.csv +++ b/source/inputs/NSTXU/30degLwrDiv.csv @@ -23,11 +23,11 @@ # timesteps, PFCname, MapDirection, DivCode, intersectName #=====IBDH -0:5000, SOLID844, 1, LO, SOLID844:SOLID843#:E-ED1408-284:E-ED1408-573:E-ED1408-556 +0:5000, SOLID844, 1, LO, SOLID844:SOLID843:E-ED1408-284:E-ED1408-573:E-ED1408-556 #0:5000, SOLID843, 1, LO, SOLID843:SOLID842#:E-ED1408-556:E-ED1408-539:E-ED1408-522 #=====OBD -0:5000, E-ED1408-284, 1, LO, E-ED1408-284:E-ED1408-573#:E-ED1408-556 -0:5000, E-ED1408-573, 1, LO, E-ED1408-573:E-ED1408-556#:E-ED1408-539 +0:5000, E-ED1408-284, 1, LO, E-ED1408-284:E-ED1408-573:E-ED1408-556 +#0:5000, E-ED1408-573, 1, LO, E-ED1408-573:E-ED1408-556#:E-ED1408-539 #0:5000, E-ED1408-556, 1, LO, E-ED1408-556:E-ED1408-539:E-ED1408-522 #0:5000, E-ED1408-539, 1, LO, E-ED1408-539:E-ED1408-522:E-ED1408-159 #=====IBD diff --git a/source/inputs/ST40/ST40_input.csv b/source/inputs/ST40/ST40_input.csv index 11ffd9d..f2f1e8f 100644 --- a/source/inputs/ST40/ST40_input.csv +++ b/source/inputs/ST40/ST40_input.csv @@ -49,7 +49,7 @@ fracLO,0.0 #============================================================== Nphi, 1 ittLaminar, 10.0 -ittStruct, 1.0 +ittStruct, 30.0 Smin, 0.0 Smax, 5.0 phimin, 0.0 diff --git a/source/inputs/ST40/limiter.csv b/source/inputs/ST40/limiter.csv index 5d40adf..5047288 100644 --- a/source/inputs/ST40/limiter.csv +++ b/source/inputs/ST40/limiter.csv @@ -19,9 +19,5 @@ # 40-1783_2 TILE UPPER # 40-1782_3 TILE LOWER TYPE A0 timesteps, PFCname, MapDirection, DivCode, intersectName -0:250, T031, -1, UI, T031:T038:T030:T039:T044:T045 -0:250, T032, -1, UI, T032:T033:T022:T023:T018:T019 -0:250, T033, -1, UI, T033 -#0:250, T031, 1, LI, T031 -0:250, T030, 1, LI, T030 -0:250, T029, 1, LI, T029 +0:250, T031, -1, UI, T031:T030:T024:T025 +0:250, T031, 1, LI, T031:T032:T037:T038