Discussion Groups

Simulation CFD

New Member
Posts: 1
Registered: ‎03-12-2014

Helping with CFD Automation using Python and Qt

134 Views, 2 Replies
03-12-2014 02:44 PM



I'm trying to set-up up an analysis, run it, and then extract results. It's my understanding that Qt can be used to create the set-up portion, whereas Python is typically used to extract results/change parameters once an analysis has been set-up.


The documentation for the API is very sparse. Does anyone here have any in depth knowledge of Qt or Python that has run a designstudy before in auto mode using the aforementioned programming languages? And is there more in-depth documentation for doing so? Do I need to download a Qt editor to do the set-up and then run a Python script? Any help would be great. Thanks.



Please use plain text.
*Expert Elite*
Posts: 437
Registered: ‎10-02-2012

Re: Helping with CFD Automation using Python and Qt

03-13-2014 02:02 AM in reply to: jdmurrow86

Depends on what you want to automate really. I have done small scripts to first run the simulation using k-eps and then RNG for stability. I could find one:



# Script for just the active scenario#



from CFD import Setup


#setup the scenario

study = Setup.DesignStudy.Create()

scenario = study.getActiveScenario()


#setup the basic model

scenario.setProperty("solverComputer", "Cluster (16 cores)")

scenario.setProperty("flow", "On")

scenario.setProperty("analysisMode", "Steady State")

scenario.setProperty("autoStartup", "Extend")

scenario.setProperty("turbulence", "On")

scenario.setProperty("intelligentSolutionControl", "On")

scenario.setProperty("automaticConvergenceAssessment", "Off")

scenario.setProperty("turbLamRatio", "1000")


#run with k-epsilon/ADV1

scenario.setProperty("turbModel", "k-epsilon")

scenario.setProperty("advectionScheme", "ADV 1")

scenario.setProperty("continueFrom", "s0")




#run with RNG/ADV5

scenario.setProperty("turbModel", "RNG")

scenario.setProperty("advectionScheme", "ADV 5")

scenario.setProperty("continueFrom", "s800")

scenario.setProperty("iterations", 2200)



There was a script which I could get done with Autodesk Support's help, where it automates more than one scenario by looping through the Design Study, but can't find it right now. You might find the "Examples" section in API doco quite handy. You can pick and choose the code from there to suit to your requirement. But I agree, the doco is sparse and we could do with a bit more comprehensive guide and more examples. 

Please use plain text.
Product Support
Posts: 307
Registered: ‎08-31-2011

Re: Helping with CFD Automation using Python and Qt

03-14-2014 06:01 AM in reply to: OmkarJ

I'd imagine you might ahve also seen the extra exampls scripts in the local help that can be downloaded from here


Please use plain text.