🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

TCL command to check for displacement Query for Node By Set

Emil GeorgeUser: "Emil George"
Altair Community Member
Updated by Emil George

Hi,

I am trying to write a TCL script for postprocessing.

I am stuck in between, where in I am looking to get the displacement of a node.

In stead of getting the maximum displacement node, I need to get the displacement of a particular node for which a set is defined.

 

<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.bdb1c903cde3fa977fe81bae8d0f13a3.png

 

can anyone help me on this.

Thanks in advance

Emil

 

Find more posts tagged with

Sort by:
1 - 3 of 31

    Hi Emil,

     

    One typical approach is to draw contour of the data type you want to get (e.g. Displacement) and query values with poIQueryCtrl and poIQueryIterator classes. You can find the following sample code in the user reference guide:

     hwi GetSessionHandle mySessionName mySessionName GetProjectHandle myProjectName set pageIndex [myProjectName GetActivePage] myProjectName GetPageHandle myPageName $pageIndex set windowIndex [myPageName GetActiveWindow]  myPageName GetWindowHandle myWindowName $windowIndex myWindowName GetClientHandle myPostName set modelIndex [myPostName GetActiveModel] myPostName GetModelHandle myModelName $modelIndex myModelName GetSelectionSetHandle mySetName [myModelName AddSelectionSet element] myModelName GetQueryCtrlHandle myQueryName myQueryName SetSelectionSet [mySetName GetID] myQueryName SetQuery 'node.id result.value'

    If you already have a set of target nodes, set its ID to the query ctrl handle.

     

    Another is to access result values directly with hwIDataFile class. Please find the sample code in the reference guide as well.

     

    Regards,

    Emil GeorgeUser: "Emil George"
    Altair Community Member
    OP
    Updated by Emil George

    hi ,

    Thanks for the reply. can you explain more on the above commands.

    In my case I have already drawn the Y-displacement contour. Now I need to get the displacemnet vale for node which are saved in SET . I tried the below commands . but its not working 

     

    image.png.7448e0d82d6db26e5d1ce4191414f2d9.png

    You have to initialize the iterator before getting data. Typically, the code becomes:

     qc$j GetIteratorHandle iter$j for {iter$j First} {[iter$j Valid]} {iter$j Next} {     iter$j GetDataList }

    If you have only one node to query about value, the following code will also work:

     qc$j GetIteratorHandle iter$j iter$j First set datalist [iter$j GetDataList]

    Please give it a try.