Jump to content


Popular Content

Showing most liked content on 05/08/16 in Posts

  1. 1 like
    Nice! I was also working on different alternatives... I got this:
  2. 1 like
    Hi, Chong we can use tcl macro to write out nodal and mesh. This is a minimum example: #File name: output_node_elem.tcl set output_file [open output_file_name.txt w] puts $output_file "#NODES:" foreach nodeid [hm_entitylist nodes id] { foreach {x y z} [expr [hm_nodevalue $nodeid]] {break} puts $output_file "[format %8i $nodeid][format %.12e $x][format %.12e $y][format %.12e $z]" } puts $output_file "#ELEMS:" foreach elemid [hm_entitylist elems id] { set elem_info "[format %8i $elemid]" foreach nodeid [hm_nodelist $elemid] {append elem_info "[format %8i $nodeid]"} puts $output_file $elem_info } close $ouput_file #end of file output_node_elem.tcl But it's better to use template file to output data especially with big model. This will speed up the process by using HM core (instead of tcl) Below is a small sample of template file: *nodes() *before() *string("#NODE") *end() *format() *fieldright(integer,id,8) *string(" ") *fieldright(real,x,12) *string(" ") *fieldright(real,y,12) *string(" ") *fieldright(real,z,12) *end() *output() *elements(,,) *before() *string("#ELEMS") *end() *format() *fieldright(integer,id,8) *end() *output() In export tab, select "custom" template and browse to this file and then export to text file. Many template files corresponding to solvers are available in [installdir]\templates\feoutput\... To output data by template, you should study template commands and syntax and data names using in hypermesh If your tasks is simple, it's easier to use tcl macro
  • Create New...