Ansys Products

Ansys Products

Zero Through-Thickness Bending Stress via Scripting

    • Matthew Little

      I wrote a Python script which creates a linearized stress intensity result for each path defined in the model.  For each path, it creates the result, changes the coordinate system to the local system, then sets Zero Through-Thickness Bending Stress (ZTTBS) to True (Yes/On)

      After running the script, the Details of any given linearized stress result created from the script shows everything is set up properly.  But after solving the results and looking at the Worksheet for a result, it does not actually zero out the bending stresses.  However, if I go back to the result object, set ZTTBS to 'No' and then back to 'Yes' manually, then solve, it sets the three bending components to zero as it should be doing.

      My question is: when scripting this, is there a need to somehow 'update' the result so when solving the first time it does it correctly?  I've tried to suppress and unsuppress the solution objects to try to 'update' them, but it does not fix the issue.

      A sample of the script is shown below.  Not the full thing but enough to see what it's doing.

      for path in paths:
         sint.CoordinateSystem=csys #Local csys for given path

    • mjmiddle
      Ansys Employee

      This appears to be a defect. Even after setting sint.ZeroThroughThicknessBendingStress=True, if I query the value it will still read False, even though the Details entry has changed to Yes.

      Instead, Change the property by this method:

      prop = sint.PropertyByName("ZeroThroughThicknessBendingStress")
      prop.InternalValue = 1

    • Matthew Little

      That appears to have fixed the problem.  Thanks for getting back to me on this.  Appreciate it

Viewing 2 reply threads
  • You must be logged in to reply to this topic.