how to extract time step and corresponding contour value by using TCL/tk

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

1.) I want to extract data for only specific set of elements but  I am getting contour value all element. I don't know what is mistake

 

proc QueryAndExportELEM {FileName} {

    mh GetSelectionSetHandle ssh [mh AddSelectionSet element]
    ssh Clear
    ssh Add 'dimension 2'
    ssh Add 'dimension 3'
 
 foreach elem {11 22} {
     ssh Add 'id $elem'
     mh GetQueryCtrlHandle qc
    qc SetSelectionSet [ssh GetID]
    qc SetQuery 'element.id contour.value'
    qc GetIteratorHandle qciter
   
    puts 'Element ID: $elem'
  
    set fp [open $FileName w]
  
    for {qciter First} {[qciter Valid]} {qciter Next} {
    puts $fp [regsub -all \{ [regsub -all \} [qciter GetDataList] ''] ''] }
    close $fp
   
     mh RemoveSelectionSet [ssh GetID'] 
  
     qc ReleaseHandle 
     qciter ReleaseHandle
 }
   ssh ReleaseHandle
 
 }

 

 2.)  How I can extract time step and corresponding contour value to .csv file by using TCL/tk. ??

Answers

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited September 2017

    I also have same issue at the place of contour value am getting N/A

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi Vikas,

    You can add /ANIM/NODA/DT in the engine file to get  animation Files containing nodal scalar data.

    Can you try with this?.

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited September 2017

    Hey george

    How to add /ANIM/NODA/DT in the engine file.My code is same as above code .

    can you help me.

    Thanks

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2017

    Hi Vikas,

    Which solver are you using?. The above mentioned keyword is for RADIOSS solver.

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited September 2017

    am using Nastran solver

     

  • Vikas Kumar_22189
    Vikas Kumar_22189 Altair Community Member
    edited September 2017

    and i want to find max stress by using TCL/TK script but contour.value  in set query giving N/A 

    please answer as soon as possible.

     

    Thanks in advance