|
[Sponsors] |
April 13, 2020, 05:56 |
Coupling between CFX and Matlab
|
#1 |
New Member
Martin Rønnov Andersen
Join Date: Oct 2018
Location: Aalborg, Denmark
Posts: 10
Rep Power: 8 |
Hi!
Is there a way to couple CFX and Matlab? I have an optimization problem where I would like to perform all flow simulations in CFX and run the optimization through Matlab. I intend to use Matlab as the "Master" and CFX as a "Slave" - if that makes sense. Thank you! |
|
April 13, 2020, 06:50 |
|
#2 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
What level do you want to do the coupling?
If you want CFX to do the simulations, output a result and matlab processes the result, and generates a modified input file which is passed back to CFX: This type of coupling is straight forward and can be done using the command line interface. You drive CFX-Pre and CFX solver from the command line from Matlab, and it runs inside a matlab script. If you want matlab to couple into the simulation running in CFX then things are MUCH harder. I hope you don't want to do this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
April 13, 2020, 20:13 |
|
#3 |
New Member
Martin Rønnov Andersen
Join Date: Oct 2018
Location: Aalborg, Denmark
Posts: 10
Rep Power: 8 |
Hi Glenn, thank you for the answer!
Yeah, basically as you write: Run the simulation in CFX --> Extract the result and put into Matlab --> Generate a new input file --> Put into CFX --> Run again. And the loop then continues, until an or several optimum points have been generated/found. The idea is to use a genetic algorithm in Matlab. Do you have an example of something remotely related to this? This is my first time using the command line interface. |
|
April 13, 2020, 20:58 |
|
#4 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
The command line interface of CFX is described in the documentation. Or you can just fire up a command line and ask for help. The commands are cfx5solve and cfx5pre, and they both have a -help option.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
Tags |
cfx, coupling, matlab, optimization |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a CFX Simulation using a MATLAB Interface | amsys | CFX | 1 | February 11, 2019 10:57 |
Integrating/Interfacing cfx with Matlab | Darren Leong | CFX | 34 | February 9, 2019 08:33 |
How to control CFX with Matlab | Behnam.Esfandiar | CFX | 4 | April 29, 2014 10:02 |
Cfx - matlab | camilo_costa | CFX | 15 | October 14, 2013 18:18 |
Call CFX from MATLAB | alikhube | CFX | 7 | December 30, 2012 07:35 |