Challenge

Week - 8 - Creating component and property

Objective:

This challenge objective is to provide user with easy way do define blank components with attached property and thickness, regadles of solver deck currenty active.

Problem Statement:

Every component must have property card assigned to it which stores thicknes and element definitions. Different solvers have slightly different approach to it. One thing that is common is that user has to perform at least 4 operations to establish new component with assigned property and thickness. Scripting can facilitate that, handling different solver templates and giving abiltiy to make multiple components at once.

Tcl command explanation:

Script collects input from user in two steps for each component, name by hm_getstring and thickness by hm_getfloat, then those two values are concatenated using ^ delimiter. After each loop comp_list is populated with input for function. Collecting input happens in a while loop after each components additional hm_getstring asks user to decide when to stop loop, it happend by setting $loop variable to 0. When user stops collecting input, list with defined components and their thickness is passed to main procedure. In CreateComp procedure solver deck is indetified and stored as solv_deck variable. Then input is divied into single componets, they are split to name and thickness separetely. First two if handle name null case and exisisting compononet with the same name, if name is unique it its appended to ok_list that will be used to auto color components. Main part is handled with switch function to create component, create property, assing thickness and assign property to componet. Identification of current component and property is done by hm_latestentityid hypermesh function. Last step is to give autocolour for all successfully created components.

Conclusion:

Script was made to handle 4 solver decks : Optistruct/nastran, ansys, ls-dyna and abaqus. Nullcases are handled basing on component name, messages in command file inform user about progress during component creation.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.