looking for a smart interface matlab fluent
I just started to use fluent. To encounter a diffusion/permeation problem an udf has been written. Now I would like to know wether it is possible to use an interface with which data can be exported to be used in matlab. once these are optimised they should be able to be reimported in fluent for the next simulation. Is there any possiblity of a matlab fluent interchanging interface?
I see that your question stayed unanswered for years...
Just in case you are still interested you can use Fluent aaS (as a Server). It is available on Fluent versions starting Release 14.
See my blog on http://www.ansys-blog.com/tag/matlab/ for more information and a sample of Matlab coding.
I am interested in the data exchange between fluent and matlab. I have got the pressure data from fluent and write a code to calculate it in matlab. Now my problem is how to import the data in matlab to fluent??
Thank you so much
I will need more information to help but I will just make some assumptions, for simplicity of the blog post:
Assumption 1: Matlab is running on a Windows 64 bits machine
Assumption 2: Fluent is running on the same machine or on a network accessible remote machine
Assumption 3: Fluent version is R14.5
Assumption 4: You have a resonable understanding of Fluent UDFs, rpvars or parameters
Assumption 5: you have administrative rights on the Matlab machine
Assumption 6: Fluent client (no license required) is installed on the Matlab machine
Let me know if your specific case is different.
Step1: Modify your Fluent case such that all entities that you want in Matlab are mapped to Fluent rpvars or Fluent parameters
- rpvars are requiring a little bit more advanced Fluent skills, but they have the benefit that they can be used on both a UDF running on the Fluent machine and Matlab running on the Matlab machine
- parameters are easier to use and more stable. They are accesible in Fluent GUI and Matlab but not in the UDF (unless you map one to an rpvar)
Step2: start Fluent on Fluent machine in server mode. Do not start a journal (-i option) because you will do the journaling from Matlab. To start fluent in server mode you will have to add in the command line the -aas option.
For example instead of running "fluent 3ddp" you will execute "fluent 3ddp -aas".
Step3: collect the Fluent session key from the Fluent machine and transfer it to the Matlab machine. the Fluent session key is stored in a file called aaS_FluentId.txt
Step4: make sure that the Fluent client is registered on the Matlab machine
You will have to run a command like the following:
regsvr32 "C:/Program Files/ANSYS Inc/v145/fluent/fluent14.5.0/addons/corba/win64/COMCoFluentUnit.dll"
Step6:Connect Matlab to Fluent. You will have to run a Matlab script like the following:
fluent = actxserver(‘ANSYS.CoFluentUnit.1′);
Step7: Execute you Matlab-Fluent program.
You have two Matlab objects (fluent and tui) that you can use drive Fluent.
If you want to do Fluent journaling from matlab, you can use
this will have Fluent execute the tuiCommand with no return
this will have Fluent execute the tuiCommand and return the output
tuiCommand is pretty much any valid command that you put in a Fluent journal file
tui.DoMenuCommand('solve iterate 10')
report=tui.DoMenuCommandToString('report summary no')
If you want to set or get the value of a rpvar, you can use
this will have Fluent returning the value of the rpvar
this will have Fluent set the value of a rpvar
If you want to set or get the value of a parameter, you can use
this will have Fluent returning the value of the parameter
this will have Fluent set the value of a parameter
Of course you will need to have an output parameter called 'avgtemperature' and an input parameter called 'massflowrate' previously configured in the Fluent case.
Please let me know if this post was helpful to you. If you give me your e-mail, I will contact you.
I tried my best to have the code examples syntactically correct, but there might be some typos. You can refer to Fluent documentation or you can mention the issue to me and I will figure it out.
How about Linux?
does this work on a Linux-mashine as well?
Yes, this works on Linux as well. The Matlab code and the set-up are slightly different though and problem specific.
I will contact you in private since this might require specific information about your environment.
Then I will try to provide a generic example of Matlab to Fluent cosimulation on a Linux environment on this blog.
Progress in using Fluent as a Server on Linux?
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.
I have done all instruction but when Matlab wants to run tui.DoMenuCommand I have an error.
Invoke Error, Dispatch Exception: Unspecified error
Error in second (line 9)
I don't know what should I do?
Do you have any idea in writing a subroutine in connecting TRNSYS and Fluent for data exchange
Thanks in advance
I saw you posted this long time ago. If you solved this problem, could you please share some useful materials about how to connect TRNSYS and fluent? Or could you provide the procedures for realizing this coupling? Thanks in advance.
Hello Sorin and other CFD people,
Thank you for the nice guidelines provided for the Fluent-Matlab coupling.
Is it possible to change the material properties of a combustible particle remotely from Matlab? For example a devolatilization model called the Two-Competing-Rates, which I'd like to adjust with matlab, has multiple input values that have to be given by the user.
The figure below the shows the panel in Fluent. The values have to be directly provided by the user in the GUI so is there any way to remotely change these in Matlab?
my email id is firstname.lastname@example.org..I need a help regarding linking between fluent and matlab. It'll be very helpful if u can do that.
Thanks is advance
|All times are GMT -4. The time now is 21:18.|