Skip to main content

Posts

Showing posts from June, 2017

Defining Ansys Superelement SUB File Manually

Photo by  James Owen  on  Unsplash A surprisingly popular blog-post written here is Exporting Stiffness Matrix from Ansys . A sensible follow up question is what can one do with the exported stiffness matrix? In a recent Xansys Forum post, a question was raised on how we can edit the stiffness matrix of a superelement and use it for our model.  An approach presented below is to first create a superelement that has the same number of DOF and nodal location that will serve as a template. An APDL script can then be written to edit the stiffness matrix entries as desired before exporting to a new superelement *.SUB file for use in future models. The self-contained script below demonstrates this.  /prep7 et ,1, 185 mp , ex, 1, 200e3 mp , prxy, 1, 0.33 w = 0.1 ! single element (note nodal locations) n , 1, w, -w, -w n , 2, w, w, -w n , 3, -w, w, -w n , 4, -w, -w, -w n , 5, w, -w, w n , 6, w, w, w n , 7, -w, w, w n , 8, -w, -w, w e , 1, 2, 3, 4, 5, 6, 7, 8 /solu antype , substr     ! analy

COMBIN40 As Simplified 1D Friction

Spring that Imitates Static/Dynamic Friction Sometimes, a simple linear spring is not adequate. In tough jobs where a spring with a built-in gap or force saturation is needed,  COMBIN40 is the spring of choice. It could behave similarly to a one dimensional friction contact like in  Wikipedia : Static to Dynamic Friction In the animation above, the spring is actually two COMBIN40 springs in parallel. When done just right, they could imitate the behavior of static to dynamic friction forces: Spring Forces To do it in Mechanical, here's the tip! Under Geometry, you'll have to change the Element Control setting to Manual. This allows the spring element to be modified. Element Control Next, two identical springs are added (parallel springs). The snippet for the first spring: Spring #1 Snippet The second spring snippet: Spring #2 Snippet The snippet has two lines of code. The first line changes the element to COMBIN40, the second line de

It's EALIVE! It's Alive!

To be able to EKILL and EALIVE elements is a neat trick. It allows for a dormant element that springs to life. The reactivated elements have zero strain so some people use it to simply clear it of any unwanted stresses. I have more frequently use it to turn on and off contacts. Here's a simple example problem: A block is fixed at the bottom, the top cylinder is pushed by hand downwards until it touches the block. Because of adhesive, the two are now 'bonded' together. In the second step, the hand lets go of the cylinder, the spring which is attached to ground at the top pulls on the cylinder creating stress on both parts. Just push down to cure glue and let go! There are a few steps needed to get this to work. Firstly create a snippet of the bonded contact so it could be identified later. The code is simply: mycid = cid mytid = tid Secondly, create two more snippets in the Analysis tree. Snippet #1 will EKILL the contacts for the first time step. Specifyin

ACT Console

The Humble Hammer Not being very handy around the house, I own a cheap  low cost hammer. But as any pro would tell you, no one uses a hammer for roofing. It is very inefficient and gives you a sore arm. We all want to avoid repeated stress-related injuries (physical and emotional). "Mouse Finger" injury is very real! To mitigate this, Ansys Mechanical has this really cool Automation API. Though intended for ACT debugging and creation, the ACT Console allows the user to input commands that is immediately reflected inside Mechanical. This functions like the Input Line in Ansys Classic! Unfortunately Mechanical only speaks Python and not APDL; so I'm just starting to learn a new language which is hard for an old guy like me. The potential benefits are enormous. Here are some examples: Say you do non-linear analysis 60% of the time and use the the same settings from a mental checklist. Now you could create Python script to automate those clicks.  If you have many t

APDL Math Example

I read about APDL Math a few years ago with much intrigue. A very interesting write-up about it can be found here . What stood out to me was the possibility of computing modal sensitivity relative to different variables similar to what SOL 200 offers in NASTRAN for optimization. Web Resources Ansys Help Document : The commands are documented though the available examples are limited PADT Blog Post : Eric's article gives a good overview of the capabilities Ansys Knowledge Resource #2025879 : Additional guidance in usage. PADT Blog Post  [Edit: Sept 12, 2017]: Awesome post! Results back in 'User Ordering'! AnsysTips Blog Post [ Edit:  Oct 11, 2017]: Export Stiffness Matrix Unfortunately, that's about all I could find anywhere. APDL Math Example Overview DOF ordering is not addressed here. I have not yet figured out a good way to do it yet so please share if you can convert to the 'user ordering' all in one shot. Please see the script on how the solu