|
[Sponsors] |
June 11, 2009, 14:42 |
Cfx - matlab
|
#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!! |
|
June 11, 2009, 14:52 |
|
#2 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 18 |
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 |
|
June 11, 2009, 15:27 |
|
#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!! |
|
June 11, 2009, 18:27 |
|
#4 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 18 |
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 |
|
June 11, 2009, 19:32 |
|
#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!! |
|
June 11, 2009, 19:36 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
Hi,
CFX has the expression language CEL so most of the time fortran is not required to do functions. Glenn Horrocks |
|
June 11, 2009, 20:08 |
|
#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!! |
|
June 11, 2009, 20:19 |
|
#8 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 18 |
It always amazes me how many times people start a task the difficult way. I'm pretty confident you can model the HE without even touching fortran
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 |
|
June 13, 2009, 19:18 |
|
#9 |
Senior Member
Jack
Join Date: Mar 2009
Posts: 106
Rep Power: 16 |
I think itīs possible, you can use FORTRAN, C or MATLAB.
|
|
June 13, 2009, 21:44 |
|
#10 |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 18 |
yea ok then.. could you please enlighen us how on earth you would write a code in any other language apart fortran that would work and communicate with the CFX solver ?
__________________
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 |
|
June 14, 2009, 07:40 |
|
#11 |
New Member
Martijn
Join Date: Mar 2009
Posts: 14
Rep Power: 17 |
Well you could use perl to analyse the output of a simulation whilst adapting the CCL for the next (short) simulation ;-) .
|
|
June 14, 2009, 10:19 |
|
#12 | |
Senior Member
George
Join Date: Mar 2009
Location: Birmingham, UK
Posts: 257
Rep Power: 18 |
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 |
||
June 14, 2009, 21:40 |
|
#13 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
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 |
|
June 17, 2009, 00:39 |
|
#14 |
New Member
hun
Join Date: May 2009
Posts: 27
Rep Power: 17 |
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 |
|
October 14, 2013, 09:15 |
how to couple
|
#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 |
|
October 14, 2013, 18:18 |
|
#16 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144 |
The look you describe sounds simple to implement as a batch (windows) or shell ([L]unix) script.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pros and Cons for CFX, CFdesign, COMSOL | Val | Main CFD Forum | 3 | June 10, 2011 03:20 |
Matlab & CFX | Meri | CFX | 1 | March 16, 2006 01:39 |
CFX 7.1 and Matlab | Juan G. | CFX | 1 | March 5, 2006 22:37 |
CFX & MatLab | Walid | CFX | 4 | March 8, 2005 17:30 |
How to make data file for matlab from CFX? | cfxbeginner | CFX | 4 | October 19, 2002 08:56 |