Skip to main content

Reuse CMS Superelement in Ansys Workbench with Expansion

Figure 1: CMS Reuse Project Schematic

In the previous two posts (here and here), the workflow requires another generation pass when reusing the model. This diminishes the advantage of using a component mode synthesis (CMS) superelement model. The difficulty is that when the model changes, the superelement node numbering no longer matches the new workbench (WB) model. Everything gets shuffled around.

To reuse a superelement body, we need the  nodes to persist in the final Analysis for expansion.

Strategy
We start out with an original modal analysis (Analysis A) that would have worked on it's own. Next, the original modal analysis is duplicated (becoming Analysis B). Analysis A will be modified to only have the superelement body while Analysis B will be modified to have the geometry and mesh of non-superelement body. When both analysis are assembled into a new modal Analysis C, Analysis B's element and nodes are automatically offset so that the ordering is correct. The trick is to maintain the node and element numbering the same as Analysis A.

Figure 2: Initial Schematic

Analysis A 
This is named 'cms part' which is noted for named selection later. All geometrical bodies are deleted except the superelement part. It has two named selection:
1. 'body1' for the superelement body
2. 'interA' for interfaces

The solution command snippet is then added to compute myse.sub superelement matrix. Link to Command Snippet here. Note the natural frequency and mode shapes displayed are with superelement method fixed.

Analysis A Command Snippet
fini
/filnam, myse          ! **myse** is the SuperElement name

/solu
antype, subst          ! substructure analysis type
seopt, myse, 2         ! substructure and option for stiffness and mass
cmsopt, fix, 15        ! cms options and **number of modes**

cmsel, s, interA       ! interface **component** 
m, all, all

allsel
save

solve

! as a pretty picture
/sys, copy myse.rst file.rst 
/eof

Figure 3: Analysis A for CMS Superelement Part

Analysis B
This is named 'non cms' for everything else. Delete the superelement element. A solution isn't needed in this Analysis. We are only after the mesh created by the geometry. Again, this mesh is malleable for future iterations as long as contact points are maintained.

Figure 4: Analysis B for Non-CMS Parts

Setting up Analysis C by Assembling A & B
The sequence for the following tap dance may be critical to get the sequencing just right:
1. In WB, create a new Modal Analysis in which will be Analysis C
2. Drag the Model from Analysis A3 to Analysis C4 as in Figure 2
3. Right click on Analysis C's Model to 'Update Upstream Components'
4. Double-click on Analysis C's Model to open up Mechanical
5. Drag the Model from Analysis B to Model in Analysis C
6. Right click on Analysis C's Model to 'Update Upstream Components'
7. Right click on Analysis C's Model to 'Update'

The prior flamingo dance should do the trick but it is wise to verify the nodes on the CMS body has lower numbers than those of the non-CMS body in Analysis C before proceeding.

Copying myse* Superelement Files to Analysis C
The purpose of this step is to have Analysis C be given access to the CMS superelement created previously in Analysis A. The quick and dirty way of doing so would be to ...
1. Open up Analysis A in Mechanical
2. Right click on Solution to 'Open Solver File Directory'
3. Copy all files that begins with myse.* (about 9 files)
4. Open Analysis C in Mechanical
5. Right click on Solution to 'Open Solver File Directory'
6. Paste all the myse.* files in this directory

Figure 5: Analysis C with Expanded Results

Analysis C
Both the CMS and non-CMS body should already be assembled here. The contacts are bonded in this example to the master nodes. Beside contacts, the command snippet similar to the previous post was created. Link to command snippet here. Being a assembled analysis, the named selection has the Analysis name with underscores '_' in place of spaces and wrapped-around the analysis name. For example, the named selection for the body for this instance is BODY1_CMS_PART_.

!!!!! Save full model
fini
/filnam, full
save

!!!!! perform use pass solution
/filnam, use
/prep7
! Deletes full body that will be replaced by CMS body
alls
cmsel, s, BODY1_CMS_PART_  ! ** part named selection for deletion **     
nsle
cmsel,u, interA_CMS_PART_  ! ** don't delete interface nodes **
edele, all
ndele, all

alls
*get, etmax, etyp, 0, num, max
et, etmax+1, 50         ! define substructure element type 
type, etmax+1
mat, 1
se, myse                ! define substructure element
fini

/solu
antype, modal
solve
fini

!!!!! expand the solution
/clear, nostart
/filnam, myse
resu

/solu
expass, on
seexp, myse, use     ! substructure name and the use pass jobname 
numexp, all,,, yes   ! Expand all modes
solve
fini


!!!!! merge results file
/clear, nostart
/filnam, full
resume
/delete

/post1
nsubsteps=12         ! **number of modes**
*do,ct, 1, nsubsteps
   file, use
   set, 1, ct
   file, myse
   append, 1, ct
   reswrite, file      ! file name for results file
*enddo

Summary
Now that everything is all set, one can go into Analysis B and change the model. As long as the interface is similar for the contacts to work, the original superelemnt could be reused thus saving computation time. The results are comparable (see archived file).

This is a rather tedious way to get CMS superelement to work in Workbench. There is a rumor Ansys will have it all integrated in the next release a year from now. Until then, hopefully this is helpful.

Resources to Replicate Above Analysis
Analysis A command snippet: Link
Analysis C command snippet: Link
Archived Ansys Workbench V18.0 with results: Link 

All posts on Superelement 
CMS Superelement Harmonic Analysis Link
Reuse CMS Superelement in Ansys Workbench with Expansion Link
Component Mode Synthesis (CMS) with Results Expansion in Ansys Workbench Link
Craig Bampton Method Overview Link
Component Mode Synthesis(CMS) Substructure in ANSYS Workbench Link

Addendum 
In more recent version of Ansys Workbench, distributed file combinations defaults were changed to OFF. This needs to be corrected with appending the following commands to the Analysis A command snippet (Generation Pass).
    dmpopt, esav, no
    dmpopt, emat, no
    dmpopt, full, no

New Post
A new post using Ansys 2019r3 was posted here.

Comments

  1. I'd like to request a version of this method for a static structural analysis with multiple load steps and variable numbers of substeps as I can't get it to work.

    P.S. I think the dmpopt commands above should have yes rather than no on the end.

    ReplyDelete
    Replies
    1. Static only has stiffness matrix so CMS isn't needed. The DMOPT option may be "yes" in more recently versions but I've not checked it myself.

      Delete
  2. Hi

    Great tutorial!
    What if you wanted to perform CMS in a Static Structural instead of a Modal? Would anything have to be set up differently?
    For example: Would you still need to specify number of modes in CMSOPT? And so on.

    What would it take to make this work for a Static Structural?

    Many thanks.

    ReplyDelete
    Replies
    1. For static, look for Substructuring tutorials. It's simpler as there are no dynamic modes to keep track of.

      Delete

Post a Comment

Popular posts from this blog

ANSYS User Defined Results

There is an abundant of options in ANSYS classic when one wishes to post process results. ANSYS workbench default pull down menu post processing options are more limited but they can still be accessed via the User Defined Results. One way not commonly used but can come in handy is as follows: Zeroth: Under Analysis Settings, there is "Output Controls" where you can toggle to "Yes" what you would like to save before the solution starts. This is like OUTRES in APDL. Output Controls First: After solving the model, click on Solution in the tree to highlight it. Solution Second: Click on Worksheet in the toolbar. Worksheet Third: In the worksheet, you will see list of results that are saved. Right click on it to create the User Defined Results. Create User Defined Results So here we have it. You could of look up the different expressions in the help document but I find this method of accessing the results convenient.  Example: Aspec...

Export Stiffness Matrix from Ansys

It is sometimes useful to extract the mass and stiffness matrix from Ansys.     *SMAT, MatK, D, IMPORT, FULL, file.full, STIFF       *PRINT, matk, matk, txt Exporting mass matrix would be similar:       *SMAT, MatM, D, import, full, file.full, MASS The above script uses APDL Math to get the job done. (Please see previous post for another example). The ordering of the matrix is unfortunately not concurrently exported. To verify the sequencing is as expected, we will work to replicate a truss example in the  Finite Element Trusses course notes by Bob Greenlee. Figure 1: Truss Problem Setup Model Creation Script to create model: /prep7 !! Creates Model to reflect course notes ! Properties et ,1,1  mp , ex, 1, 29.5e6 r , 1, 1 ! Geometry n ,1 $  n ,2, 40 $  n ,3, 40, 30 $  n ,4, 0, 30 e ,1,2 $  e ,2,3 $  e ,1,3 $  e ,3,4 ! Boundary Conditions d ,1,ux,0 $  d ,1,uy,0 d ,2,uy...

ANSYS APDL Syntax Highlighting editor

Notepad++ with APDL User Defined Language The editor of my choice is Notepad++  with the available User Defined Language Files for APDL. You can install it without administrative privileges via the zip file. The best part of it is, it's FREE! After installing Notepad++, go to "Language>Define Your Language..." then "Import" the XML file downloaded from the above link. Remember to restart Notepad++ so that the language changes will take into effect. Opening up any *.inp or *.ans files should automatically switch highlighting to APDL. I made some minor edits. Here's my XML file: LINK . I also heard Sublime Text and  Ultraedit  has more advance features but they aren't (totally) free.