🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Problem with batch meshing

Hi,

 

I am a new user of batchmesh with hypermesh..

I tried to batch automatically a geometry and export the mesh by using the code I found in command.tcl.

It works perfectly with the command window in Hypermesh.

I tried to mesh it with this windows command in a .bat :

'C:/Program Files/Altair/2017/hw/bin/win64/hw.exe' -b -clientconfig hwfepre.dat -uAnsys -tcl myscript.tcl 

 

And I get this error message :

Command line Tcl script read failed.
0
    while executing
'*dictionaryload sensors 1 'C:/Program Files/Altair/2017/templates/feoutput/ansys/ansys.tpl' 'SOLID186''
    (file 'myscript.tcl' line 35)
    invoked from within
'source 'myscript.tcl''

 

Thanks a lot for your help!

 

Here below myscript.tcl

 


*geomimport 'auto_detect' 'C:/folder/bride.iges' 'CleanupTol=-0.01' 'DoNotMergeEdges=off' 'ImportBlanked=off' 'ScaleFactor=1.0'
*end_batch_import 

*createnode 0 0 0 0 0 0
*createnode 0 0 100 0 0 0

*surfaceconefull 1 2 52 52 1 100

*createmark solids 1 1
*createmark surfaces 2 17
*trim_solids_by_surfaces 1 2 1

*createmark solids 1 1 2
*solidmap_solids_begin 1 829568 2
  *createmark lines 1 72
  *solidmap_solids_set_elemsize 1 0.785228065
  *createmark lines 1 75
  *solidmap_solids_set_elemsize 1 1.1
  *createmark lines 1 56
  *solidmap_solids_set_elemsize 1 1.5
  *createmark lines 1 46 55 57 64 67 71 90 94 95
  *solidmap_solids_set_elemsize 1 2.19866837
  *createmark lines 1 81
  *solidmap_solids_set_elemsize 1 2.5
*solidmap_solids_end 

*createsensor 'ET_1'
*createmark sensors 1 'ET_1'
*renumber sensors 1 1 1 0 0
*createmark sensors 1 'ET_1'

*dictionaryload sensors 1 'C:/Program Files/Altair/2017/templates/feoutput/ansys/ansys.tpl' 'SOLID186'
*attributeupdateint sensors 1 141 8 0 0 186
*createmark materials 1
*clearmark materials 1
*createmark materials 1
*clearmark materials 1
*collectorcreate materials 'MAT1' '' 9
*createmark materials 1 'MAT1'
*renumber materials 1 1 1 0 0
*createmark materials 1
*clearmark materials 1
*attributeupdateentity components 2 3081 8 2 0 sensors 1
*elementtype 210 7
*elementtype 213 7
*elementtype 215 7
*elementtype 220 7
*createmark elements 2 240-2629 2851-5723
*elementsettypes 2
*createmark components 1 'B-REP'
*materialupdate components 1 'MAT1'


*startnotehistorystate {Hide Components 'Points'}
*createmark components 3 'Points'
*createstringarray 2 'elements_on' 'geometry_off'
*hideentitybymark 3 1 2
*endnotehistorystate {Hide Components 'Points'}
*startnotehistorystate {Hide Components 'Points'}
*createmark components 3 'Points'
*createstringarray 2 'elements_off' 'geometry_on'
*hideentitybymark 3 1 2
*endnotehistorystate {Hide Components 'Points'}
*startnotehistorystate {Hide Components 'B-REP'}
*createmark components 3 'B-REP'
*createstringarray 2 'elements_off' 'geometry_on'
*hideentitybymark 3 1 2
*endnotehistorystate {Hide Components 'B-REP'}
*startnotehistorystate {Hide Components 'auto1'}
*createmark components 3 'auto1'
*createstringarray 2 'elements_off' 'geometry_on'
*hideentitybymark 3 1 2
*endnotehistorystate {Hide Components 'auto1'}
*startnotehistorystate {Hide Components 'auto1'}
*createmark components 3 'auto1'
*createstringarray 2 'elements_on' 'geometry_off'
*hideentitybymark 3 1 2
*endnotehistorystate {Hide Components 'auto1'}


*retainmarkselections 0
*createstringarray 2 'HM_MERGELOADS_IN_LOADSTEP ' 'HMCOMMENTS_SKIP'
*feoutputwithdata 'C:/Program Files/Altair/2017/templates/feoutput/ansys/ansys.tpl' 'C:/folder/V1.cdb' 0 0 0 1 2

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    ImotoUser: "Imoto"
    Altair Employee
    Updated by Imoto

    Hello @matrou

     

    In most cases you have to load the template file, instead of select UserProfile if using BatchMode.
    Please try to add the this line for beginning of your script and remove '-uAnsys' argument.

     *templatefileset [file join [hm_info -appinfo ALTAIR_HOME] templates feoutput ansys ansys.tpl];

     

    Thanks,
    Imoto