Altair HyperView TCL Scripting Automation Introduction

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 39

  • @ManuelRamsaier
    @ManuelRamsaier  2 года назад +2

    Below, find the script used in this video as a starting point for your code:
    cd C:/temp/Study_test/model_name_optimization_1643549680.938239
    set outPath "C:/temp/Study_test/model_name_optimization_1643549680.938239/model_name_optimization_densityFile.txt"
    set import_file_path "C:/temp/Study_test/model_name_optimization_1643549680.938239/model_name_optimization_des.h3d"
    hwi OpenStack
    hwi GetSessionHandle session
    session GetProjectHandle project
    project GetPageHandle page 1
    page GetWindowHandle win 1
    win SetClientType animation
    win GetClientHandle anim
    anim AddModel $import_file_path
    anim Draw
    anim Clear
    set id [anim AddModel $import_file_path]
    anim GetModelHandle myModel $id
    myModel SetResult $import_file_path
    anim Draw
    myModel GetResultCtrlHandle myResult
    set current [myResult GetCurrentSubcase]
    myResult SetCurrentSimulation [expr [myResult GetNumberOfSimulations $current]-1]
    set data_types [myResult GetDataTypeList $current]
    myResult GetContourCtrlHandle myContour
    myContour SetDataType [lindex $data_types 0]
    myContour SetEnableState true
    myModel GetQueryCtrlHandle myQuery
    set set_id [myModel AddSelectionSet element]
    myModel GetSelectionSetHandle elem_set $set_id
    elem_set Add "contour > 0.1"
    myQuery SetSelectionSet $set_id
    myQuery SetQuery "element.id contour.value element.connectivity"
    myQuery WriteData $outPath
    hwi CloseStack

  • @shenghuiliu9232
    @shenghuiliu9232 2 года назад +1

    By the way, your video is quite helpful especially for the beginner. Great job!

  • @alihanalayoglu4674
    @alihanalayoglu4674 2 года назад +1

    this is what we've been lookin for

  • @juggler4046
    @juggler4046 2 года назад +1

    das war ein super nützliches Video, vielen Dank!
    Wir freuen uns auf mehr in diesem Inhalt..;)

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад

      Thank you. Yeah I think there is a lot to cover on this topic.

  • @adelinewar3222
    @adelinewar3222 2 года назад +1

    Thank you, Dr Manuel. This video was very helpful.

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад

      On the git repository of the bridge builder I have also python code which serves at getting the data from hyperview.

  • @NguyenHuuTienbk
    @NguyenHuuTienbk 2 года назад +2

    Excellent, Thank you. I hope you will share more tcl video of Hyperwork. Thanks again.

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад +1

      Sure :) Actually that is one of the task I have right now for the lattice mesher :)

    • @NguyenHuuTienbk
      @NguyenHuuTienbk 2 года назад

      @@ManuelRamsaier :Thank you, Manuel. Your mention a guys TINH, he is Vietnamese. I also Vietnamese too. :D
      I feel he very talent. I am studying TCL in HyperView. it is difficult.
      I found on Internet a document "HV HG Customization 13manual" very useful. I also found latest version such as ver21 or v22 but don't found.
      Thank you for share great knowledge

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад +1

      @@NguyenHuuTienbk yeah tinh is a god when it comes to TCL scripting. He helped me so many times....great to see you sharing what you have found. I am sure it is of use for all when we share more what we know 👍

  • @romeosonsoles9618
    @romeosonsoles9618 2 года назад +1

    Hello im the guy you made the day you play zelda songs thank youu men

  • @sivas7942
    @sivas7942 Год назад

    Hello Manuel, can i know where will i find the command.tcl file for HyperView where the scripts are dynamically written when we operate HyperView UI.
    EX: There is 'command.tcl' file for Hypermesh in local drive under User/HMConfig to view the dynamic script being written

    • @ManuelRamsaier
      @ManuelRamsaier  Год назад

      Unfortunately there is none ... this makes Hyperview tcl scripting so difficult.

  • @adelinewar3222
    @adelinewar3222 2 года назад

    Hello Sir, I have more query. I have a .fem file with element and nodal connectivity and position and also the respective forces and spc. Can I call this file to open it into hyperview with batch mode from matlab?

  • @adelinewar3222
    @adelinewar3222 2 года назад +1

    Hello again. May I know if I can use TCL script to export data from hyperview.

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад +1

      Sure. Depends on which data you want to get. but as you see in line 29-31 on 23:55 this writes the info directly to the $outpath

  • @shenghuiliu9232
    @shenghuiliu9232 2 года назад

    Hello, In some models, thereare a lot of components, I would like to know how to select one component (isolate one component or show only one component with the id and then export all the data value with this component).

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад

      Hey :) Yeah that works with element sets - you can do that also by component name for example. Here is a simple example:
      myModel GetQueryCtrlHandle myQuery
      set set_id [myModel AddSelectionSet element]
      myModel GetSelectionSetHandle elem_set $set_id
      elem_set Add "component_name == YOUR_COMPONENT_NAME"
      myQuery SetSelectionSet $set_id
      myQuery SetQuery "element.id contour.value"
      myQuery WriteData $outPath

  • @adelinewar3222
    @adelinewar3222 2 года назад

    After the code % project GetPageHandle page, I get the error Object name: project (of type hwi Project) could not find requested method: Get PageHandle Or the method was called with incorrect arguments. Dr Manuel, how do I rectify this?

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад +1

      Which version of Hyperworks do you use? I can try to reproduce it here. Is there a unwanged space char between Get and PageHandle, as you wrote ?

    • @adelinewar3222
      @adelinewar3222 2 года назад

      @@ManuelRamsaier It is version 2019. And there is no space between Get and PageHandle.

    • @adelinewar3222
      @adelinewar3222 2 года назад

      After hwi Openstack, the response I get is 1 and not 2 as in your case.

    • @adelinewar3222
      @adelinewar3222 2 года назад

      @@ManuelRamsaier 2019. No there was no space between Get and PageHAndle

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад

      @@adelinewar3222 Hey :) I just tested it. For me it works. So... if you get a 2 instead of a 1 that means it already had an stack open?! Can you just open a new Hyperview session and then put into the tcl command window (which you can enable by dragging it up from the bottom)
      hwi OpenStack
      hwi GetSessionHandle test
      (the test is the name of the variable which you assign the session handle)
      You can also write the problem with your script and maybe a short video /model files to ramsaier@rwu.de - then I can test it on my side.

  • @adelinewar3222
    @adelinewar3222 2 года назад

    How do I create a batch mode between Matlab and hypermesh optistruct?

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад

      Could you please describe what you intend to do ? Batch mode in altair's products is enabled via the cli (command line interface) - so the way how you call the hyperworks executable defines if you are in batch or not. It is often just a flag like -b (for hw.exe for example).

    • @adelinewar3222
      @adelinewar3222 2 года назад

      @@ManuelRamsaier I would like to use the optimization tool in matlab but run the analysis using optistruct in batch mode such that each iteration goes back and forth between hypermesh and matlab for several iterations.

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад

      @@adelinewar3222 This is possible for sure - a PhD colleague did excactly that. So you can adapt the script in this video for you. In the query lines I mentioned you must change it to the values which are of interest to you. You can then get e.g. stress values for each element.

  • @karansingh5259
    @karansingh5259 2 года назад

    hello sir i am an engineering student in final year i would like to talk to you about my project which is based on matlab

  • @mburda2344
    @mburda2344 Год назад

    Es wäre vielleicht sinnvoller gewesen, wenn man vor dem Drehen des RUclips-Tutorials besser vorbereitet gewesen wäre. Herr Dr. Ing. Sie waren die ganze Zeit durcheinander und es gab keinen klaren Fahrplan, dem man folgen konnte, um zu verstehen, was im Video passiert und worum es geht. Mal wurden Windows, mal Pages, mal Handles und andere Dinge angesprochen.
    Im Tcl steht "proc" nicht für "Process", sondern es steht für "Procedure", ein anderes Wort für "Funktion".

  • @sam_issac00
    @sam_issac00 2 года назад

    Sir, it's humble request how to study basic all tools in hypermesh abaqus solver. How to use, components where to use this tools in geometry. Example : lines points,solids,,surface edit ....all geometry tool explain one video upload please( Total 7 pages, first one is Geometry.A small video please explain)

    • @ManuelRamsaier
      @ManuelRamsaier  2 года назад +1

      Thank you for the request - I will consider it. The geometry modelling is the same for every solver as it is a basic functionality of Hypermesh.

    • @sam_issac00
      @sam_issac00 2 года назад

      @@ManuelRamsaier Thank you sir

  • @adelinewar3222
    @adelinewar3222 2 года назад

    I called the optistruct .fem file by using the optistruct.bat file from Matlab. That way I was able to solve the optistruct .fem file from Matlab. But what if I want to change some codes in the tcl file through optistruct.bat.

  • @adelinewar3222
    @adelinewar3222 2 года назад +1

    Could I please get your email id so that I can communicate with you directly rather in the comment section?