CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Coupling between CFX and Matlab

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2020, 04:56
Question Coupling between CFX and Matlab
  #1
New Member
 
Martin Rønnov Andersen
Join Date: Oct 2018
Location: Aalborg, Denmark
Posts: 9
Rep Power: 3
Skymaas is on a distinguished road
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!
Skymaas is offline   Reply With Quote

Old   April 13, 2020, 05:50
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,313
Rep Power: 125
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
ghorrocks is offline   Reply With Quote

Old   April 13, 2020, 19:13
Default
  #3
New Member
 
Martin Rønnov Andersen
Join Date: Oct 2018
Location: Aalborg, Denmark
Posts: 9
Rep Power: 3
Skymaas is on a distinguished road
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.
Skymaas is offline   Reply With Quote

Old   April 13, 2020, 19:58
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 16,313
Rep Power: 125
ghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the roughghorrocks is a jewel in the rough
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.
ghorrocks is offline   Reply With Quote

Reply

Tags
cfx, coupling, matlab, optimization

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a CFX Simulation using a MATLAB Interface amsys CFX 1 February 11, 2019 09:57
Integrating/Interfacing cfx with Matlab Darren Leong CFX 34 February 9, 2019 07:33
How to control CFX with Matlab Behnam.Esfandiar CFX 4 April 29, 2014 09:02
Cfx - matlab camilo_costa CFX 15 October 14, 2013 17:18
Call CFX from MATLAB alikhube CFX 7 December 30, 2012 06:35


All times are GMT -4. The time now is 14:08.