The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Hi All, I wrote a tcl\tk script to query whether each node in model is having temperature load or not. But problem with this script is, It is taking more time execute the code. Please provide any better script if available. Current script is taking more than 1.30 Hrs for the number of node 162114. Please provide if any solution exist as soon as possible.
My script is:- proc validate args { *clearmark nodes 1; *nodecleartempmark *plot hm_redraw set selectNode [lindex $args 0] eval *createmark nodes 1 '$selectNode' set nodeToChkTemp [hm_getmark nodes 1] set nodeIDNotHvngTemp '' set lengthOfN [llength nodeToChkTemp] set currentTime [clock seconds] puts 'Start date: [clock format $currentTime -format %D] , Total Nodes: $lengthOfN' puts 'The time is: [clock format $currentTime -format %H:%M:%S]' hm_usermessage 'Getting information about temperature on node.......' foreach node $nodeToChkTemp { set chk 0 *clearmark loads 1 *clearmark nodes 1 *createmark nodes 1 $node *findmark nodes 1 1 1 loads 0 2 set loadID [hm_getmark loads 2] foreach ld $loadID { set loadType [hm_getvalue loads id=$ld dataname=typename] if {$loadType == 'TEMPERATURE'} { set chk 1 break; } } if { !$chk} { lappend nodeIDNotHvngTemp $node } } *numbersclear *clearmark nodes 1; *nodecleartempmark; set currentTime [clock seconds] puts 'End date: [clock format $currentTime -format %D]' puts 'The time is: [clock format $currentTime -format %H:%M:%S]' puts 'validate nodes: $nodeIDNotHvngTemp' *startnotehistorystate {isolateonly Component} *clearmark components 2 *createmark components 2 'all' *createstringarray 2 'elements_on' 'geometry_on' *isolateonlyentitybymark 2 1 2 *endnotehistorystate {isolateonly Component} *plot hm_redraw *view 'iso1' *window 0 0 0 0 hm_usermessage '' return $nodeIDNotHvngTemp } set chkNodeLst [validate 'all'] puts 'validate nodes: $chkNodeLst'
# SCRIPT END
Regards,
Vikas Kumar
1st createmark loads by type temp
2nd findmark nodes attach to above loads
3rd reverse mark.
Hi @tinh
Reverse mark means what ??
Are you saying about clearmark ?
Check the below.
*nodecleartempmark; *createmark loads 1 'by config' temperature; *findmark loads 1 1 1 nodes 0 2; set lst_TemperatureNodes [hm_getmark nodes 2]; eval *createmark nodes 1 $lst_TemperatureNodes; *createmark nodes 1 'reverse'; *nodemarkaddtempmark 1;
Hi Sandeep,
It won't work if temperature load is applied on a 'set' which contains node.
In this case how temperature will be applied is like,
Will create one load collector which contains load type temperature and that load will carry set as mentioned in below image.
In that case temperature will be applied indirectly to nodes.
And, in this scenario we can not check by above method.
@sandeepballiwar and @tinh pls reply if any other solution is there.
Best Regards,
Hi,
don't need *findmark
try this
*nodecleartempmark
*createmark loads 1 'by config' temperature
*createmark nodes 1 'by loads' {*}[hm_getmark loads 1]
*createmark nodes 1 reverse
*nodemarkaddtempmark 1
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…