General Mechanical

General Mechanical

Topics relate to Mechanical Enterprise, Motion, Additive Print and more

User defined result to combine force reactions in solution combinations

    • aecm20
      Subscriber

      I have a study with multiple loads applied in individual static structural systems.  For bolt analysis I want to get the reaction force across a contact.  I am using the solution combination tool to combine the loads into various load cases. Using 2021 R2.

      The problem I have is that the colution combination tool doesnt have a force reaction result option.  I can set the geometry to a surface and use the user defined result tool with ENFOX, Y or Z to get the elemental nodal forces.  If I export and sum these (for each node) I get the right output, but only at one solution combination.  I have 26 load cases and 12 surfaces though so doing this process manually is not practical.

      Is there a way to sum the elemental nodal forces within the expression line so it gives a total force maximum instead of the macimum nodal force.

      Things I have tried; sum, identifiers, ENFOVECTORS, submodelling.

      Maybe this is within the user manual but I cant see it anywhere.

       

      All help much appriciated.

    • mjmiddle
      Ansys Employee

       

      Solution combination and Design Assessment will not allow probes. A “DA Result” under a “Design Assessment” system has a “Sum Results” that should do what a force probe result would, but it is unsupported, and I can’t get the DA Result to work for anything anymore.

      You would need to use scripting by some means. Either script in Mechanical or APDL:

      Method 1:

      Run script in Mechanical in “Automation > Scripting”:

      # First create force probe under each analysis containing the text "for_combination"
      # Then run the script below
      sumResultX = None
      sumResultY = None
      sumResultZ = None
      for analysis in ExtAPI.DataModel.Project.Model.Analyses:
          # Solution Combination is limited to static structural systems, so lets do that too
          if analysis.AnalysisType == AnalysisType.Static:
              probes = [result for result in analysis.Solution.Children if "for_combination" in result.Name]
              if len(probes) > 0:
                  probe = probes[0]    # use 1st one
                  if sumResultX == None:
                      sumResultX = probe.XAxis
                  else:
                      sumResultX += probe.XAxis
                  if sumResultY == None:
                      sumResultY = probe.YAxis
                  else:
                      sumResultY += probe.YAxis
                  if sumResultZ == None:
                      sumResultZ = probe.ZAxis
                  else:
                      sumResultZ += probe.ZAxis
      print("X Axis: " + str(sumResultX))
      print("Y Axis: " + str(sumResultY))
      print("Z Axis: " + str(sumResultZ))

      Method 2:

      Use APDL script. This involves loading results of each analysis and then using load case commands. Generally:
       
      /post1
      file,file1,rst ! Start with first results file
      set,1,1 ! Read into memory load step 1 substep 1
      file,file2,rst ! Switch to second results file
      lcdef,1,1,1 ! Assumes 2nd result is load step 1 substep 1
      !insert any lcfact commands
      lcoper,add,1 ! Add results together
      cmsel,s,my_named_selection
      FSUM,,BOTH
      *get,my_fx,FSUM,0,ITEM,FX
      *get,my_fy,FSUM,0,ITEM,FY
      *get,my_fz,FSUM,0,ITEM,FZ
      or
      reswrite,file ! use new file name since it can append to a pre-existing results file.
      Load results in Mechancial and view there using “Tools > Read Results Files…”
      Make sure you select the correct units the solution was ran in.
      You may get an error, “An unknown error occurred during solution.” But the solution should be correct.

       

Viewing 1 reply thread
  • The topic ‘User defined result to combine force reactions in solution combinations’ is closed to new replies.