automation of query of Nodes vector values
hello all, im on the post processing to automate the results data. im done with automation of contour vaules of every nodes for each subcase(centrifugal force distributions in Rotor depends on RPM). and now i want to also query vector values of each node for each subcase. but i couldnt find any TCL Commend for it.
do you guys have idea for automation to query vector? thanks
here is my automation TCL commend.
Answers
-
I see this question a couple times in here.
Could you provide a smaple file, of a couple slides showing what is going on?
Another option would be to use Altair Compose to read the data and write a .csv from it.
0 -
Adriano A. Koga_21884 said:
I see this question a couple times in here.
Could you provide a smaple file, of a couple slides showing what is going on?
Another option would be to use Altair Compose to read the data and write a .csv from it.
here u can see what i tried to create. see # query vector value and im using 2022.1 version.hwi GetSessionHandle sessionsession GetProjectHandle projectproject GetPageHandle page [project GetActivePage]page GetWindowHandle window [page GetActiveWindow]window GetClientHandle clientclient GetModelHandle model [client GetActiveModel]model GetResultCtrlHandle resultresult GetContourCtrlHandle contourcontour SetDataType "Element Stresses (2D & 3D)"contour SetDataComponent component vonMisescontour SetAverageMode advancedcontour SetLayer Maxcontour SetEnableState Truecontour SetResultSystem 0contour SetDimensionEnabled solid Truecontour SetDimensionEnabled shell Truecontour SetEnableState Trueclient GetMeasureHandle measure 1model GetQueryCtrlHandle myQueryNamemodel GetSelectionSetHandle mySetName [model AddSelectionSet node]mySetName Add alllappend max_stressset subcases [result GetSubcaseList "Base"]puts "Subcaselist: $subcases"foreach i $subcases {result SetCurrentSubcase $i ;# nächsten Subcase auswählenclient Draw ;# refresh Viewresult SetCurrentSimulation $imyQueryName SetDataSourceProperty result datatype StressmyQueryName SetDataSourceProperty result shelllayer UppermyQueryName SetQuery "node.id, node.coords, contour.value"myQueryName SetSelectionSet [mySetName GetID]myQueryName WriteData {D:/junhyeong/Spannungsdaten/test.csv}file rename -force /junhyeong/Spannungsdaten/test.csv /junhyeong/Spannungsdaten/${i}.csv# Query Vector valueset resultType(Displacement)set node [hm_getmark nodes]set vectorData ""foreach node $nodes{set vectorValue [result GetNodalVectorValue $node $resultType]set vectorDaTa "${vectorDaTa}${node} $vectorValue\n"}set dir "D:/junhyeong/Vektordaten"file mkdir $dirset fileName "Subcase_${i}.csv"set fileId [open $fileName "w"]puts -nonewline $fileId $vectorDaTaclose $fileIdlappend max_stress [measure GetMaximum scalar] ;# Maximum an Liste anhängen}# Export der maximalen Spannungenset responses_file [open "struct_responses.json" "w"]set line "\[[join $max_stress ", "]\]"puts -nonewline $responses_file $lineclose $responses_file0