Jump to content

etrud011

Members
  • Content Count

    44
  • Joined

  • Last visited

About etrud011

  • Rank
    Advanced Member

Profile Information

  • Are you University user?
    Yes

Recent Profile Visitors

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

  1. I was able to fix my problem by doing two things at the beginning of my script: 1. Change my directory to the location of my hmsettings.tcl settings. cd <path to folder> 2. Change the user preferences from hypermesh to optistruct. *elementchecksettings 6 0 0 1 1 6 0 6 0 6 6 6 0 0 0 0 0 0 0 0 0 0 0 *entitybundleregister "__AUTOCONTACT_PREVIEW_BUNDLE_OPTISTRUCT" "groups groups contactsurfs contactsurfs sets sets" 0 *templatefileset "C:/Program Files/Altair/2019/templates/feoutput/optistruct/optistruct" *setmacrofile "C:/Program Files/Altair/2019/hm/scripts/UserProfiles/../optistruct/opti.mac" *enablemacromenu 1 *createmark collections 1 *clearmark collections 1 *createmark collections 2 *clearmark collections 2 *createmark controllers 1 *clearmark controllers 1 *loaddefaultattributevaluesfromxml
  2. Could you please try using dos? Type a line like this: "C:\Program Files\Altair\2019\hm\bin\win64\hmopengl.exe" -tcl "C:/Users/Eric/Documents/script.tcl" My problems occur when running the sript from dos/system/ command prompt/run... Thanks,
  3. I tried the same commands but elements are not marked. Try this script using the command prompt to see if it works on your version: #tcl scipt for the shrink wrapping automation set design_id 23 set wrap_size 0.0500000000 #upload the file for fea re-anlalysis *createstringarray 2 "isosurf: 3 3 0.500000 0 -1 0 0 10 30 1 0" "other_params: 1 0 0 0 10 0" if { [ catch {*ossmooth_12 0 1 0 1 "C:/Users/Eric/Documents/debug_fem.fem" "C:/Users/Eric/Documents/file.sh" "" 1 0 1 2} ] } { puts "Error Extracting ISO-Surface..." } #mask all puts "Creating New Component" #create a new compoenet for the shrinkwrap set comp_name_1 "component1_lattice_wrap1" *createentity comps includeid=0 name=$comp_name_1 puts "Applying Shrinkwrap 1" #do the shrink wrap on the displayed elements *currentcollector components $comp_name_1 *createmark elems 1 "by property id" $design_id *shrinkwrapmesh elements 1 2 $wrap_size 30 3 0 0 0 0 0 0 puts "Applying Shrinkwrap 2" *createmark elems 1 "by property name" "PSOLID_2.3" hm_getmark elems 1
  4. Here is a sample of the model with the elements attached to the property. Only some of the elements, the materials and properties are in the file. Thanks debug_fem.fem
  5. Here is the full output again, I am sure that the elements are attached to the property. I was able to select the property with hm_getmark and then delete it. Is there a way to find the elements attached to the property id using the property mark?
  6. After trying to use the property name, I am still unable to mark properties or by using properties. Hypermesh can only mark with "all" for the properties. Any other ideas?
  7. What are you referring to as the solver? is it hypermesh? My script is called from the command prompt (using MATLAB). Hypermesh opens and I see the script perform the first part of my code but fails when trying to locate the elements via property id. At this point I debug my script with the opened hypermesh gui and properties cannot be marked for some reason. I am unable to share my model because it is confidential.
  8. Thank you for the reply. I am still having issues. When I type in the line: hm_getsolverid props 1 I receive this error message: hm_getsolverid: pool name not found. If I use the line: hm_getsolverids props 1 Then i get an output: {1 {}} What does this mean?
  9. Hello, I have a tcl script that uploads an FEM using ossmooth into hypermesh. Then two shrinkwraps are applied on the new iso-surface and the resulting mesh is exported as an stl file. The problem is when I call my script from the command prompt; hypermesh fails to locate elements by their property id. When I run the script in the hypermesh console no errors occur. Can anyone help me determine what is causing this strange behavior? The string sent to the command prompt is written as: "C:\Program Files\Altair\2019\hm\bin\win64\hmopengl.exe" -tcl "C:/Users/Eric/Documents/script.tcl" I cannot post the model because of work reasons. The script is below, the path names need to be updated with local file names: #the property id to locate design elements set design_id 23 #the voxel size for shrink wrap set wrap_size 0.0500000000 # .fem file path set fem_name "temp_name" # shape file results set sh_name "temp_sh_name" # the stl output path set stl_name "tmp_stl" #upload the file for fea re-anlalysis *createstringarray 2 "isosurf: 3 3 0.500000 0 -1 0 0 10 30 1 0" "other_params: 1 0 0 0 10 0" if { [ catch {*ossmooth_12 0 1 0 1 $fem_name $sh_name "" 1 0 1 2} ] } { puts "Error Extracting ISO-Surface..." } #mask all puts "Creating New Component" #create a new compoenet for the shrinkwrap set comp_name_1 "component1_lattice_wrap1" *createentity comps includeid=0 name=$comp_name_1 puts "Applying Shrinkwrap 1" #do the shrink wrap on the displayed elements *currentcollector components $comp_name_1 # # Script Error from command prompt # *createmark elems 1 "by property id" $design_id # # Script Error # *shrinkwrapmesh elements 1 2 $wrap_size 30 3 0 0 0 0 0 0 puts "Applying Shrinkwrap 2" #make another component for the second wrap set comp_name_2 "component1_lattice_wrap2" *createentity comps includeid=0 name=$comp_name_2 *currentcollector components $comp_name_2 *createmark elems 1 "by component name" $comp_name_1 *shrinkwrapmesh elements 1 2 $wrap_size 30 3 0 0 0 0 0 0 #divide the elems into triangles *createmark elems 1 "by component name" $comp_name_2 *splitelements 22 1 #export to STL into the predefined path puts "Printing the STL file" *createmark elems 1 "by component name" $comp_name_2 *createstringarray 2 "CONNECTORS_SKIP" "HMMATCOMMENTS_XML" hm_answernext yes *feoutputwithdata "C:/Program Files/Altair/2019/templates/feoutput/misc/triasto.stl" $stl_name 0 0 0 1 2 Thank you, -Eric
  10. Hello, I would like to extract the local stiffness elements as well to compare my FE implementation to Optistructs. Is there a method to do this? Thanks, -Eric
  11. Your welcome Sebastien, The tcl script I was referring to does not seem to be in the file exchange unfortunately. However extracting the tapered beams should be relatively straighforward. Basically, for each tapered beam or element with card image PBEAML, get the dimensions of both radii. From there you create a solid cone using the coordinates of nodes associated with the beams. Continue until all the beams have been selected. Then when all the cones are created, mesh the exterior with trias and then export to stl. The final step is to merge the cones in another software. If you haven't used tcl before then you should look into the help files to learn more about the hypermesh api. Your commands are also printed out in a 'command.tcl' file during hypermesh sessions.
  12. The optimization is simple size optimization of tapered beam elements (the same as lattice optimization, but I have built the model myself). There are many design variables representing intersection joint between the beams. DEVPREL1 cards are made to link the design variables to all the tapered beams ends.
  13. Hi Rahul, I am running sizing optimizations, not topology. Is there a way to generate a new 'updated' fem model after sizing operations are done? -Thanks
  14. Hello, I am running some optimizations and would like to generate a secondary .fem file as an output. The new fem file would have the updated dimensions of the input model (similar to the second optimization step during lattice optimization). My model has many design variables so updating them manually would not be feasible. Any help is greatly appreciated. -Eric
  15. I believe that there is a tcl script in the file exchange that can create cylinders from the tapered 1d elements. From there you can export the cylinders as stl objects and then use another software to merge them all together (meshmixer). Another method that might work is by using Altair Inspire to automatically generate the stl file with the lattice beams.
×
×
  • Create New...