CALCUATING VOLUME OF A 3D MODEL

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

I'm trying to find a way to use hypermesh to calculate the volume of a 3D model, hopefully with some sort of calibration or perhaps a percantage calcuation. The model was made within Avizo and was imported into Hypermesh.

Thank you.

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2010

    One way is to quickly mesh it using a solid tet-mesh. Then you can use mass calc on the tools page to calculate volume. Adjust mesh size to suit the resolution you need for your volume.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2010

    If you have a solid, you can also extract quite a bit of information from it using a macro. This information will be available in core in upcoming releases.

    *createentitypanel solids 'Select a solid.'set solid [hm_info lastselectedentity solids]hm_highlightentity solids 0 nif {$solid == 0} {    hm_errormessage 'No solid selected.'    return}hm_commandfilestate 0*entityhighlighting 0*createmark solids 1 $solidset comp [hm_getentityvalue surfs [lindex [hm_getsurfacesfromsolid $solid] 0] collector.id 0]*createmark comps 1 $compset md [hm_metadata findbymark comps 1]hm_markclear comps 1set density ''foreach m $md {    if {[string first DENSITY [lindex [split $m] 2]] != -1} {        set density [lindex [split $m] end]        break    }}puts $densityif {$density < 0.0 || $density == ''} {    set density [hm_getstring 'Density:']    if {$density < 0.0 || $density == ''} {        hm_errormessage 'Density must be > 0.0.'        *entityhighlighting 1        hm_commandfilestate 1        return    }}set density [format '%0.5e' $density]set vol [format '%0.5e' [hm_getvolumeofsolid solids $solid]]set cog [hm_getcentroidofsolids 1]set cog [format '%0.5e %0.5e %0.5e' [lindex $cog 0] [lindex $cog 1] [lindex $cog 2]]set moi [hm_getmoiofsolid $solid $density]set moi [format '%0.5e %0.5e %0.5e %0.5e %0.5e %0.5e' [lindex $moi 0] [lindex $moi 1] [lindex $moi 2] [lindex $moi 3] [lindex $moi 4] [lindex $moi 5]]set mass [format '%0.5e' [expr $density*$vol]]set surfs [hm_getsurfacesfromsolid $solid]set area 0.0foreach surf $surfs {    set area [expr $area + [hm_getareaofsurface surfs $surf]]}set area [format '%0.5e' $area]hm_markclear solids 1*entityhighlighting 1hm_commandfilestate 1#::hwt::Message msgTitle 'HyperMesh' msgIcon info msgText 'Surface area: $area\n\nVolume: $vol\n\nCOG: $cog\n\nMOI: $moi'if {[info exists solid_Info_Win] == 1} {    catch {destroy $solid_Info_Win}}set solid_Info_Win1 [::hwt::CreateWindow solid_Info_Win \    -windowTitle 'Solid info' \    -noGeometrySaving \    -propagate 1 \    -geometry [ format '480x142+%d+%d' \        [ ::fepre::GetXLocation 480 ] \        [ ::fepre::GetYLocation 142 ]] \    -transient .];set recess [::hwt::WindowRecess $solid_Info_Win1];::hwt::RemoveDefaultButtonBinding $recess;#Canvas frameset frame1 [frame $recess.frame1]pack $frame1 -fill both -expand true;#Textboxset text1 [text $frame1.text1 -font [hwt::AppFont] -borderwidth 2 -relief sunken];pack $text1 -side left -fill both -expand true$text1 insert end 'Volume: $vol\n'$text1 insert end 'Surface area: $area\n'$text1 insert end 'Density: $density\n'$text1 insert end 'Mass: $mass\n'$text1 insert end 'COG: $cog\n'$text1 insert end 'MOI: $moi'focus $solid_Info_Win1;#::hwt::PostWindow $solid_Info_Win -andWait;::hwt::KeepOnTop $solid_Info_Win1;::hwt::PostWindow $solid_Info_Win1;
  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2010

    I'm trying to find a way to use hypermesh to calculate the volume of a 3D model, hopefully with some sort of calibration or perhaps a percantage calcuation. The model was made within Avizo and was imported into Hypermesh.

    Thank you.

    Do you run RADIOSS? It simulates fluid and solid. If you make a model of your solid, and submerge it in to a barrel which is fulfilled of water, then RADIOSS would be able to tell you how much water getting out, that is just the same as the volume of the solid object.

    Not only can RADIOSS do 21st century modern scientific things, but also prove ancient wisdoms.

    Have fun.