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

Matlab-Fluent Interfacing

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

Like Tree1Likes
  • 1 Post By ATIKADAR

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2019, 16:08
Default Matlab-Fluent Interfacing
  #1
New Member
 
Amitav tikadar
Join Date: Jul 2017
Location: Atlanta
Posts: 6
Rep Power: 5
ATIKADAR is on a distinguished road
I am trying to interfacing between Ansys Fluent 2019R2 and Matlab. I can run my Fluent simulation via Matlab. Now I am trying to calculate mass weighted average temperature of a volume and I have used this Matlab command

iFluentTuiInterpreter.doMenuCommandToString('repor t volume-integrals mass-avg (channel) temperature n')

This code can measure the temperature and can print the value in Matlab command window. But now I want to save this value in another variable so that I can use this number in post-processing. I am trying to use this command

iFluentTuiInterpreter.doMenuCommandToString('defin e variable pick report volume-integrals mass-avg (channel) temperature n')

but its not working. Can someone please help?

Thank you.
ATIKADAR is offline   Reply With Quote

Old   October 15, 2019, 00:05
Default
  #2
Senior Member
 
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 374
Rep Power: 9
Светлана is on a distinguished road
Would you like to set fluent to write this value to a file, and then read it in matlab? Or this would be bad for your case.
Светлана is offline   Reply With Quote

Old   October 16, 2019, 17:03
Default
  #3
New Member
 
Amitav tikadar
Join Date: Jul 2017
Location: Atlanta
Posts: 6
Rep Power: 5
ATIKADAR is on a distinguished road
Quote:
Originally Posted by Светлана View Post
Would you like to set fluent to write this value to a file, and then read it in matlab? Or this would be bad for your case.
I am trying to directly read and store this value in Matlab.
Светлана likes this.
ATIKADAR is offline   Reply With Quote

Old   October 16, 2019, 18:52
Default
  #4
Senior Member
 
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 374
Rep Power: 9
Светлана is on a distinguished road
If you tried to do this through an external file, would it work at all, or would it create issues with the timing?
Светлана is offline   Reply With Quote

Old   October 16, 2019, 22:35
Default
  #5
New Member
 
Amitav tikadar
Join Date: Jul 2017
Location: Atlanta
Posts: 6
Rep Power: 5
ATIKADAR is on a distinguished road
Quote:
Originally Posted by Светлана View Post
If you tried to do this through an external file, would it work at all, or would it create issues with the timing?
I think external file would also work but since I am trying to combine few other software, it might slowed down the simulation. Anyway I already solved the issue. My code is something like this-
x=iFluentTuiInterpreter.doMenuCommandToString('rep or t volume-integrals mass-avg (channel) temperature n'); %it will save temperature as a string called x
y=char(x); % convert x into a character
....
Then I split the character and finally convert the appropriate character into a number.

Thank you.
ATIKADAR is offline   Reply With Quote

Reply

Tags
fluent, matlab, matlab coding

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
looking for a smart interface matlab fluent chary FLUENT 22 July 30, 2020 08:14
linking matlab and fluent Nair FLUENT 23 January 12, 2020 18:55
How To Make MATLAB Apps For Fluent behest FLUENT 0 March 3, 2014 07:00
Creating UDF file in MATLAB for Fluent ppa381 Fluent UDF and Scheme Programming 1 October 10, 2013 09:27
Matlab for UDF's in Fluent tejasvikrishna FLUENT 1 September 9, 2010 07:28


All times are GMT -4. The time now is 15:43.