For those that don’t know, Flownex is a thermal-fluid system modeling tool that is great for modeling heat, flow, pressure, etc… in systems. At PADT we often connect it to ANSYS Mechanical to do more detailed component level simulation when needed.
Why the need for the link in the fist place?
- It is an automated workflow to couple Flownex and ANSYS through direct mapping of Flownex results (HTC and bulk temperatures) as boundary condition to an ANSYS thermal analysis.
- Represents a conjugate heat transfer model with fluid calculations handled in Flownex
- Allows one to easily/quickly investigate fluid flow and heat transfer properties under a wide range operating conditions.
First we will discuss the steady state thermal ANSYS Mechanical model that will be linked to Flownex.
We have a pipe Pipe with arbritraty geometry and material properties. Convection boundary conditions have been applied to both the internal and external pipe walls. The inernal Bulk Temperature will be supplied by Flownex.
- External BC
- HTC 100 w/m2K
- Bulk Temperature 22C
- Internal BC
- HTC 1500 w/m2K
- Bulk Temperature will be supplied by Flownex
In order to achieve a bidirectional coupling, Flownex will execute the Mechanical APDL batch file. We can generate the Mechanical APDL batch file (ds.dat), from within Mechanical.
The soluiton procedure is as follows
- Flownex modifies the ds.dat file
- Flownex executes the modified ds.dat file
- The modified ds.dat file generates the d_result.txt file
- Flownex reads the d_result.txt file
- Flownex executes an iteration, using value from d_result.txt
- Repeat untill solutions are converged.
The next step after creating the ds.dat file is to set up your Flownex model.
The Flownex model comprises of a pipe component with arbritrary geomery, filled with air with an inlet temperature and pressure of 500˚C and 120 kPa respectilvy and a flow rate of approximatly 1kg/s.
We have connected the pipe component to the Mechanical Generic Interface using data transfer links.
The data transfer links pass the bulk fluid temperature form the pipe to the Mechanical Generic Interface component, and return the heat flow value calculated using ANSYS to the pipe.
Next we need place the ds.dat file in the AnsysMechanical_Files folder which is located in the Flownex project folder. It is necessary to create a copy of the ds.dat called ModifiedData.dat in the same location.
C:\Program Files\ANSYS Inc\v180\ansys\bin\winx64\Ansys180.exe
This is the path to ANSYS executable. Pay particular attention to the version number (eg 180, 172), as this will be different depending on the version of ANSYS you have installed.
2) Command line parameters
-b -i ModifiedData.dat -o results
Flownex will launch ANSYS, and execute the ModifiedData.dat Mechanical APDL batch file from the command line, using the above command a detailed description of command line options can be found in another blog post here.
3) Project files folder, Data file name and Modified data file name
Here we specify location of the Mechanical APDL batch files
Here we will define where in ModifiedData.dat the value from Flownex, fluid temperature in this case, will be placed. This is done by determining what the boundary condition variable and ID is, and finding the prefix before the boundary condition value in the ds.dat file. Typically the variable for temperature is _loadvari and for HTC it is _convari.
It is possible to know the boundary condition ID by activating the appearance of Beta options in WB.
Here we will specify the location of the d_result.txt that ANSYS generates. It should appear in the same folder as the Mechanical APDL batch files after successful execution.
Flownex and ANSYS will pass data back and forth every time step of a transient Flownex run.
The simulation should continue to run up to, and beyond the point where the Flownex and ANSYS simulation have converged. If we plot out the heat input or temperature value vs time we should be able to visualize convergence, akin to residual plots when running a CFD simulation, and then manually stop the simulation after values have stabilized.
Below we increase the fluid inlet temperature form 500˚C to 1000˚C after 10 iterations, and observed a increase in heat flow from ~1.4kW to ~2.8kW.