CFX Expression Language – Part 2: Augmenting Material Property Assignments in ANSYS CFX

Categories:

In a previous entry we introduced CFX Expression Language, CEL.  You can view that post here. 

Before we get started, there are some key things to remember:

  1. Expressions can be easily created by right-clicking in the Expressions tab after double clicking on Expressions in the CFX Pre object tree.
  2. Expressions and their contents are case sensitive.

In this next part of the series, we’ll show how to use CEL to augment your material property definitions in CFX. If material properties are constants then their input is straightforward. However, if the properties are defined as equations, we can use CEL to input those equations in CFX.

For example, if viscosity is defined as a function of shear strain rate, we need to define viscosity using an equation that captures that relationship, such as

m = K * gn-1

Below are shown two ways in which that equation can be captured using CFX Expression Language, visc1 and visc2. The second equation, visc2, is more flexible in that we have defined the constant terms as expressions themselves.

clip_image002

It’s always a good idea to verify the input. Most expressions can be easily plotted by clicking on the Plot tab in the Details view. Here is a plot of the viscosity vs. shear strain rates between 0 and 1, as calculated by expression visc2:

clip_image004

Similarly, the Evaluate tab can be used to evaluate the expression for desired values of the inputs.

So, we have defined an expression for a material property, viscosity in this case. How do we get CFX to use that expression? In the material property input, we click on the expression icon to the right of the particular material property we are defining, then enter the name of the expression, as shown here for expression visc2:

clip_image006

Summing it up, we can use CFX Expression Language to define material property equations for non-constant material values. In the next installment we will look at how to use CEL to define changing boundary conditions, such as a ramped load.

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

Technical Expertise to Enable your Additive Manufacturing Success.

Share this post:

Upcoming Events

Oct 13
- Oct 14
, 2026
Ansys Transportation Summit & International LS-DYNA User Conference
Oct 14
, 2026
Global Allied Aerospace & Defense Forum + I2A Expo
Oct 15
, 2026
Faster, Smarter Mixing Simulations: GPU-Accelerated CFD, ROMs and a Dedicated App - Webinar
Oct 15
, 2026
Innovations in Manufacturing Innovation
Oct 19
- Oct 22
, 2026
Digital Twins and AI for Smarter Data Centers - Webinar
Oct 20
, 2026
Ansys Simulation Solutions for Chains, Belts, and Gear Systems - 2026 Update
Oct 21
, 2026
2026 Southern Arizona Tech + Business Expo
Oct 22
, 2026
Tucson Ansys Optics User Group Meeting
Oct 28
, 2026
Nerdtoberfest 2026
Oct 29
, 2026
Virtual Workshop: PCB Reliability Basics with Ansys Sherlock
Oct 29
, 2026
Integrating Optical Design with Sensor Simulation for Robotic Systems: A Virtual Deep Dive
Nov 15
- Nov 18
, 2026
2026 ANS Winter Conference & Expo
Nov 18
, 2026
2026 Governor’s Celebration of Innovation

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: