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
hwi GetSessionHandle session
session GetProjectHandle project
project GetPageHandle page [project GetActivePage]
page GetWindowHandle window [page GetActiveWindow]
window GetClientHandle client
client GetModelHandle model [client GetActiveModel]
model GetResultCtrlHandle result
result GetContourCtrlHandle contour
contour SetDataType "Element Stresses (2D & 3D)"
contour SetDataComponent component vonMises
contour SetAverageMode advanced
contour SetLayer Max
contour SetEnableState True
contour SetResultSystem 0
contour SetDimensionEnabled solid True
contour SetDimensionEnabled shell True
contour SetEnableState True
client GetMeasureHandle measure 1
lappend max_stress
set subcases [result GetSubcaseList "Base"]
foreach subcase $subcases {
result SetCurrentSubcase $subcase ;# nächsten Subcase auswählen
client Draw ;# refresh View
lappend max_stress [measure GetMaximum scalar] ;# Maximum an Liste anhängen
}
# Export der maximalen Spannungen
set responses_file [open "struct_responses.json" "w"]
set line "\["
append line [join $max_stress ", "]
append line "\]"
puts -nonewline $responses_file $line
close $responses_file
# Export der Spannungen
model GetQueryCtrlHandle myQueryName
model GetSelectionSetHandle mySetName [model AddSelectionSet node]
mySetName Add all
result SetCurrentSimulation 1
myQueryName 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};
when i do simulation of different RPMs like 10000 15000 17000 and 20000, only Stress Data of 20000(biggest RPM Stressdata i guess) ist reported. but i need all Stress Data. what i miss it from TCL Commends or do you guys have ideas?
thanks