|
[Sponsors] |
[Discussion]Should we create a GUI interface to OF utilities?[With Working prototype] |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 21, 2016, 06:41 |
[Discussion]Should we create a GUI interface to OF utilities?[With Working prototype]
|
#1 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
I find that setting up long chains of commands can be rather tedious because one often needs to look up commands, check every step, manually put it in a script file for automation, make sure spelling is correct, and so on.
I think it would be relatively easy to create a simple GUI that offers an interface to the various command line programs contained in OpenFOAM. I even went so far to create a working prototype to illustrate this. The prototype will be described in the second post. I have a few ideas, which I will put in a loose list here:
|
|
October 21, 2016, 06:48 |
|
#2 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
I created a small prototype in a few hours to illustrate the concept.
The GUI is modular so that definition of a program can be done in a few lines like this: Code:
class transformPoints(tool): options = [ choiceOption( "mode", [ choiceItem("translate", "-translate", [vector("offset", XYZTEXT, VZERO)]), choiceItem("scale", "-scale", [vector("factor", XYZTEXT, VONE)]), choiceItem("rotate", "-rotate", [argumentTuple(vector("vector a", XYZTEXT, EX), vector("vector b", XYZTEXT, EY))]), choiceItem("roll pitch yaw", "-rollPitchYaw", [vector("rotation vector", ["roll", "pitch", "yaw"], [90, 0, 0])]), choiceItem("yaw pitch roll", "-yawPitchRoll", [vector("rotation vector", ["yaw", "pitch", "roll"], [90, 0, 0])]) ] ), boolOption("rotate Fields", "-rotateFields", False) ] def __init__(self): super(transformPoints, self).__init__("transform mesh", "transformPoints", False) Currently the GUI is very simple and looks like this: The GUI is written in python with the tkinter module but for a real project we can use a different GUI framework if there are better suggestions. Feel free to download the attached script and try it out yourself. Last edited by chriss85; October 21, 2016 at 11:37. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Setting rotating frame of referece. | RPFigueiredo | CFX | 3 | October 28, 2014 05:59 |
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source | silvan | CFX | 3 | June 16, 2014 10:49 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 08:00 |
WARNING:''cannot create surface from sliding interface zone'' | bahar | FLUENT | 12 | March 22, 2013 16:03 |
Actuator disk model | audrich | FLUENT | 0 | September 21, 2009 08:06 |