Average temp of volume in CFD Postprocess

avb
avb Altair Community Member
edited September 2022 in Community Q&A

I want to get the average temperature of given volume after running CFD simulation. How can I get the average temp of volume in postprocessing

Answers

  • Nagahashi Kouta
    Nagahashi Kouta Altair Community Member
    edited September 2022

    Hi, avb

    I'm not familiar with CFD simulation, but I think the operation is the same .

    First, open the result file and plot the contour type (temperature) you want

    Second, open query panel and select the element required, turn on all the query fileds, query the elements' temperature and export the query result to a csv file. Then calculate the average temperature you want.

    Just like the picture below 

    image

  • avb
    avb Altair Community Member
    edited September 2022

    Hi, avb

    I'm not familiar with CFD simulation, but I think the operation is the same .

    First, open the result file and plot the contour type (temperature) you want

    Second, open query panel and select the element required, turn on all the query fileds, query the elements' temperature and export the query result to a csv file. Then calculate the average temperature you want.

    Just like the picture below 

    image

    Thanks Nagahashi for your reply. This method is useful but my model is very big and when I try to select all the nodes, hyperview crashes.

    I was looking for some other method.

    But thanks again this is useful for small number of nodes

  • Nagahashi Kouta
    Nagahashi Kouta Altair Community Member
    edited September 2022
    avb said:

    Thanks Nagahashi for your reply. This method is useful but my model is very big and when I try to select all the nodes, hyperview crashes.

    I was looking for some other method.

    But thanks again this is useful for small number of nodes

    Hi, avb

    May I know the approximate number of nodes you are querying?

    The folloeing commands may help you, it deals with about two million nodes in one minute.

    set t 1
    hwi OpenStack
    hwi GetSessionHandle sess$t
    sess$t GetProjectHandle prj$t
    prj$t GetPageHandle pg$t [prj$t GetActivePage]
    pg$t GetWindowHandle win$t [pg$t GetActiveWindow]
    win$t GetClientHandle cln$t
    cln$t GetModelHandle mdl$t [cln$t GetActiveModel]
    set setid [ mdl$t AddSelectionSet node ]
    mdl$t GetSelectionSetHandle node$t $setid
    node$t Add "displayed"
    mdl$t GetQueryCtrlHandle qry$t
    qry$t SetQuery "node.id,contour.value"
    qry$t SetSelectionSet $setid
    qry$t WriteData result1.csv
    mdl$t RemoveSelectionSet $setid
    hwi CloseStack

    The newly generated file "result1.csv" is saved in the current working directory(for example :C:\Users\sakihama\Documents\result1.csv)

  • avb
    avb Altair Community Member
    edited September 2022

    Hi, avb

    May I know the approximate number of nodes you are querying?

    The folloeing commands may help you, it deals with about two million nodes in one minute.

    set t 1
    hwi OpenStack
    hwi GetSessionHandle sess$t
    sess$t GetProjectHandle prj$t
    prj$t GetPageHandle pg$t [prj$t GetActivePage]
    pg$t GetWindowHandle win$t [pg$t GetActiveWindow]
    win$t GetClientHandle cln$t
    cln$t GetModelHandle mdl$t [cln$t GetActiveModel]
    set setid [ mdl$t AddSelectionSet node ]
    mdl$t GetSelectionSetHandle node$t $setid
    node$t Add "displayed"
    mdl$t GetQueryCtrlHandle qry$t
    qry$t SetQuery "node.id,contour.value"
    qry$t SetSelectionSet $setid
    qry$t WriteData result1.csv
    mdl$t RemoveSelectionSet $setid
    hwi CloseStack

    The newly generated file "result1.csv" is saved in the current working directory(for example :C:\Users\sakihama\Documents\result1.csv)

    Thanks a lot. This method works!!