I was wondering if there are any plans on this. I had sparingly used this for automating the setups which otherwise could be a bit laborious task. But having no significant prior exposure to Python, I had to harvest the code from the example files given in API documentation, and stitch these fragments to make a workable code. However I believe there is a lot of potential in this.
THanks
Solved! Go to Solution.
Solved by Jon.Wilde. Go to Solution.
Hi Omkar,
There is one in 2 days time, check the thread just next to this one 😉
Hope you can join us!
No worries Omkar, I hope it proves to be useful. It was highly requested in previous meetings which is why we decided to run one.
4pm our time too 😉
Just so you know, this will probably be a multi Hangout kind of topic.
This week I plan on discussing how to integrate your scripts into the UI for ease of use and basically add your own funcationality.
I hope this will sparks conversation on what people are lacking from the documentation so I can plan another one in the future on writing usful scripts of their own.
Hi Omkar,
Was yesterday's Hangout what you were looking for in regards to Python API?
Did you happen to review the files I had available to download?
Thanks!
Hi Royce,
I did some scripting initially when I started using Simulation CFD last year but ultimately gave up. But I would have to say that yesterday's session did remind me of its potential again, however I realised that I needed to work on the unfamiliarity of syntax.
I have some experience of coding in Fortran/C/Matlab but never got my hands on Python. The link for Udacity you suggested was pretty handy in getting me started. I am spending some time in getting familiarised with Python's structure and syntax from other sources as well. Once I get a handle on this, I will play with the code and explore the possibilities.
Regards
Hi Royce,
As I understand from the documentation, there are two scripts that are compatible with SimCFD, Python and QT. I remember to have read in the documentation that typically QT is used for automating the setup while Python is used for result extraction and post processing etc. However, I see from API documentation for Python (offline) that under the Setup module we have many classes that can help setup the model. But I also see that not all the classes and functions in the py files of the modules (DC, setup etc) are explained in API documentation. At the same time, I also understand that QT is getting phased out to be replaced completely by Python.
In view of all this, can you please explain what is the scope for both Python and QT along with your general recommendations?
Thanks
Omkar
Omkar,
QT is our legacy scripting, and we have been switching over to Python that will eventually cover all of our scripting capabilities. We chose to implement a phase in approach, so Python initially covered results processing, but we are phasing in the functionality for setup tasks as well. Royce certainly has a broad set of experience on scripting for SimCFD, so I'd defer to him on exactly how to use the scripting capabilities. In general, however, I'd use python for results processing and communicating with other software, while using Python calls of QT scripts for setup tasks. As the setup tasks are covered more completely by Python, the QT script calls would be replaced by direct Python functions.
Thanks,
Heath Houghton
Product Manager - Autodesk Simulation CFD
Hi Omkar,
The 2015 release has a lot more of the setup aspects covered compared to previous releases in the Python API. You should be able to cover the most typical workflows.
That was why during the API hangout I made the comment that Python API does cover most of the model setups aspects, but if there is a hole then you can almost always use a QTScript to fill in the hole for the short term.
What are you trying to script?
I would start by trying to write everything in Python. If you can't figure out how to do something specific then I would suggest to ask us in the forum for some guidance.
Best regards,