CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   CEL into user CEL (

potac February 13, 2012 12:46

CEL into user CEL
I have been trying to learn user CEL on simple examples. I am beginner to Fortran and I cannot figure out how to load a CEL function and predefined constants e.g. gravity into my user CEL function, if possible. Can someone give me some hints to follow, please? Thank you.

ghorrocks February 13, 2012 17:28

I think you need to do some tutorials:
1) CEL is the expression language so most mathematical functions can be done without fortran.
2) CCL is the command language which tells CFX what to do. CCL is where you set up gravity, but this is not visible to most people. Most people just set it up in CFX-Pre where you can do it through a GUI.
3) Fortran is rarely required in CFX.

I think you have these three things confused. Do the tutorials to understand them better.

potac February 14, 2012 03:38

Thanks Glenn for reply. I have got some tutorials and course slides about CEL, user CEL and CCL from our Ansys provider. I do not need to use Fortran right now. Use of CEL is enough for me. I have been just interested to get little bit of knowledge about Fortran and CFX in general.
For instance, I have tried to calculate some inlet velocity profile. Now, I am thinking about having some profile function parameters defined using CEL in CFX-Pre for easier control and called into the Fortran subroutine when starting the simulation to create the inlet profile. Also, in CFX the gravity constant is predefined. If my inlet function includes gravity term do I have to specify gravity value in the subroutine or can call it from somewhere? Thank you.

brunoc February 14, 2012 10:55

Hi potac,

As Glenn said, you most likely don't need to use Fortran on your setup. On your example, if you know the function that defines your inlet velocity profile you can just write it using CEL Expressions (CFX has a built in constant for gravity, 'g', and it also has a bunch of other constants). On the other hand if this same profile comes from data written to a file you can read it using CFX's Boundary Condition Profile ('Tools > Initialize Profile Data').

Think of it this way: UserCEL in CFX is not that straightforward because for most of the stuff you simply don't need it, as it can be modeled some other way using features from the GUI.

If you tell us exactly what you want to do maybe we can help you with it.


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