How to develop this idea to couple Workbench (Fluent/CFX) with other codes?

  • Last Post 02 April 2019
Khozaei posted this 01 April 2019

Hi everyone


I have an idea which I'm not sure how to develop. In general, I need to simulate a transient problem in Fluid Mechanics. So, I can use either Fluent or CFX as solver, no matter which but CFX is more preferable (the most important goal is to develop my idea not the solver). 

What I am going to do is mainly to update the problem boundary conditions, run some workbench journal files, and etc. at every time step of the solution. Here is my idea, to do the following task at every time step:

1. when time step is solved, export some certain results into an excel file.

2. wait for a trigger order to start solving the next time step (trigger can be anything like a 1/0 condition in a .txt file).

3. when trigger order is available, update the problem conditions (including boundary condition values, material properties, and so forth) through reading an excel file. And also, run a workbench journal file. It can be done by reading a workbench journal file and by use of Microsoft OfficeExcel component in workbench.

4. when excel file is read, start the next time step, then go to 1.


The hypothesis is to solve the problem in a coupled mode between Fluent/CFX solver and another code which I am writhing now. So, for every time step, both Fluent/CFX and my code should be solved together in this manner that the results of Fluent/CFX are the boundary condition for my code at the current time step, and the results of my code at the current time step are the boundary conditions for solving the next time step by Fluent/CFX.


I don't know how to control the solution, how to stop the solver at every time step and make it wait for a trigger order, how to read journal files at each time step, and so forth.

Any idea, help, suggestion in this regard is welcome and highly appreciated.


Thank you.

Order By: Standard | Newest | Votes
rwoolhou posted this 01 April 2019

It is possible to link Fluent (and CFX) to other codes through Workbench, using Workbench as the controller.  I'm not sure exactly how, and can't give details on a public forum either: I'd suggest reading the System Coupling & Fluent AAS sections of the manual. Note, you may need a research licence for some of this as the Student & Teaching licences don't contain all of the features. 

An alternative is to use a UDF (or User FORTRAN) in Fluent (CFX) and do all of the work inside the CFD solver. That removes the need to work externally and also automatically pauses the calculations. 

  • Liked by
  • Khozaei
Khozaei posted this 02 April 2019

Hi Dear Rwoolhou

Thank you for your help. I've started to read System Coupling manual. I'm not sure if I can get a result from it, but I am trying.

UDF is also a possible option. I need to try them all. If I succeed, I'll update the post here.

Many thanks.