CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

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

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2017, 22:11
Default 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: 9
Soll is on a distinguished road
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 22:14. Reason: typos
Soll is offline   Reply With Quote

Old   November 13, 2017, 17:18
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,781
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   November 13, 2017, 20:12
Default
  #3
New Member
 
Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 9
Soll is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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?

Many thanks to your kind reply!
Soll is offline   Reply With Quote

Old   November 13, 2017, 20:40
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,781
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   November 13, 2017, 20:59
Default
  #5
New Member
 
Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 9
Soll is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
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?
Soll is offline   Reply With Quote

Old   November 13, 2017, 21:01
Default
  #6
Senior Member
 
Join Date: Jun 2009
Posts: 1,832
Rep Power: 33
Opaque will become famous soon enough
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,
Opaque is offline   Reply With Quote

Old   November 13, 2017, 21:31
Default
  #7
New Member
 
Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 9
Soll is on a distinguished road
Quote:
Originally Posted by Opaque View Post
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!
Soll is offline   Reply With Quote

Old   November 14, 2017, 01:57
Default
  #8
New Member
 
Zeng
Join Date: Jul 2017
Location: London, UK
Posts: 16
Rep Power: 9
Soll is on a distinguished road
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?
Soll is offline   Reply With Quote

Old   November 14, 2017, 16:50
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,781
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   June 13, 2022, 06:41
Default
  #10
New Member
 
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8
w784370882 is on a distinguished road
Have u solved the problem of the extra Euler force for modeling? Thanks!
w784370882 is offline   Reply With Quote

Old   June 13, 2022, 06:46
Default
  #11
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,781
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Reply

Tags
angular velocity, cel expression, cel fortran cfx


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 10:51
[snappyHexMesh] How to define to right point for locationInMesh Mirage12 OpenFOAM Meshing & Mesh Conversion 7 March 13, 2016 14:07
What function to used for my speed variation CF Main CFD Forum 0 December 11, 2007 01:59
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 06:27
(CFX POST) Rotational Speed ARJUN CFX 9 July 13, 2006 20:38


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