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

How to connect calculation in Matlab with calculation Fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2017, 12:18
Post How to connect calculation in Matlab with calculation Fluent
  #1
New Member
 
Join Date: Mar 2017
Posts: 4
Rep Power: 9
Fany is on a distinguished road
Hello, I'm trying to solve probleme with connection of two diferent programs (in my case Matlab and Ansys Fluent) and make them to cooperate. The way of cooperation should be to change the boundary conditions in fluent by some other numbers computed from Matlab, and also to send informations back to matlab (e.g. by some txt). And this action just to repeat every timestep. I want to couple 1D calculation (Matlab) and 2D (Fluent). Please, have anybody any experience with this?.

Thanks for replies.
Fany is offline   Reply With Quote

Old   March 11, 2017, 17:39
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You're gonna have to be a lot more specific!

What exactly do you want to export from Fluent? You can export solution data using the transient data export. Is that sufficient for what you are trying to do?

To read the boundary condition at every time-step. you can take advantage of the "calculation activities" option in Fluent to read a profile every time-step. You can also do this to export a profile every time-step. Is that what you're trying to do?

The big question is, are you able to run matlab from inside Fluent, i.e. via the command line?
LuckyTran is offline   Reply With Quote

Old   March 12, 2017, 05:10
Default matlab to fluent
  #3
New Member
 
Join Date: Mar 2017
Posts: 4
Rep Power: 9
Fany is on a distinguished road
I would like to connect the 1D calculation in matlab and 2D - 3D calculation in fluent. It means to divide model (1 meter long pipe) into two connected pieces, one to 2D (Fluent) and the second one to 1D (matlab). And i would like to start the calculation at Fluent and then the data from fluent (from end of domain) to export into the matlab and there i want to calculate the rest of domain in curent timestep. When both of calculations will be done in curent timestep i would like to import data from matlab back to Fluent. And after this actualization of boundary conditions i would like to start the next timestep the same way. maybe its possible by some rewriteble txt file..
Fany is offline   Reply With Quote

Old   March 12, 2017, 13:59
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
No one can help you if you are vague! If you are vague enough then maybe everything is possible! But maybe is not an answer.

What data do you need to export? And how much? You can export all solution data at the exit by using the solution data export option. Okay done.

So I assume you can now read this into matlab and do whatever you want to do. And you do something in matlab, I have no idea what.

What do you want to import? For example, do you want to save a a .jpg of a bananna and import it as the boundary condition? It makes no sense. What are you importing, where are you importing it to. Which boundary condition is it? The inlet? the outlet? Some other magical place? What type of boundary condition? Pressure? Velocity? Something else?
LuckyTran is offline   Reply With Quote

Old   March 13, 2017, 09:49
Default matlam + fluent
  #5
New Member
 
Join Date: Mar 2017
Posts: 4
Rep Power: 9
Fany is on a distinguished road
Yes, u are right, i should think first about my problem more deeply to specify it better. But, thank you for answers. I'll be back . Everything is possible!
Fany is offline   Reply With Quote

Old   May 11, 2017, 13:20
Default
  #6
New Member
 
Join Date: Mar 2017
Posts: 4
Rep Power: 9
Fany is on a distinguished road
Hello, so I'm bacback with new question. Is possible to make a Fluent to read new journal File by Matlab, when the Fluent is allready opened?
Fany is offline   Reply With Quote

Old   May 11, 2017, 17:50
Default
  #7
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Fany View Post
Hello, so I'm bacback with new question. Is possible to make a Fluent to read new journal File by Matlab, when the Fluent is allready opened?
Never ask if it is possible, it almost always is or you simply don't know how to do it yet. You need to be asking how to do it, and if it is too complicated for you.

See the blog. Ordinarily, once Fluent is running you cannot give it new commands. However, if you give yourself a "backdoor" into the cortex, you can make Fluent do almost anything. It's not a backdoor per se because it's an officially supported function.

http://www.ansys-blog.com/how-to-mak...ps-for-fluent/
LuckyTran is offline   Reply With Quote

Reply


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
Calculation of reaction force and moment in fluent ldb83 FLUENT 4 September 28, 2014 03:53
How To Make MATLAB Apps For Fluent behest FLUENT 0 March 3, 2014 08:00
Importing FLUENT .srp files into MATLAB CAD-AL Main CFD Forum 0 August 8, 2011 09:41
On Bug of Fluent 12.0 lzgwhy FLUENT 0 August 26, 2009 07:41
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 23:22.