|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Camilo Costa
Join Date: Jun 2009
Posts: 34
Rep Power: 17 ![]() |
Dear members
Is possible use MATLAB together with ANSYS-CFX? More specifically, is possible create a user routine ou user function in MATLAB and read this routine or function in ANSYS-CFX? I canīt believe that the only way to insert a aditional function in CFX is through FORTRAN! Thx for all!! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 19 ![]() |
short answer NO you cant
this is because 1 the solver is written in FORTRAN 2 you need the FORTRAN compiler to write your script and create the program in the low level programing language( i think its assembly but might be wrong)
__________________
Top 4 tips 1. Knowledge is everything and Ignorance is dangerous. 2. Understand your limitations and try to eliminate them. 3. Get yerself a bike and hoon the chuffer. You will soon learn why dogs like to hang their heads out the car window. 4. Please before asking any questions on how to run simulations in CFX, go though all the tutorials |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Camilo Costa
Join Date: Jun 2009
Posts: 34
Rep Power: 17 ![]() |
Thx!! for your objective reply!
I will try to create a user function by FORTRAN. But I am new in this program language. Can you or someone help me to find many examples for study how to implement a new user routine by FORTRAN in CFX. Is very dificult to understood the explanation about user FORTRAN in CFX help. THX!! |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 19 ![]() |
why would you want to create a user function in fortran? what you want to archive
![]()
__________________
Top 4 tips 1. Knowledge is everything and Ignorance is dangerous. 2. Understand your limitations and try to eliminate them. 3. Get yerself a bike and hoon the chuffer. You will soon learn why dogs like to hang their heads out the car window. 4. Please before asking any questions on how to run simulations in CFX, go though all the tutorials |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Camilo Costa
Join Date: Jun 2009
Posts: 34
Rep Power: 17 ![]() |
I study heat exchangers with the tow-phase flow thermosiphons tecnology!
The heat transfer between evaporator and condenser is modelate by a analitical equation (in MATLAB) that nowadays I change the values manualy every 200 steps. I want to automate through a user routine!! thx!! |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,943
Rep Power: 145 ![]() ![]() ![]() ![]() |
Hi,
CFX has the expression language CEL so most of the time fortran is not required to do functions. Glenn Horrocks |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Camilo Costa
Join Date: Jun 2009
Posts: 34
Rep Power: 17 ![]() |
Thx! but CEL is not sufficient for me!! the work fluid that contais inside of the tubes (heat pipes) have physical characteristics that change whit temperature and pressure that are modelate by a analyticall expression.
Why is so difficult to have access the one book our pdf that explain step by step how to implement a user function in CFX? Thx!! |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 19 ![]() |
![]() you can easily model real fluids in cfx, you just need to setup the appropriate materials.
__________________
Top 4 tips 1. Knowledge is everything and Ignorance is dangerous. 2. Understand your limitations and try to eliminate them. 3. Get yerself a bike and hoon the chuffer. You will soon learn why dogs like to hang their heads out the car window. 4. Please before asking any questions on how to run simulations in CFX, go though all the tutorials |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Jack
Join Date: Mar 2009
Posts: 106
Rep Power: 17 ![]() |
I think itīs possible, you can use FORTRAN, C or MATLAB.
|
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 19 ![]() |
![]()
__________________
Top 4 tips 1. Knowledge is everything and Ignorance is dangerous. 2. Understand your limitations and try to eliminate them. 3. Get yerself a bike and hoon the chuffer. You will soon learn why dogs like to hang their heads out the car window. 4. Please before asking any questions on how to run simulations in CFX, go though all the tutorials |
|
![]() |
![]() |
![]() |
![]() |
#11 |
New Member
Martijn
Join Date: Mar 2009
Posts: 14
Rep Power: 18 ![]() |
Well you could use perl to analyse the output of a simulation whilst adapting the CCL for the next (short) simulation ;-) .
|
|
![]() |
![]() |
![]() |
![]() |
#12 | |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 19 ![]() |
Quote:
![]() ![]() will keep that in mind ![]()
__________________
Top 4 tips 1. Knowledge is everything and Ignorance is dangerous. 2. Understand your limitations and try to eliminate them. 3. Get yerself a bike and hoon the chuffer. You will soon learn why dogs like to hang their heads out the car window. 4. Please before asking any questions on how to run simulations in CFX, go though all the tutorials |
||
![]() |
![]() |
![]() |
![]() |
#13 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,943
Rep Power: 145 ![]() ![]() ![]() ![]() |
Hi,
Just repeating chleanth's comment - most functions like this can be done using CEL with no need for fortran. Can you explain what in your function cannot be done in CEL? How to implement fortran in CFX is described in the documentation. For simple stuff like just returning a CEL variable it is not too bad (I think you use a junction box for that. But I have never had to use fortran in CFX since I was using CFX4 in 1999. Ever since CFX5 was developed I have managed to do everything in CEL. Glenn Horrocks |
|
![]() |
![]() |
![]() |
![]() |
#14 |
New Member
hun
Join Date: May 2009
Posts: 27
Rep Power: 18 ![]() |
Hi,
I got the same problem. for example. i have to measure velocity in pipe. it is transient simulation, and at different timestep i got different velocity values at the output and i can see that value in CFX post. if i want to integrate that value from 0 to T. do i have to write the function of CEL at the CFX-Pre or CFX Post?. how to access with different timestep? because as same as camilo_costa i might have to export 200 steps to data matrix end then do all the calculation in Matlab. thanks, hung |
|
![]() |
![]() |
![]() |
![]() |
#15 |
New Member
rajesh natarajan
Join Date: Aug 2013
Posts: 3
Rep Power: 13 ![]() |
hello friends
i am going to optimize rotor 37,for that is there any coupling tools are available I have a MATLAB optimization code and the objective function will require results from ANSYS CFX. The Setup is like this: Ansys Turbogrid - CFX Pre - Solver - Post - Result to MATLAB - MATLAB create new geometry - Start new cycle again starting with turbogrid. The ANSYS Programme will be in Ansys workbench. I dont know how to link it with MATLAB and vice versa thanks in advance |
|
![]() |
![]() |
![]() |
![]() |
#16 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,943
Rep Power: 145 ![]() ![]() ![]() ![]() |
The look you describe sounds simple to implement as a batch (windows) or shell ([L]unix) script.
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pros and Cons for CFX, CFdesign, COMSOL | Val | Main CFD Forum | 3 | June 10, 2011 02:20 |
Matlab & CFX | Meri | CFX | 1 | March 16, 2006 00:39 |
CFX 7.1 and Matlab | Juan G. | CFX | 1 | March 5, 2006 21:37 |
CFX & MatLab | Walid | CFX | 4 | March 8, 2005 16:30 |
How to make data file for matlab from CFX? | cfxbeginner | CFX | 4 | October 19, 2002 07:56 |