Challenge

Week - 10 - Creating the midline and spot weld

AIM:

To create midline and spot weld.

OBJECTIVE:

  • Create a macro to calculate the midline of a given tubular component.
  • Select one end of the lines using line by path.
  • Similarly, select the other ends using line by path option.
  • Now calculate midline for each pair.
  • Combine all these midlines to create a single midline.
  • Create a macro to create spot welds.
  • Select source nodes by the path from the user.
  • Select target nodes by the path from the user.
  • Create 1D spot welds for each node pair inappropriate component.

PROCEDURE:

CREATING MID-LINE FOR SELECTED LINES:

For a surface like a hollow cylinder, the 1D element is created while FEA analysis. For those entities, it’s important to have a mid-line to create elements.

GET LIST:

  • Entities are selected by the user by the command “createlistbypathpanel”.
  • This creates a list of selected entities (here lines) in the selected order.
  • Firsts set of lines are saved as a source and the second set of lines stored as a target.
  • START LOOP:
  • “Foreach” loop has been initiated and lists are assigned to variables.
  • CREATE MID-LINE:
  • Midline is created for a pair of marked lines by using the command “*linescreatemidline”.
  • Created lines ID save in a different variable.
  • COMBINE:
  • New lines ID is appending to a variable.
  • By using combine“*linecombine” new line and previous line combined.

When loop gets completed new mid-line will be created and each line connects to form a single line.

CODE:

OUTPUT:

CREATING SPOT WELD:

Spot weld is a permanent joint between metals. In hypermesh, components can be connected by various connections methods. E.g., Weld, bold, etc, For weld it classified as spot, seam, quad.

For spot weld, connectors are created on nodes between components.

GET NODE LIST:

  • Node list for weld location is got by command “createlistbypathpanel”.
  • “Foreach” loop has been initiated.
  • CREATE Rigids:
  • Connectors for spot weld has been created by command *rigidnode1 node2 dofs.
  • Inputs for this command are,
  • node 1
  • node 2
  • DOF 123456
  • If the condition is implemented to execute for each loop only if the no of primary nodes and target nodes is equal or else popup appear stating that "no of nodes were not equal"

OUTPUT:

RESULTS:

  • Midline has been generated by using macro for tubular components.
  • Spot weld has been created by using macro for the user defined node list.
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.