You are on page 1of 15

ANSYS Fluent in Workbench Custom-Input-Parameter

14.5 Release

Maciej Ginalski
2012 ANSYS, Inc. May 20, 2013 1 Release 14.5

Simulation to be performed
The task is to set the parametric study involving different set of pre-defined fluid
materials. The example utilises a new Custom-Input-Parameter option (Beta) in ANSYS Fluent v14.5 solver.

This example will be making use of the prepared Fluent case. The case was set
with seven different materials representing air (air1,air2, , air7) and every air material is utilising a different density model available in the Fluent solver.

The simulation is being performed to determine:


pressure drop and average gas density for a
number of different cases (every case will utilise different density formulation)

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
2

Post-Processing

Summary
Release 14.5

Starting a new project in Workbench


Start a new workbench session Save the project as: CIP-Material Locate the user_files folder
associated with this project and copy files provided with this tutorial into this folder

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
3

Post-Processing

Summary
Release 14.5

Define Scheme Function


Open any Text Editor and copy & paste the following function definition
Scheme function name Custom Input Variable
(define (Material value) (format "### Changing Material to: air~a ...\n" value) (ti-menu-load-string (format #f "/define/boundary-conditions/fluid fluid yes air~a no no no no 0 no 0 no 0 no 0 no 0 no 1 no no no no" value)) (format "\n### Material changed to air~a successfully!" value) )

Fluent TUI command

Save the file as: CUI-Material.scm in the user_files directory of you workbench
project
Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
4

Post-Processing

Summary
Release 14.5

Import Fluent Case File


Drag a Fluent component system
onto the project schematics

Right-click on Setup, and select


Register Startup Scheme File, and Browse

Browse to and select the file


CUI-Material.scm located in projects user_file folder
Select open to close the panel.

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
5

Post-Processing

Summary
Release 14.5

Register Pre-prepared Scheme File


Right-click on Setup, and select
Import Fluent Case, and Browse

Browse to and select the file


CUI-Material.cas located in projects user_file folder

In the Fluent Launcher panel select


Double Precision option and press OK
If Cancel option is selected WB will associate selected case file with Setup cell without opening Fluent.

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
6

Post-Processing

Summary
Release 14.5

Verify registration of the scheme file


In Fluent Text User Interface (TUI) type the following
command: (material 1) Including the brackets

If the Scheme file was registered successfully Fluent will report the following message: ### Material changed to air1 successfully

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
7

Post-Processing

Summary
Release 14.5

Enable Beta options in Fluent


Type the following TUI command to enable Beta options in Fluent.
/define/beta /yes ok

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
8

Post-Processing

Summary
Release 14.5

Define Custom-Input-Parameter
In Text Console type the following command:
/define/parameters/custom-input-parameters create
Name of parameter: material-id material-id is the parameter name that will appear in WB and parameters panel in Fluent Material-id value [0]: 1 material-id value is the initial value of the parameter Name of custom-input-variable: id id is the name of the variable passing information between WB and Fluent Enter the name of apply-function []: material material is the name of the scheme function defined within the scheme file

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
9

Post-Processing

Summary
Release 14.5

Define Output Parameters


Open the Parameters Panel

Select from menu: Define => Parameters Under Output Parameters select Create > Surface Integrals to open Surface Integrals panel Under Report Type select AreaWeighted Average Under Field Variable select Pressure and Static Pressure Under Surfaces select inlet and outlet zones Select Save Output Parameter to open Save Output Parameter panel Specify name of the new parameter: DelP and press OK Close the Surface Integrals panel

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
10

Post-Processing

Summary
Release 14.5

Define Output Parameters


Define DenAvg output parameter in
a similar way to DelP
DenAvg parameter will monitor the value of average density at the outlet

In the Surface Integrals panel:

Keep Report Type as AreaWeighted Average Under Field Variable select Density and Density Under Surfaces select only outlet zone Select Save Output Parameter and specify name of the new parameter: DenAvg and press OK Close the Surface Integrals panel Close the Parameters panel
Introduction Model Setup
May 20, 2013

Solving
11

Post-Processing

Summary
Release 14.5

2012 ANSYS, Inc.

Run the Simulation Current (DP0)


Close Fluent Save the workbench
session

Right-click on Solution,
and select Update
Wait for approx 1 minute whilst the first Fluent model is computed.

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
12

Post-Processing

Summary
Release 14.5

Run the Parametric Study


Right-click on Parameters Set
bar, and select Edit to access parameters manager Add six new Design Points (DPs) in the Table of Design Points by specifying material-id value as demonstrated on the picture Select Update All Design Points This will take about 5 minutes to compute.

Observe the effect of varying the


material parameters has made to the output parameters.
Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
13

Parametric Study

Summary
Release 14.5

Wrap-up
This workshop has shown the basic steps required to define and utilise Custom-Input-Parameter enhancements introduced as the Beta feature in Fluent at R14.5 The main motivation behind this functionality is to allow users to avoid the limitations of standard parameters defined in Fluent GUI. Every model feature, and every solver setting can now be converted to a parameter which will be further exposed within the workbench environment. In v15.0 will bring more new features and support in GUI.

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
14

Post-Processing

Summary
Release 14.5

Further work
There are many ways the simulation in this tutorial could be extended
Use more elaborate combinations of material settings
User can prepare multiple variations of material properties involving tabular data or extrapolated functions. User can define multiple Apply Functions and store these functions in the registered scheme file. The single custom-input-parameter can be employed to control multiple settings at once (i.e. once parameter can be used to control number of boundary conditions)

Multiple Custom-Input-Parameters

More elaborate TUI commands

Use DEFINE_OUTPUT_PARAMETER() UDF macro


Extended by the potential of DEFINE_OUTPUT_PARAMETER UDF macro Custom-InputParameters provide extensive capability of controlling and reporting every aspect of Fluent simulation with a set of pre-defined parameters.

Introduction
2012 ANSYS, Inc.

Model Setup
May 20, 2013

Solving
15

Post-Processing

Summary
Release 14.5

You might also like