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

looking for a smart interface matlab fluent

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 6, 2017, 10:12
Default
  #21
New Member
 
Sorin Munteanu
Join Date: Apr 2013
Posts: 27
Rep Power: 14
Sorin is on a distinguished road
Hi Taes,

I will advise you to use actfluentserver instead.

Please read the blog below for more detailed information.

http://www.ansys-blog.com/how-to-mak...pps-for-ansys/

Sorin

Quote:
Originally Posted by Taes View Post
I had to use
Code:
actxserver('ANSYS.CoFluentUnit.1.1')
in Matlab with ANSYS 18.
Sorin is offline   Reply With Quote

Old   May 25, 2020, 19:15
Smile
  #22
New Member
 
Eva
Join Date: May 2020
Posts: 1
Rep Power: 0
e.bernat is on a distinguished road
Quote:
Originally Posted by Sorin View Post
Hi Taes,

I will advise you to use actfluentserver instead.

Please read the blog below for more detailed information.

http://www.ansys-blog.com/how-to-mak...pps-for-ansys/

Sorin

Hi,

I'm using now Im using AAS- to couple Matlab (2018b) and Fluent (2019R2) and use it as a Server. I have followed the steps in the official Ansys Youtube tutorial for the connection, and have read the users guide: "Fluent as a Server".

Most of functions seem to work such as: tui.doMenuCommandToString(), fluent. getNrInputParameters(); fluent.getInputParameterNameByIndex(in long lInputParameterIndex);

Nevertheless, the most important functions that I need do not work: (WRITE AND READ PARAMETERS of Fluent)



fluent.getOutputParameterValueByName(string('q_rad _thorax'))

fluent.setInputParameterValueByName(string('T_head '), 200)



I write an example of what Im coding:

%%%%%%%%%%%%%%% CODE %%%%%%%%%%%%%%%%%%

%% Basic Connection %%%% RUN THIS SECTION - Once per matlab session



orb=initialize_orb();

load_ansys_aas();

fluent=actfluentserver(orb,'aaS_FluentId.txt');

tui=fluent.getSchemeControllerInstance();

tui.doMenuCommandToString('report summary')

%tui.doMenuCommandToString('define operating-conditions gravity yes 9.8 0.0 0.0');



fluent.getOutputParameterValueByName(string('q_rad _thorax'))

fluent.setInputParameterValueByName(string('T_head '), 200)

%%%%



MATLAB OUTPUT ERRORS:



>> fluent.setInputParameterValueByName(string('T_head '),200)

Java exception occurred:

AAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0
at AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGe nericErrorHelper.java:80)
at AAS_CORBA._ICoFluentUnitStub.setInputParameterValu eByName(_ICoFluentUnitStub.java:456)



>> fluent.getOutputParameterValueByName(string('q_rad _thorax'))

Java exception occurred:

AAS_CORBA.EFluentGenericError: IDL:AAS_CORBA/EFluentGenericError:1.0
at AAS_CORBA.EFluentGenericErrorHelper.read(EFluentGe nericErrorHelper.java:80)
at AAS_CORBA._ICoFluentUnitStub.getOutputParameterVal ueByName(_ICoFluentUnitStub.java:579)



PD: I have already written in my Fluent case these parameters previously, so they exist. I have also tried writing fluent.getOutputParameterValueByName('q_rad_thorax ') and neither works. The error that I get from at FLUENT command window: unbound-variable, set-parameter-data



Thank you very much,

Any help would be really welcome.
e.bernat is offline   Reply With Quote

Old   July 30, 2020, 09:14
Default Fluent aas Matlab for Linux
  #23
New Member
 
Join Date: Jul 2020
Posts: 2
Rep Power: 0
CarlijnB6 is on a distinguished road
Quote:
Originally Posted by Dominik View Post
Hi Sorin
Did you make any progress using aas with Linux?

As obvious I couldn't find a dll in the Linux installation folder :-)).

So I think I have to compile the idl file myself, but I do not know which compiler should be used to drive Fluent-aas from Matlab.

In my System:

Matlab is running on a Linux 64 bit machine.
Fluent is running on a 64 bit network accessible remote machine.
Fluent Version is 15.0

Thanks for youre help in advance.

Dominik



Hi!

I have exactly the same problem and was wondering wether you found a way to work around this? Or is it only possible with that Matlab extension in the blog?


Kind regards,
Carlijn
CarlijnB6 is offline   Reply With Quote

Old   June 9, 2021, 14:02
Default
  #24
New Member
 
-
Join Date: Oct 2020
Posts: 22
Rep Power: 6
Ames is on a distinguished road
Quote:
Originally Posted by CarlijnB6 View Post
Hi!

I have exactly the same problem and was wondering wether you found a way to work around this? Or is it only possible with that Matlab extension in the blog?


Kind regards,
Carlijn
Hi Carlijn,

Did you figure out how to get it working on a linux OS?
Ames is offline   Reply With Quote

Old   June 18, 2021, 10:07
Default
  #25
New Member
 
Join Date: Jul 2020
Posts: 2
Rep Power: 0
CarlijnB6 is on a distinguished road
Quote:
Originally Posted by Ames View Post
Hi Carlijn,

Did you figure out how to get it working on a linux OS?
Yes! I figured it out. What I eventually did, was using the ANSYS_aas MATLAB Toolbox which is provided by Ansys. In order to use this I had to use an older version (the 2015 version) of MATLAB. After installing it once I could operate Fluent within Matlab on my linux computer with the following lines:

% launch Fluent
pathToFluent = ' "/share/apps/ansys192/v192/fluent/bin/fluent"';
args = ' -v2ddp -g -aas -i JournalModel.jou &';
[s, out] = system([pathToFluent args]);

% wait for fluent aas file to be generated and the journal file to be read
pause(90)

% do the actual coupling
orb=initialize_orb();
load_ansys_aas;
fluent=actfluentserver(orb,'aaS_FluentId.txt');
tui=fluent.getSchemeControllerInstance();

tuiCommand=['/file/interpolate/write-data "',SigmaPath,'/InterpolationOutputFile.ip" n y-velocity x-velocity pressure () n'];
tui.doMenuCommand(tuiCommand);

Hope this helps you!

ps. Sorry for my late response, the message ended up in my junk mail box, so I hadn't seen your question
Ames likes this.
CarlijnB6 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
Ansys 12.1 - Create Rotor/Stator Interface for Fluent opm ANSYS Meshing & Geometry 21 May 23, 2016 09:29
Interface boundary, Fluent natantyt FLUENT 2 October 18, 2011 08:46
Fluent & matlab Fabio FLUENT 5 August 24, 2009 14:16
interface reconstruction algorithm in Fluent VOF > daniel Main CFD Forum 0 May 4, 2006 04:25
Call Fluent from Visual Basic 6 interface AbuKhawlah FLUENT 0 June 5, 2005 15:53


All times are GMT -4. The time now is 11:02.