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

how to run fluent from matlab without using aas toolbox?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2021, 04:12
Question how to run fluent from matlab without using aas toolbox?
  #1
New Member
 
artemis
Join Date: May 2021
Posts: 3
Rep Power: 5
artemis96 is on a distinguished road
hi everyone

I'm working on robust optimization for vascular stents design. for that I have to link matlab and fluent to each other so I can use matlab as a master and fluent as a slave. when I searched about the methods on how to do that, I figured for doing so we should download matlab AAS toolbox from ansys customer portal. but the problem is I'm a student and using student version of ansys so I do not have any access to that toolbox. so my question is how can I run ansys from matlab without using that toolbox? is there any other ways to do so?
I'd appreciate it if someone help me because I am looking for solutions for weeks and still couldn't find the answer.

thank you
artemis96 is offline   Reply With Quote

Old   June 2, 2021, 05:37
Default
  #2
New Member
 
-
Join Date: Oct 2020
Posts: 22
Rep Power: 6
Ames is on a distinguished road
Hi,

Did you see this post and the answer from Sorin?

looking for a smart interface matlab fluent
I did get this working with the student version.

Hope it helps you out!
Ames is offline   Reply With Quote

Old   June 4, 2021, 05:07
Default
  #3
New Member
 
artemis
Join Date: May 2021
Posts: 3
Rep Power: 5
artemis96 is on a distinguished road
Quote:
Originally Posted by Ames View Post
Hi,

Did you see this post and the answer from Sorin?

looking for a smart interface matlab fluent
I did get this working with the student version.

Hope it helps you out!

hi Ames,
thank you for replying to my question. sorin replied with a link that when i click on it , the homepage of ansys site opens and there is nothing else . it feels like the site sorin was refering to unfortunately has been removed. do you know where i can get the student version?
artemis96 is offline   Reply With Quote

Old   June 4, 2021, 09:05
Default
  #4
New Member
 
-
Join Date: Oct 2020
Posts: 22
Rep Power: 6
Ames is on a distinguished road
Does this link work for you?

https://www.ansys.com/academic/students/ansys-student
Ames is offline   Reply With Quote

Old   June 4, 2021, 15:12
Default
  #5
New Member
 
artemis
Join Date: May 2021
Posts: 3
Rep Power: 5
artemis96 is on a distinguished road
Quote:
Originally Posted by Ames View Post

hi,

this link goes to ansys software student version download link, how can i access the matlab aas toolbox download link there? apparently it should be installed from customer portal which is not available for student
artemis96 is offline   Reply With Quote

Old   June 4, 2021, 22:52
Default
  #6
New Member
 
Join Date: Jun 2021
Posts: 1
Rep Power: 0
jangdong is on a distinguished road
Quote:
Originally Posted by artemis96 View Post
hi,
friday night funkin slope unblocked
this link goes to ansys software student version download link, how can i access the matlab aas toolbox download link there? apparently it should be installed from customer portal which is not available for student
This is great content! I am swept away by your presentation and unique viewpoints. I agree with so much of your article. Thank you that is very helpful.
jangdong is offline   Reply With Quote

Old   June 7, 2021, 05:42
Default
  #7
New Member
 
-
Join Date: Oct 2020
Posts: 22
Rep Power: 6
Ames is on a distinguished road
Did you check the second post of Sorin? I believe you don't need to install the matlab aas toolbox for that.

Quote:
Originally Posted by Sorin View Post
Hi Wang

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"

Step5:Start Matlab
Step6:Connect Matlab to Fluent. You will have to run a Matlab script like the following:
fluent = actxserver(‘ANSYS.CoFluentUnit.1′);
tui=fluent.getSchemeControllerInstance();
fid=fopen(‘aaS_FluentId.txt’,'r’)
fluentkey=fscanf(fid,’%s’)
fclose(fid)
fluent.ConnectToServer (fluentkey)

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
tui.DoMenuCommand(tuiCommand)
this will have Fluent execute the tuiCommand with no return
tui.DoMenuCommandToString(tuiCommand)
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
Example:
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
tui.GetRpVar(rpvarName)
this will have Fluent returning the value of the rpvar
tui.SetRpVar(rpvarName,stringifiedRpVarValue)
this will have Fluent set the value of a rpvar
Example
valuePressureRelax=tui.GetRpVar('pressure/relax')
tui.GetRpVar('pressure/relax','0.5')

If you want to set or get the value of a parameter, you can use
fluent.GetOutputParameterValueByname(parameterName )
this will have Fluent returning the value of the parameter
tui.SetInputParameterValueByName(parameterName,par ameterValue)
this will have Fluent set the value of a parameter
Example
valueAvgTemperature=fluent.GetOutputParameterValue ByName('avgtemperature')
fluent.SetInputParameterValueByName('massflowrate' ,0.5)

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.

Thank you

Sorin
Ames is offline   Reply With Quote

Old   May 23, 2022, 13:16
Default
  #8
New Member
 
Hieu Pham
Join Date: May 2022
Posts: 1
Rep Power: 0
quanghieupro is on a distinguished road
FNF Mods is a most attractive game today. This is a simple game but very difficult and is currently one of the most prominent games and is still receiving love from the community. When playing it, you have to try to beat your opponent with beautiful dance moves to win your girlfriend's heart. At kbh games you are allowed to play this game right in your web browser without having to install it on your PC.
quanghieupro is offline   Reply With Quote

Reply

Tags
ansys, fluent, matlab, matlab aas toolbox, optimization


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
How to start Fluent with Matlab?? Jay Hu FLUENT 8 November 9, 2022 07:30
Automatic run Fluent Phuc_Nguyen FLUENT 1 October 19, 2017 08:31
Running UDF with Supercomputer roi247 FLUENT 4 October 15, 2015 14:41
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 10:28
Processor to run FLUENT rashid FLUENT 0 July 22, 2008 01:00


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