Skip to content

Commit 30515fe

Browse files
committed
Basic instructions
How to download/build pyuedge, read and save hdf5 files, and some simple plot commands.
1 parent 6f2acf4 commit 30515fe

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
Various procedures for python uedge:
2+
#################################
3+
4+
For initial installation of the python version of uedge:
5+
============================================
6+
To install forthon and mppl (should only need to do once)
7+
pip install forthon mppl
8+
9+
To install the present version of uedge
10+
pip install uedge
11+
12+
To install a specific version of uedge (here V7.08)
13+
pip install uedge==7.08.1
14+
15+
To install a specific version and leave source code available
16+
pip install —upgrade —no-cache-dir uedge==7.08.1
17+
18+
To download a specific version of uedge
19+
pip download uedge==7.08.1
20+
21+
should add —upgrade if this is an upgrade to an existing build
22+
######################################################
23+
24+
To build or remake a version of uedge on your machine,
25+
say uedge_vxx, after you have made changes to the source
26+
============================================
27+
cd to uedge_vxx
28+
edit the files you want to change
29+
go back to the uedge_vxx level
30+
type:
31+
python setup.py sdist
32+
cd dist
33+
type:
34+
pip install uedge_vxx.tar.gz - - upgrade
35+
###############################################
36+
37+
To restore an hdf5 save file within a python session:
38+
============================================
39+
python
40+
import uedge
41+
from uedge.hdf5 import *
42+
hdf5_restore(“hdf5_filename”)
43+
##############################################
44+
45+
To save a uedge solution in hdf5 format:
46+
============================================
47+
within a pyuedge session:
48+
from uedge.hdf5 import * #if not done previously
49+
hdf5_save(“mycase.hdf5”)
50+
#############################################
51+
52+
To convert old pdb files to hdf5 files
53+
=============================================
54+
login to viserion.llnl.gov (Meyer’s linux box)
55+
module load anaconda2
56+
pdb2hdf5 mycase.pdb mycase.hdf5
57+
# here mycase.hdf5 will then contain the date in hdf5 format
58+
###############################################
59+
60+
To read input file
61+
=============================================
62+
from within python
63+
import uedge
64+
from uedge import * #makes the uedge variables available
65+
from input_file_name import * #omit any .py
66+
###############################################
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
=======
2+
Plotting profiles on outer divertor plate:
3+
=======
4+
5+
profile(com.yyrb,bbb.ne[com.nx,],title=“Electron density”, xlabel=“Distance along outer plate (m)”, ylabel=“ne (1/m**3)”)
6+
7+
profile(com.yyrb,bbb.ng[com.nx,],title=“Hydrogen atom density”, xlabel=“Distance along outer plate (m)”, yfrlabel=“ng(1/m**3)”)
8+
9+
profile(com.yyrb,bbb.te[com.nx,]/bbb.ev,title=“Electron temperature”, xlabel=“Distance along outer plate (m)”, ylable=“Te (eV)”)
10+
11+
profile(com.yyrb,bbb.ti[com.nx,]/bbb.ev,title=“Ion temperature”, xlabel=“Distance along outer plate (m)”, ylable=“Ti (eV)”)
12+
13+
profile(com.yyrb,bbb.feex[com.nx,],title=“Electron thermal heat flux *area”, xlabel=“Distance along outer plate (m)”, ylabel=“feex”)
14+
15+
profile(com.yyrb,bbb.feix[com.nx,],title=“Ion thermal heat flux *area”, xlabel=“Distance along outer plate (m)”, ylabel=“feix”)
16+
17+
18+
=======
19+
Plotting profiles on inner divertor plate:
20+
=======
21+
22+
profile(com.yylb,bbb.ne[0,],title=“Electron density”, xlabel=“Distance along inner plate (m)”, ylabel=“ne (1/m**3)”)
23+
24+
profile(com.yylb,bbb.ng[0,],title=“Hydrogen atom density”, xlabel=“Distance along inner plate (m)”, ylabel=“ng(1/m**3)”)
25+
26+
profile(com.yylb,bbb.te[0,]/bbb.ev,title=“Electron temperature”, xlabel=“Distance along inner plate (m)”, ylabel=“Te (eV)”)
27+
28+
profile(com.yylb,bbb.ti[0,]/bbb.ev,title=“Ion temperature”, xlabel=“Distance along inner plate (m)”, ylabel=“Ti (eV)”)
29+
30+
profile(com.yylb,-bbb.feex[0,],title=“Electron thermal heat flux *area”, xlabel=“Distance along inner plate (m)”, ylabel=“feex”)
31+
32+
profile(com.yylb,-bbb.feix[0,],title=“Ion thermal heat flux *area”, xlabel=“Distance along inner plate (m)”, ylabel=“feix”)
33+
34+
=======
35+
Plotting midplane profiles:
36+
=======
37+
38+
profile(com.yylb,bbb.ne[bbb.ixmp,],title=“Electron density at midplane”, xlabel=“Distance from separatrix (m)”, ylabel=“ne (1/m**3)”)
39+
40+
profile(com.yylb,bbb.ng[bbb.ixmp,],title=“Hydrogen atom density at midplane”, xlabel=“Distance from separatrix (m)”, ylabel=“ng(1/m**3)”)
41+
42+
profile(com.yylb,bbb.te[bbb.ixmp,]/bbb.ev,title=“Electron temperature at midplane”, xlabel=“Distance from separatrix (m)”, ylabel=“Te (eV)”)
43+
44+
profile(com.yylb,bbb.ti[bbb.ixmp,]/bbb.ev,title=“Ion temperature at midplane”, xlabel=“Distance from separatrix (m)”, ylabel=“Ti (eV)”)
45+
46+
47+

0 commit comments

Comments
 (0)