
[Sponsors] 
How to use a timestepdependent CEL function on the turbomachine rotational speed 

LinkBack  Thread Tools  Search this Thread  Display Modes 
November 12, 2017, 23:11 
How to use a timestepdependent CEL function on the turbomachine rotational speed

#1 
New Member
Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 9 
I'm calculating a case(unsteady analysis) using timestepdependent rotational speed. The rotational speed is given by a function of Current Time Step, which is the cfx predefined 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,847
Rep Power: 144 
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: 9 
Quote:
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? Many thanks to your kind reply! 

November 13, 2017, 21:40 

#4 
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,847
Rep Power: 144 
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: 9 
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,866
Rep Power: 33 
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: 9 
Quote:
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: 9 
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 predefined 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 timedependent 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,847
Rep Power: 144 
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. 

June 13, 2022, 07:41 

#10 
New Member
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8 
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,847
Rep Power: 144 
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 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[blockMesh] Errors during blockMesh meshing  Madeleine P. Vincent  OpenFOAM Meshing & Mesh Conversion  51  May 30, 2016 11:51 
[snappyHexMesh] How to define to right point for locationInMesh  Mirage12  OpenFOAM Meshing & Mesh Conversion  7  March 13, 2016 15:07 
What function to used for my speed variation  CF  Main CFD Forum  0  December 11, 2007 02:59 
Droplet Evaporation  Christian  Main CFD Forum  2  February 27, 2007 07:27 
(CFX POST) Rotational Speed  ARJUN  CFX  9  July 13, 2006 21:38 