Query automation of Reults of Simulations
hi, I m simulating a model of a rotating e-motor and solved the model with different speeds with OptiStruct (as different loadsteps / loadcols). im already done to do automation of Query Stress Data in every nodes. But i want to query more than just one Simulations result. for example i need Stress Data of from 1RPM to 20000RPM, which means 20000 Simulations Results should be reported. i did automation with tcl Commends
thanks
Answers
-
you would need to perform a loop (for) looping over all your rotations (probably readed as simulations)
So, here, instead of performing only for the current simulation (1), you would need a loop for all of them
for 1...number_of_sim {
...
mySetName Add allresult SetCurrentSimulation $i#query commands, and set to different name, according to the RPM}To help reduce the effort here, you could maybe use a mixed combination of TCL and HWC commands. Except for query, they work like a charm.0 -
Adriano A. Koga_21884 said:
you would need to perform a loop (for) looping over all your rotations (probably readed as simulations)
So, here, instead of performing only for the current simulation (1), you would need a loop for all of them
for 1...number_of_sim {
...
mySetName Add allresult SetCurrentSimulation $i#query commands, and set to different name, according to the RPM}To help reduce the effort here, you could maybe use a mixed combination of TCL and HWC commands. Except for query, they work like a charm.hey Adriano thanks for the Reply. now i try to make a Loop. i understood that i have to change on the line 'result SetCurrentSimulation 1' to 'result SetCurrentSimulation $i' but i dont get it what i have to also change on the Query lines. how can i make query to depend on the RPM? or what do you mean by 'set to different name'? And try to make 'for' loop like for {set i 0} {$i <5} {incr i}. and i ran the simulations for 10000 15000 20000 22000 RPMs but it is not exported..
# Export der Spannungen
model GetQueryCtrlHandle myQueryName
model GetSelectionSetHandle mySetName [model AddSelectionSet node]
mySetName Add all
result SetCurrentSimulation $imyQueryName SetDataSourceProperty result datatype Stress
myQueryName SetDataSourceProperty result shelllayer Upper
myQueryName SetQuery "node.id, node.coords, contour.value"
myQueryName SetSelectionSet [mySetName GetID];
myQueryName WriteData {D:/junhyeong/Spannungsdaten/Daten.csv};for {set i 0} {$i < 4} {incr i}
0