A small UI for running CQL3D
Project description
CQL3DUI
A simple user-interface for the Bounce-Averaged Fokker-Planck code CQL3D.
Author: Matthew Poulos (CompX) Email: poulos@compxco.com
Overview
CQL3DUI is a simple Python/Tkinter-based GUI for the Fortran-based code CQL3D. The interface allows users to:
- Import, export, view, and edit
cqlinputfiles (Fortran namelists). - Compile, load and run CQL3D executables.
- Plot and visualize the resulting output (NetCDF) from CQL3D.
Detailed information and documentation on CQL3D can be found at:
Installation
To install CQL3DUI, open a terminal and run:
pip install cql3dui
To run CQL3DUI, simply type:
cqlui
Compiling CQL3D
Prerequisite: You must have NetCDF, PGPLOT, and gfortran downloaded and installed.
Click the button labeled Compile CQL3D located in the lower left corner of the UI. A new interface called CQL3D Compiler will pop up. The interface will attempt to automatically detect the necessary NetCDF library and PGPLOT path. It will indicate if these files are successfully found in the Compilation Output. Click the button GENERATE MAKEFILE & COMPILE and the UI will automatically create a makefile and attemt to compile CQL3D using gfortran. A message box will appear indicating successful compilation. Once CQL3D is successfully compiled, exit the CQL3D Compiler interface to return to the main UI.
Optional: To load a pre-compiled CQL3D executable, click the button labeled Load Exec.
Running Example Tests
A set of example tests are provided in the package contents. On initial startup, the UI will automatically load with the namelist for Test 1.0 loaded and will automatically point to the correct auxiliary file folder to run all of the provided test cases.
Workflow
1. Import, View, and Edit Namelists
To import a test case, click the Import Namelist button in the top left of the UI and select any of the test files.
Editing Features:
- Navigation: Use the GUI tabs to navigate through the file.
- Documentation: Click on any variable to highlight it within the
cqlinput_helpdocumentation (displayed in the right panel). - Tooltips: Hover the cursor over any namelist variable to see a short description.
- Export: Click Export Namelist to save the variables currently in the UI to a
cqlinput(fortran namelist) file.
Keyboard Shortcuts:
| Shortcut | Action |
|---|---|
Up / Down |
Move between variables in the left panel. |
Ctrl + Left / Right |
Move between GUI tabs (Windows/Linux). |
Cmd + Left / Right |
Move between GUI tabs (macOS). |
Shift + Left / Right |
Move between instances of the highlighted variable in the help documentation. |
2. Run CQL3D
Click the Run CQL3D button.
- A
runsfolder is created in the current directory where the ui was launched from. - A subfolder labeled by the date and time is created inside
runs. - The current namelist variables are saved to a
cqlinputfile inside that subfolder. - File Linking: The code checks if auxiliary files (
eqdsk,rffile, etc.) are required.- It looks in the chosen auxiliary file folder for these files
- If found, it creates symbolic links in the newly created run folder to the required files.
- A separate thread is launched to execute CQL3D.
- After completion, a window pops up showing the output and any errors.
3. Plot and Visualize Output
Once CQL3D has successfully completed:
- Click the Plot Results button (lower right).
- By default, the UI loads the NetCDF (
.nc) file from the last successful run. - Optional: If no
.ncfile exists or you wish to view a different run, click Load .nc file (top left) in the plotting interface. - Navigate through the various options to visualize the physics results.
- Press the left/right arrow keys in the 2D velocity-space contours to cycle through flux surfaces.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cql3dui-0.0.10.tar.gz.
File metadata
- Download URL: cql3dui-0.0.10.tar.gz
- Upload date:
- Size: 11.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c896ac9aa4eb9a64cd2a29ece21859b98121b167c4aacf2e457e68d78d3e442
|
|
| MD5 |
dd4941c7e68f4647c88e678c6edc5423
|
|
| BLAKE2b-256 |
ba94c3941e80bf0edc5390ce9b635158c6f112b171b0b3c04f1e388221203328
|
File details
Details for the file cql3dui-0.0.10-py3-none-any.whl.
File metadata
- Download URL: cql3dui-0.0.10-py3-none-any.whl
- Upload date:
- Size: 11.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84d06b87d413fe9726b9b5ee3b2ef0d82088b47bbc8ad4c851de59ab1720ad2f
|
|
| MD5 |
406beabd4e5e8439086f2d5c9364225c
|
|
| BLAKE2b-256 |
450d80c5357cfc6c9b67c17a89a3d4d96b967ba6864abe842bae2bb4e3a437ed
|