Sunday, September 5, 2021

How to... define transient table to BC's in Ansys Fluent

 It often happens in CFD modeling that our boundary conditions change over time. Then there is a need to make the input variable dependent on time. For example, on Inlet, we want the gas temperature to increase over time in the transient analysis. For this type of simulation, a very useful option in Fluent is to define transient table data.

how to create input table in fluent ansys
Example of transient table in Ansys Fluent 

The first step is to create a table for our input variable. Below I will show you step by step how to create, define and load such a table in Fluent preporcessor. Let me take the example of defining a temperature variable as a function of time for the Inlet boundary condition.

After defining the values (e.g. in an Excel spreadsheet) of the time and temperature columns, copy the generated table to Notepad (txt file). After exporting the values, we change the commas of the values to dots because in the Fluent preprocessor all decimal values, hundredths, etc. are marked with a dot. It is important to define temperature values in Kelvin because all UDFs in Fluent are in SI units.

In the Notepad worksheet, we name our table (red frame). Then we define the number of variables (blue table). In our case, we have two variables: time and temperature, so the value in the blue box will be 2. The next number (black box) will be the number of rows we have created in the table. The last frame (green) is an option whether our data is periodic or not. If we want our data to loop (repeat) then the value is set to 1. This is useful when our overall analysis has a much longer defined time than the final value (last row) in our table. However, in the case when we know the entire course of a given variable (temperature) and there is no repeatability of given time intervals, we set the value to 0.

The last step of table definition is to define our input variables (orange and pink frames). In our case, it is the temperature change in relation to the Inlet boundary conditions.

The next step in the definition of transient table data is loading our table into the Fluent preporcessor. We put the txt file in the working directory FFF- (number of simulation) / Fluent of our simulation. By default, the directory is located in the auto-generated root directory dp0.

how to load table in ansys fluent
Command which we need to input in Console in Ansys Fluent (transient table)

Then in the Fluent Console we write (image above):
file (enter)
read-transient-table (enter)
the name of our file.txt (not to be confused with the name from the red frame)
In the last step, in boundary conditions, we chose Inlet. Then, in the Thermal tab, expand the check box and select the table with the name from the red frame.













No comments:

Post a Comment