|
[Sponsors] |
Data Transferring and initialization between MATHLAB and FLUENT |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 8, 2018, 04:39 |
Data Transferring and initialization between MATHLAB and FLUENT
|
#1 |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 |
Hello all.
I need to initialize and transfer some data between MATHLAB and FLUENT in a loop state according to the attached algorithm (image). In the every time step, a re-initialization is accomplished by MATHLAB and results are fed to the FLUENT as input. Then, after the flow simulations in FLUENT section, the fluid flow data and some parameters are exported to the MATHLAB section in the next time step as inputs for MATHLAB. However, I don't know whether it is feasible or not. Does everyone know how to call and transfer data between these two software? Also, if everybody has access to an example/examples describing these schemes, please share it here or via private message. Thanks a lot for any attention. M.Asghari |
|
December 9, 2018, 18:27 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
Initialize means something specific in Fluent. Why are you initializing every time-step? Then there's no point in doing a transient simulation and taking time-steps.
Be specific on what it is you want to accomplish. You are saying I want matlab to do something then Fluent to do something then matlab to do something. Without knowing what that something is, no one can help you. Fluent can export many things into text files that matlab can read. For more advanced scenarios, matlab can even directly access the fluent cortex and have access to all of Fluent's runtime information... So yes it's possible. Being a high level programming language, I can imagine that yes you can code something in a format that Fluent can read. But nobody here has any clues on how to help you. The answer is yes, it's possible. But good luck finding out how! |
|
December 10, 2018, 04:13 |
|
#3 | |
Member
Peter Maroul
Join Date: May 2018
Posts: 52
Rep Power: 8 |
Quote:
|
||
December 10, 2018, 05:29 |
|
#4 |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 |
In the general text format, the command lines are presented as follows:
1- The mesh generation& the initialization in the time =0 2- A do loop command as follows: 2-1 MATLAB running (by data files in 2-2 section or initialization step ) and generating some case data 2-2 FLUENT running by case files generated into the 2-1 section (last step)& generating some data Files 3- Updating the time step: Tnew= T last+ deltaT (physical Time) 4 If unsteady simulations are enough and convergence is ok, 4-1: break do loop command and END Else if 4-2 : Returning to Section 2 This is a text version of my algorithm. However, I don't know which programming language/languages is/are used for this purpose. |
|
December 10, 2018, 11:13 |
|
#5 | ||
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
Quote:
Yes I understood that the concept that is initializing at every time-step and how stupid of an idea it was. Coincidentally, that's not what they're trying to do! Quote:
Assuming Fluent converges nicely, please elaborate on what data you'd like to transfer from Fluent to matlab. Also please elaborate on what settings matlab is giving Fluent. It can be done... Everything else can be done and can be coded in matlab. |
|||
December 10, 2018, 13:27 |
|
#6 | |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 |
Quote:
I would not ask my question if I knew the answer to my question. |
||
December 10, 2018, 13:39 |
|
#7 | |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 |
Quote:
1- Running in the batch mode. 2- saving Fluent data in a file and reading them by MATLAB. ( though it may be a little time consuming) Some useful Links are presented as follows: 1-https://www.cfd-online.com/Forums/fluent/30911-running-fluent-batch-mode-windows-os.html 2-https://www.cfd-online.com/Forums/fluent/81301-use-batch-mode-run-unsteady-case.html 3-https://www.cfd-online.com/Forums/fluent-udf/196083-fluent-journal-reading-case-data-via-loop.html 4-https://www.cfd-online.com/Forums/fluent-udf/196083-fluent-journal-reading-case-data-via-loop.html 5-https://www.cfd-online.com/Forums/fluent/71016-how-link-fluent-matlab-exchange-data.html and... . The point is, which items can be effective and useful in my task? Last edited by Asghari_M; December 10, 2018 at 19:28. |
||
December 10, 2018, 21:06 |
|
#8 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
google "fluent as server"
you may find the way, how to connect fluent with matlab. Once connectino is done matlab is able to execute TUI commands -> so you can do a lot in Fluent best regards |
|
December 12, 2018, 05:49 |
Coupling FLUENT with MATLAB
|
#9 |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 |
Thanks Sirs.
According to the attached image and google search information ,Apparently, to access TUI, it should be done by FLUENT remote console. Shouldn't it? Does anyone have tutorials for more description of coupling the FLUENT software with other programming language such as MATLAB? Should we use Pyton if we want execute MATLAB in command line by TUI in a loop state format? |
|
December 12, 2018, 06:13 |
|
#10 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
||
January 17, 2019, 12:22 |
Is it possible running Fluent 6.3.26 through Matlab 6.5?
|
#11 |
Senior Member
Mehdi Asghari
Join Date: Feb 2010
Posts: 127
Rep Power: 16 |
Hello again .
I tried running the Fluent by Matlab via following link: looking for a smart interface matlab fluent However -aas command doesn't operate effectively and correctly in the software versions. My Fluent version :6.3.26 & Matlab version : 6.5 Can anyone help me to find a practical and suitable alternative for this purpose for my software versions? Thanks a lot again. Last edited by Asghari_M; January 17, 2019 at 15:41. |
|
Tags |
iteration process, solver linking |
|
|