Jump to content

cae developer

Members
  • Content Count

    46
  • Joined

  • Last visited

About cae developer

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. mail me a sketch of the bolt with the parameters labelled, i can give you further details
  2. thanx Cesar, that helps, however I thought the env var ALTAIR_HOME was always available
  3. you are welcome mvass, good to know this helps you
  4. are you working in nastran profile? do you have the following file on your system? "C:/Altair/hw10.0/templates/feoutput/nastran/general"
  5. try .. hm_createmark nodes 1 "by lines" $lineId set ndlist [hm_getmark nodes 1]
  6. hi mvass, try this ##have kept comments for each line so that you can understand it and modify if required proc setupPCOMP {} { set matId 0 set plyThk 0 set plyAng 0 set numPlies 0 ##ask for the csv file set types { {{csv Files} {.csv} } } set fname [tk_getOpenFile -filetypes $types] #set fname "c:/temp/pcomp.csv" ##read the file to get number of plies set fp 0; set ret [catch {set fp [open "$fname" r+]} msg]; while {![eof $fp]} { gets $fp line; incr numPlies } ##get num of proerties set numprops [hm_entitymaxid props] incr numprops ##create a propertycollector *collectorcreateonly properties "pcomp-$numprops" "" 5 *createmark prop 1 -1 set colId [hm_getmark prop 1] set ::env(ALTAIR_HOME) "C:/Altair/hw10.0" ##load PCOMP dictionary set dict "$::env(ALTAIR_HOME)/templates/feoutput/nastran/general" *createmark prop 1 -1 *dictionaryload properties 1 "$dict" "PCOMP" ##set it to created property collector *initializeattributes properties "pcomp-$numprops" ##create mark *createmark properties $colId "pcomp-$numprops" ##set num plies *attributeupdateint properties $colId 3027 1 0 0 $numPlies ##loop through the file again to set mat, thickness and ply angle set fp 0; set ret [catch {set fp [open "$fname" r+]} msg]; set matId 0 set matName "" set plyThk {} set plyAng {} set soutopt {} while {![eof $fp]} { gets $fp line; set tmplist [split $line ,]; lappend matId [lindex $tmplist 1] ##set material, will work only if material already exists !! hence kept in catch catch {set matName [hm_getentityvalue mats $matId name 1 -byid]} catch {*materialupdate properties $colId $matName} lappend plyThk [lindex $tmplist 2] lappend plyAng [lindex $tmplist 3] lappend soutopt [lindex $tmplist 4] } ##set ply thickness eval *createdoublearray $numPlies $plyThk *attributeupdatedoublearray properties $colId 3024 1 2 0 1 $numPlies ##set ply angle eval *createdoublearray $numPlies $plyAng *attributeupdatedoublearray properties $colId 3025 1 2 0 1 $numPlies ##set SOUT eval *createstringarray $numPlies $soutopt *attributeupdatestringarray properties $colId 3026 1 2 0 1 $numPlies } setupPCOMP -------------------------------------------------------------------------------- -- cae.developer@gmail.com
  7. there is a command line option called -ramdisk, trying using that -- hwsolver.bash infile.fem -ramdisk 2000
  8. actually there will be an environment variable ALTAIR_HOME define in HM installation, which points to ../altair100/hw10.0 directory. In my case it is like c:/prog/altair100/hw10.0. The script needs to know this location to load some libraries. If it is not there, can you add this environment variable yourself and then run the script?
  9. will have to write a translator to read the format and then assign it to the elements
  10. hi mvass, use the following code, wil do your work, hope this helps ##have kept comments for each line so that you can understand it and modify if required proc setupPCOMP {} { set matId 0 set plyThk 0 set plyAng 0 set numPlies 0 ##ask for the csv file set types { {{csv Files} {.csv} } } set fname [tk_getOpenFile -filetypes $types] #set fname "c:/temp/pcomp.csv" ##read the file to get number of plies set fp 0; set ret [catch {set fp [open "$fname" r+]} msg]; while {![eof $fp]} { gets $fp line; incr numPlies } ##get num of proerties set numprops [hm_entitymaxid props] incr numprops ##create a propertycollector *collectorcreateonly properties "pcomp-$numprops" "" 5 *createmark prop 1 -1 set colId [hm_getmark prop 1] ##load PCOMP dictionary set dict "$::env(ALTAIR_HOME)/templates/feoutput/nastran/general" *createmark prop 1 -1 *dictionaryload properties 1 "$dict" "PCOMP" ##set it to created property collector *initializeattributes properties "pcomp-$numprops" ##create mark *createmark properties $colId "pcomp-$numprops" ##set num plies *attributeupdateint properties $colId 3027 1 0 0 $numPlies ##loop through the file again to set mat, thickness and ply angle set fp 0; set ret [catch {set fp [open "$fname" r+]} msg]; set matId 0 set matName "" set plyThk {} set plyAng {} set soutopt {} while {![eof $fp]} { gets $fp line; set tmplist [split $line ,]; lappend matId [lindex $tmplist 1] ##set material, will work only if material already exists !! hence kept in catch catch {set matName [hm_getentityvalue mats $matId name 1 -byid]} catch {*materialupdate properties $colId $matName} lappend plyThk [lindex $tmplist 2] lappend plyAng [lindex $tmplist 3] lappend soutopt [lindex $tmplist 4] } ##set ply thickness eval *createdoublearray $numPlies $plyThk *attributeupdatedoublearray properties $colId 3024 1 2 0 1 $numPlies ##set ply angle eval *createdoublearray $numPlies $plyAng *attributeupdatedoublearray properties $colId 3025 1 2 0 1 $numPlies ##set SOUT eval *createstringarray $numPlies $soutopt *attributeupdatestringarray properties $colId 3026 1 2 0 1 $numPlies } setupPCOMP
  11. hi dekert, original data is associated only with nodes, and you can query it as given below $query SetQuery "node.id node.value" Hope this helps ! o:)
  12. hmm, I guess I will have to write a macro to do that for my automation project
  13. does HM have any option to read and assign the thickness info coming from a third party forming analysis software?
×
×
  • Create New...