We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
General Mechanical

General Mechanical

Topics related to Mechanical Enterprise, Motion, Additive Print and more.

Exporting Stiffness matrix and Mass matrix from Ansys WB

    • kkolha2
      Subscriber

      Hello,

      I hope you're doing well!

      I'm using Ansys Workbench 2024 Student Version.
      I'm trying to export stiffness and mass matrix from modal anlysis, as i need to perform a multibody dynamics analysis based on that data.

      I have used the following code as an APDL Command under the Solutions Tree.

      ---
      /AUX2
       
      ! Combine .FULL files
      COMBINE, FULL
       
      ! Enters the database processor
      /POST1
       
      ! Stiffness
      *DMAT, MatKD, D, IMPORT, FULL, file.full, STIFF
       
      ! Mass
      *DMAT, MatMD, D, IMPORT, FULL, file.full, MASS
       
      ! Sparse matrices
      *SMAT, MatKS, D, IMPORT, FULL, file.full, STIFF
      *SMAT, MatMS, D, IMPORT, FULL, file.full, MASS
       
      ! Write matrices to files
      *PRINT, MatMS, Msparse.matrix
      *PRINT, MatKS, Ksparse.matrix
      *PRINT, MatKD, Mfull.matrix
      *PRINT, MatMD, Kfull.matrix
      ---

      The analysis as well as the command runs perfectly without any error displayed.
      the file.full is generated and I can see that in the solver directory.


      My issue is that I'm not able to generate or find both the mass as well as the stiffness matrix anywhere
      In the solution information It shows the following as an error,

      As mentioned on the forum, I have unchecked the Distributed box, as well as changed the delete unneeded files to no.

      The Physical memory (RAM) available shows out to be about 16 GB available.

      Please provide guidence.
      Thank you in advance!

    • dlooman
      Ansys Employee

      Another way to export the stiffness and mass matrices are by first creating a superelement with master dof at important locations.  Then the SELIST command can be used to export the superelement.  This is similar to what the ADAMS command does to create an mnf file for use in the ADAMS rigid body program.  There's also the HBMAT command.

    • kkolha2
      Subscriber

      Thank you for your reply, Dave.
      I will make sure to look into those options as well.

      For this specific project, I need to have the full matrices (Stiffness & Mass) in order to feed it to an established Matlab code.

      Update:
      I tried to supress all the solid elements, and the code is generating the output just for the beam elements.
      Is there any way i can get the same output without supressing anything?

      Thank you for your help!

    • dlooman
      Ansys Employee

      Can you use Harwell-Boeing format?  You can export the stiffness and damping matrices in that format with the HBMAT command.  I don't know a way of computing stiffness and mass matrices for just the beam elements unless the the solid elements are suppressed.

    • kkolha2
      Subscriber

      Hi Dave,
      Sorry for the misunderstanding.
      I meant to say that i can extract the stiffness and mass matrix from the analysis, just when the solid elements are supressed. it was just a validation that it does work, i just need to find a way to extract the matrices with all the components, (Solid + Beams).

      I looked at the Harwell-boeing format, and I'm not able to understand the format,
      Following is the initial lines of the HBMmass files, it is just a single column with numbers.

      Is there any way i can do the extraction? Please let me know.

      Thanks!

    • dlooman
      Ansys Employee

      I believe you can input the Harwell-Boeing file into MATLAB and look at it there.

    • kkolha2
      Subscriber

      Thanks Dave.
      I was able to find a workaround in my MBD code.

Viewing 6 reply threads
  • The topic ‘Exporting Stiffness matrix and Mass matrix from Ansys WB’ is closed to new replies.