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

Apr 29
, 2025
New NVH Tools & Workflows in Ansys 2025 R1 - Webinar
Apr 29
, 2025
Design, Debug, and Test your Ansys Scade One Model - Webinar
May 01
, 2025
Applying Digital Engineering across Space Mission Analysis and Design - Webinar
May 07
, 2025
Meshing Updates in Ansys 2025 R1 - Webinar
May 07
, 2025
Transforming Robot Arm Design with Topology Optimization - Webinar
May 13
, 2025
Ansys Virtual Workshop - PCB Reliability with Sherlock
May 13
, 2025
Dynamic RF Interference: HFSS and STK for Antenna Array Control - Webinar
May 15
, 2025
Applying Digital Engineering across Space Mission Analysis and Design: Satellite - Webinar
May 21
, 2025
Optics Updates in Ansys 2025 R1 - Webinar
May 29
, 2025
Applying Digital Engineering across Space Mission Analysis and Design: Payload - Webinar
Jun 04
, 2025
Composites & Structural Optimization Updates in Ansys 2025 R1 - Webinar
Jun 09
- Jun 11
, 2025
TechConnect World 2025
Jun 18
, 2025
Fluent CPU - UI & UX Updates in Ansys 2025 R1 - Webinar
Jun 16
- Jun 20
, 2025
Turbo Expo
Jun 25
, 2025
E-Mobility and Clean Energy Summit
Jul 02
, 2025
Electric Machine & Consumer Electronics Updates in Ansys 2025 R1 - Webinar
Jul 11
, 2025
2025 Aerospace, Aviation, Defense and Manufacturing Conference
Jul 16
, 2025
HFSS Updates in Ansys 2025 R1 - Webinar
Aug 10
- Aug 13
, 2025
SmallSat 2025

Search the 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: