# How to use a timestep-dependent CEL function on the turbomachine rotational speed

 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 12, 2017, 23:11 How to use a timestep-dependent CEL function on the turbomachine rotational speed #1 New Member   Zeng Join Date: Jul 2017 Location: London, UK Posts: 16 Rep Power: 8 I'm calculating a case(unsteady analysis) using timestep-dependent rotational speed. The rotational speed is given by a function of Current Time Step, which is the cfx pre-defined expression, and other parameters like massflow and pressure. The error information is as follows: Error processing expression 'Angular Velocity' The expression is invalid because: Current Time Step is not available for use in this term Pressure is not available for use in this term Temperature is not available for use in this term Error processing expression: Angular velocity = nextRPM *nextRPM is a CEL expression which calculate the next time step rotational speed using the CEL fortran function mentioned above. Last edited by Soll; November 12, 2017 at 23:14. Reason: typos

 November 13, 2017, 18:18 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,641 Rep Power: 142 CFX cannot handle variable rotational speed. It introduces extra terms into the equations which are not modelled. If you want a full rotation model you need to use moving mesh (on a stationary domain). This is much slower, but will include all the effects due to rotational acceleration.

November 13, 2017, 21:12
#3
New Member

Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 8
Quote:
 Originally Posted by ghorrocks CFX cannot handle variable rotational speed. It introduces extra terms into the equations which are not modelled. If you want a full rotation model you need to use moving mesh (on a stationary domain). This is much slower, but will include all the effects due to rotational acceleration.

hi ghorrocks
I noticed that in CFX the Angular Velocity can be defined by a cel expression, which in any case the rotational speed can vary in some sense. I don't really understand why it can't handle variable rotational speed.

Actually I defined another rpm as a function of citem(accumulated iteration number) and no error message is showed. Do you know y?

Besides, is it feasible to do full 3D moving mesh upon the radial compressor? How about simulating variable rotational speed in FLENT?

 November 13, 2017, 21:40 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,641 Rep Power: 142 CFX cannot handle rotational velocity being a function of time or iteration. Having said that, I am aware some people have managed to make it variable. I think you need to hack the RULES file to do this. But be aware that it is missing the acceleration terms resulting from accelerating frames of reference so there is physics it will not include. So whether this acceleration terms is significant will depend on what you are modelling. Feasible to do full 3D moving mesh on a compressor? No idea, it depends on many things. You will have to determine that based on the model you want to perform and the resources you have available (and how patient you are ) I am not aware of Fluent's capabilities here. If Fluent has a rotating frame of reference model which can handle rotational accelerations that would be a strong reason to use Fluent.

November 13, 2017, 21:59
#5
New Member

Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 8
Quote:
 Originally Posted by ghorrocks But be aware that it is missing the acceleration terms resulting from accelerating frames of reference so there is physics it will not include. So whether this acceleration terms is significant will depend on what you are modelling.
In my case, the moment that act on the blade and hub by the fluid is calculated in each time step. Then I can use CEL function to calculate the rotational speed in the next time step then pass it to the cfxsolver. Can I say in transient analysis if I set the time step small enough, the result converges or approaches the real condition?

 November 13, 2017, 22:01 #6 Senior Member   Join Date: Jun 2009 Posts: 1,775 Rep Power: 31 There is some confusion here. ANSYS CFX prevents the use of variable angular velocity for a reason. You can try modifying the RULES file, and allow arbitrary expressions for Angular Velocity, BUT you must be careful of your application. For example, if you are adjusting the Angular Velocity to match certain conditions, but your simulation is still steady state (you said Current Time Step, not Time, correct? ). You should be fine since the acceleration terms are not relevant once the solution is converged. However, if your solution is transient, you must be careful and validate your model (assuming you can make it a CEL function). As far as I recall, the momentum equations behaved correctly for incompressible flows. For compressible flows, the energy equations may be incomplete and your model will be incorrect. Hope the above helps,

November 13, 2017, 22:31
#7
New Member

Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 8
Quote:
 Originally Posted by Opaque For example, if you are adjusting the Angular Velocity to match certain conditions, but your simulation is still steady state (you said Current Time Step, not Time, correct? ). You should be fine since the acceleration terms are not relevant once the solution is converged.
I was doing transient simulation. the Current Time Step is the outer loop time step, which means the real time.(am I right?) My modeling is described in my last reply. What do you think?

What do you mean by validate the model? and do you mean the cfx compressible flow solver is imperfect or my CEL function?
Many thanks!

 November 14, 2017, 02:57 #8 New Member   Zeng Join Date: Jul 2017 Location: London, UK Posts: 16 Rep Power: 8 In my case, the moment that act on the blade and hub by the fluid is calculated in each time step. Then the angular velocity of next time step can be calculated by using the moment of compressor(calculated by the cfx solver), one kind of time step or time and other pre-defined constants. I have tried several ways to achieve this as follows: 1)using time step(including ctstep, citem and other forms), and compressor moment calculated by the cfx solver in each step result: error because time step cannot be passed to the angular velocity calculation 2)using time(t) and compressor moment calculated by the cfx solver in each step result: error because only time can be used for angular velocity in transient analysis(see attached .out and .jpg filesPTC_RPM_k6e6_trial_007.zip error.JPG) 3)using time(t) and constant compressor moment no error apparently the result is not what I need Now I have questions that: 1)cfx can handle time-dependent angular velocity but no other variables calculated by the solver can be passed to the angular velocity calculation(like moment and force). why? Are there any differences in physics or in solving the equations? 2)How to modify the RULES file to bypass this problem? Does anyone have tutorials about it? In cfx document, only the file name and path is mentioned and no further information. 3)If I make the time step small enough, can I get close to the real physical condition in this way?

 November 14, 2017, 17:50 #9 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,641 Rep Power: 142 1) Let me explain in more detail. For a rotating domain with a constant angular velocity, the rotation adds two new terms to the equations, the coriolis and centripetal terms. But when the angular velocity is variable you now have angular accelerations and there are new terms introduced. Have a look at this: https://en.wikipedia.org/wiki/Rotating_reference_frame in particular the section titled "Newton's Laws in the Two Frames". It shows the centripetal and coriolis forces, but the "Euler Force" is from angular acceleration. CFX does not include this Euler force in the equations. So if your model has significant Euler forces then CFX will not be able to model it accurately. Having said that the Euler Force is quite simple - you could add this as a source term and then you could proceed in the knowledge that you are accounting for angular accelerations. You would also need to look deeper as Opaque suggests and check whether there are more complex effects on things like the energy equation, multiphase equations and so on. Doing it properly is not a straight forward thing (otherwise it would in there by default). 2) There are no tutorials on hacking the RULES file . It is a hack and you do it at your own risk. This is not supported so you are on your own. Open up the RULES file and find the definition of the variable you are interested in. 3) No, small time steps will not help. CFX does not have the Euler forces in the equations, so making the time step smaller will not help that. Adding the Euler forces as a source term is the only way of including it. PeMo and FluidViscosity like this.

 June 13, 2022, 07:41 #10 New Member   gengchen Join Date: May 2018 Posts: 14 Rep Power: 7 Have u solved the problem of the extra Euler force for modeling? Thanks!

 June 13, 2022, 07:46 #11 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,641 Rep Power: 142 No. This is not my area of work so I have not implemented it. But as I said, it does not appear to be difficult to implement as a source term if that is of interest to you. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 Tags angular velocity, cel expression, cel fortran cfx