Hold my Beer: Spatially Varying Materials in Ansys Mechanical Made Easy

By: Doug Oatis
– February 3, 2022
Categories:

Do you hear that sound? It’s the celebration of all my adoring fans celebrating a long-awaited blog post! I figured having “create new blog content” on my quarterly review for the past 32 quarters was impressive, but 33 was just unacceptable. So here we are. In an attempt to trick myself into routinely writing something, I’m starting what I’m calling “hold my beer” type of articles where a quick write-up of a work-around, fix, new feature, etc is discussed. Basically, if someone says some task is too difficult, tedious, etc… hold my beer, cuz I’mma fix that for you. 

All right, first topic… can you create a spatially varying material property definition. I sure hope you’re not using a stand-up desk… because the answer is yes. This process is more commonly used for lattice optimization (validating the variable field map), simulating composites (creating a map of degradation factors), or the newer short fiber composite workflow (which is extremely cool…check it out…caution:  potential foreshadowing). Behind the scenes, we accomplish this by using field variables. While I listed some common/standard field variables above, you’re more than welcome to define your own variable for use in mapping. These field variables are usable for most common material properties…to show I’m not lying, here’s a documentation link:

https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v221/en/ans_mat/mat_fielduserdef.html

The way these field variables work is I define my material properties (see documentation above for supported materials) vs. a field variable. I then map that field variable onto my elements, and they then look up what the material is. Brilliant! 

Because I just had an MRI, let’s start with a hypothetical situation where I want to run a simulation where I’m converting MRI data into linear elastic behavior. The first stop on our journey is Engineering Data:

Note, in order for ‘field variables’ to show up I actually have to click on the material model in the outline row.  If I hadn’t clicked on ‘isotropic elasticity’ then I wouldn’t see ‘field variables’.  For this I’ll just double click ‘create field variable’:

The name here doesn’t need to match.  I’m doing that just for my own sanity.  Ultimately we’re just mapping information from a point cloud to the mesh.  After I hit ‘ok’ in that image I’ll now see:

So now I can define two dvalue lines, which could then have different temperature-dependent effects, and fill out the young’s modulus definition:

So I’ve now defined for dvalue=100, E=2E11 prxy=.3 and for dvalue=200, E=1E11 prxy=.27. 

Super easy so far. I have defined a material model that will create a tabular representation modulus. Now we go to External Data to read in a CSV file which will map the field variable onto my mesh. The benefit here is that I can mesh my model however I like, and it’ll still perform the map. 

Note that external data can map many different things.  Because we are mapping material information we need to connect it to the ‘model’ cell.  Otherwise, if we had spatially dependent boundary conditions we could link it to the setup. 

Going into External Data:

Select that to then browse to the CSV file (oh, forgot to say you need to save that excel file as a CSV):

I now need to set some controls for how the file is read (bottom-left corner) and what the columns mean (top-right) which will generate a preview (10-rows only, bottom right). 

First select the ‘material field data’ which allows you to access the field data present in Engineering Data.  Then specify the length (I took all my measurements in inches).  Then, specify your column headers to be x/y/z/dvalue.  Then verify that everything looks right in the preview…and finally toggle the option to start the import at line 2 (we don’t want to read the CSV header as mappable data). 

All done, update things on the project page and open Mechanical (note, you can do this after you’ve already built a model, as shown I’m building it from scratch…just drag/drop the connections and ensure that everything is properly updated on the project page):

Now in Mechanical, I’ll see an ‘imported material fields’ item:

Scope the material field object to the body you want, right-mouse on it and update (this will mesh the body and perform the map):

Reason it isn’t showing 100-200?  This is mapped to the elements while the keypoint measurements were on the nodes (I built the CSV by just copying the x/y/z location of all my keypoints to excel and then defining a variation in the y-direction).  So elements on the boundary will have a gradient and not be at 100 or 200…so this is correct. 

Next, you want to look at the mapped values…which is easy!  Insert a material plot into the plot branch, tada:

Lines up with the engineering data definition!

Behind the scenes you can dig into the input file to see what actually happened:

You can see lines 12581-12585 specify a tabular representation of isotropic elasticity. Then starting at line 12599 it’s starts applying a custom field variable to my elements using options from the initial-state/INISTATE family of commands. You don’t need to know any of this, I’m just showing how the sausage is made. 

So, no need to cut your model up into a bunch of slices, fight carpal tunnel defining multiple material models and assigning them down your sliced up model, then threatening to quit when someone says that the spatial variations have changed. Field variables, external data, done. 

I’ll take my beer back…

Categories

Certified Elite Channel Partner

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Product Development
Diamond Partner

Technical Expertise to Enable your Addictive Manufacturing Success.

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.


By submitting this form, you are consenting to receive marketing emails from: Phoenix Analysis and Design Technologies, 7755 S. Research Dr., Tempe, AZ, 85284, https://www.padtinc.com. You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Share on twitter
Share on facebook
Share on linkedin
Share on pinterest

Upcoming Events

05/19/2022

RAPID + tct 2022

05/19/2022

Venture Cafe Roundtable: AI & Healthcare

05/18/2022

Tucson after5 Tech Mixer: World View

05/18/2022

RAPID + tct 2022

More Info

05/18/2022

Signal & Power Integrity Updates in Ansys 2022 R1 - Webinar

05/18/2022

Simulation World 2022

05/17/2022

RAPID + tct 2022

05/11/2022

Experience Stratasys Manufacturing Virtual Event

05/04/2022

Mechanical Meshing Updates in Ansys 2022 R1 - Webinar

04/27/2022

04/22/2022

12TH ANNUAL TUCSON GOLF TOURNAMENT

04/21/2022

04/20/2022

Additional Fluids Updates in Ansys 2022 R1

04/20/2022

Experience Stratasys Tour – Tempe Arizona

04/18/2022

Experience Stratasys Tour - Flagstaff Arizona

04/14/2022

D&M West | MD&M West

04/13/2022

D&M West | MD&M West

04/13/2022

Experience Stratasys Tour - Albuquerque New Mexico

04/12/2022

D&M West | MD&M West

04/12/2022

Experience Stratasys Tour - Los Alamos New Mexico

04/12/2022

Optimizing Engineering Workflows f​​​​or Propulsion System Design

04/07/2022

Experience Stratasys Tour - Austin Texas

04/07/2022

37th Space Symposium - Arizona Space Industry

04/06/2022

Transforming Digital Engineering with Ansys Discovery 2022 R1

04/06/2022

37th Space Symposium - Arizona Space Industry

04/05/2022

37th Space Symposium - Arizona Space Industry

04/04/2022

37th Space Symposium - Arizona Space Industry

03/30/2022

Simulation Best Practices for Vehicle Engineering - Webinar

03/23/2022

03/23/2022

High & Low Frequency Electromagnetics Updates in Ansys 2022 R1

02/24/2022

Arizona Technology Council After 5 Tech Mixer "Pandemic Pivot Pizza Pa

02/23/2022

SciTech Festival: Spend an Hour with 3D Printing Experts

02/11/2022

Webinar: Mechanical overview for Ansys 2022 R1

More Info

02/09/2022

Webinar: Product Development 101 (FAKE)

02/08/2022

Webinar: Navigating the Additive Landscape

01/27/2022

Arizona Technology Council 1st Quarter VIP Tech Mixer

More Info

01/26/2022

Simulation Best Practices for Gas Turbine Design & Development - Webin

More Info

01/19/2022

Arizona Photonics Days

More Info

11/04/2021

ExperienceIT, New Mexico

More Info

11/03/2021

Additive Manufacturing & Structural Optimization in Ansys 2021 R2 - We

More Info

11/03/2021

Optics Valley Technical Series: The Future of Simulation in the Optics

More Info

11/02/2021

SBIR Liftoff AZTC Virtual Breakfast Series

More Info

10/10/2021

Stratasys Mobile Truck Stop - Tucson Arizona

More Info

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: