Ansys Fluent Custom Input Parameters

July 16, 2019 | Author: kristeen78 | Category: Parameter (Computer Programming), Computer File, Computer Engineering, Computing, Technology
Share Embed Donate


Short Description

The task is to set the parametric study involving different set of pre-defined fluid materials. The example utilises a n...

Description

ANSYS Fluent in Workbench Custom-Input-Parameter 14.5 Release

Maciej Ginalski

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 cas e 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

Model Setup

Solving

Post-Processing

Summary

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

Model Setup

Solving

Post-Processing

Summary

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

Model Setup

Solving

Post-Processing

Summary

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 project’s ‘user_file’ folder Select open to close the panel.

Introduction

Model Setup

Solving

Post-Processing

Summary

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 project’s ‘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

Model Setup

Solving

Post-Processing

Summary

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

Model Setup

Solving

Post-Processing

Summary

Enable Beta options in Fluent •

Type the following TUI command to enable Beta options in Fluent.

 /define/beta /yes ok

Introduction

Model Setup

Solving

Post-Processing

Summary

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

Model Setup

Solving

Post-Processing

Summary

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

Model Setup

Solving

Post-Processing

Summary

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

Solving

Post-Processing

Summary

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

Model Setup

Solving

Post-Processing

Summary

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

Model Setup

Solving

Parametric Study

Summary

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

Model Setup

Solving

Post-Processing

Summary

Further work • There are many ways the simulation in this tutorial could be extended •

Use more elaborate combinations of material settings •



Multiple Custom-Input-Parameters •



User can define multiple Apply Functions and store these functions in the registered scheme file.

More elaborate TUI commands •



User can prepare multiple variations of material properties involving tabular data or extrapolated functions.

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)

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

Model Setup

Solving

Post-Processing

Summary

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF