Turbomachinery model: frozen rotor or full transient?

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Hello Yvan,

I think I may found another bug in the turbomachinery model. Could you please help to confirm?

Following your last suggestion, I tried "setting as a transient turbomachinery case, with only a rotor". I found in RANS it's ok, but in LES, it doesn't work. The rotating boundary condition can't be set on the wall in LES.

I use a mesh with very small yplus, so the velocity on the wall should be very close to (Ω*r). In RANS, it's very close; but in LES, it's far from (Ω*r). This can explain the incorrect velocity magnitudes in my previous cases. I suppose this is a bug. The mesh and xml for test are attached.

Could you please, by any chance, check this on your side? I really need this because I have to run LES in a rotating frame. I appreciate all your help.

Many thanks,
Ruonan
Attachments
setup_les.xml
(9.33 KiB) Downloaded 94 times
Bohn_1995_configB_quasi3D_test.cgns
(3.2 MiB) Downloaded 92 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery model: frozen rotor or full transient?

Post by Yvan Fournier »

Hello,

I asked a colleague who knows this part better to check on this thread, but he might be busy... As far as I know, the transient rotor model is not compatible with LES, for time-stepping method reasons (though it could be compatible with the non-default implicit double Euler option). So it is quite possible that some terms are missing for rotation.

I'm not sure how much work is needed to make it compatible (and with any luck, I might be out of date ant it may be possible).

I'll check again.

Best regards,,

Yvan
BLM
Posts: 11
Joined: Thu Oct 11, 2012 9:14 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by BLM »

Dear Ruonan,

Yvan told me about your case and I run the first one (RANS in the relative frame of reference).

I think that if you have only a Coriolis source term (in the IHM or in cs_user_parameters.c), together with walls and symmetry, it is normal that the solution is zero (relative) velocity everywhere in the domain. It is only fluid at rest in a rotating cavity. On the other hand, if you look at the Absolute_velocity, you see the expected solid body rotation solution.

Is it this flow that you want to simulate ?

Concerning LES, I think you should stay in the relative frame of reference. There is no need to rotate actually the mesh if the whole is rotating in the same way. But actually I think that you should obtain the same solution as in RANS, that is just fluid at rest in a rotating cavity, with almost zero relative velocity.

Let me know if I miss something.

Best regards,
Benoît
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Hello Benoît and Yvan,

Thank you very much! I really appreciate the help from you both.

I now can understand the icorio subroutine, I can see the rotating frame is working. Please let me explain my object and problem further:

What I want to simulate is Rayleigh-Benard convection, but it's not in gravity field, it's in centrifugal field. The model is the previous-mentioned rotating cavity, the hub is cold, the shroud is hot. Then with the temperature gradient (radial inwards) and centrifugal force (radial outwards), there will be buoyant flow inside the cavity. The flow is complex, both radial outflow and inflow should occur in the cavity. In one word, it's a buoyancy case, but centrifugal force replaces gravity. It's a common flow in turbomachinery.

To simulate this kind of flow, I need
(1) a centrifugal term in the momentum equation. This is why I need a rotating frame. As you said, as I added a Coriolis source term, I think I have the centrifugal term as well.
(2) In the centrifugal term, I need to make density vary with temperature. I use cs_user_physical_properties.f90 that has been verified in the heated square cavity tutorial case.

But the problem is, using all the methods above, I still can't get a correct flow. The flow is still totally solid body rotation. It seems the buoyancy effect didn't come in.

Could you please kindly help me to check where is wrong? The mesh is the same as in my last reply, the xml and vary density subroutine are attached. I also attached a reference, showing what the flow should be like. Thank you very much!

Best regards,
Ruonan
Attachments
setup.xml
(10.21 KiB) Downloaded 82 times
cs_user_physical_properties.f90
(14.66 KiB) Downloaded 89 times
Gao, Pitz, Chew_2020_International Journal of Heat and Mass Transfer_Numerical investigation of buoyancy-induced flow in a sealed rapidl.pdf
(1.55 MiB) Downloaded 96 times
BLM
Posts: 11
Joined: Thu Oct 11, 2012 9:14 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by BLM »

Dear Ruonan,

Thank you for the paper. I understand the flow that you want to simulate.

1) Concerning the centrifugal term, you are right, when you specify an angular velocity for your domain, the centrifugal term is taken into account as well as the Coriolis source term. However, in same way as it is explain in the appendix A.1 of the paper (equation 10 and 11), the centrifugal source term is not explicitly add in the momentum equation. Instead of this, it is incorporated to the pressure gradient term. The actual pressure (incorporating the centrifugal potential) is called "absolute pressure" in the post-processing while the "true" pressure in the rotating frame is called "relative pressure" is CS.

2) Concerning your problem with zero flow despite of your cs_user_physical properties.f90, I haven't check in details but for now I don't understand why there isn't any flow with this data setting. The fact that the centrifugal term is not explicitly taken into account as a source term is probably responsible (at least partly). So I think you could rather take into account the buoyancy due to the centrifugal force by introducing explicitly the term in the momentum equation, as it it done in your paper (as described in appendix A.2, equation 16). I have try such a data setting (using cs_user_source_term.c routine) and I get a non-zero flow. I don't know if the flow is correct but it's a beginning.

Note that, if you take into account the centrifugal buoyency by adding this source term, the effect of buoyency on TKE will not be taken into account. For LES with Smagorinsky, it is not a problem but for RANS, you should add the term in the RHS of TKE equation (a basic example is given in EXAMPLES/cs_user_source_terms-turbulence.c).

Thank you for your feedback concerning centrifugal buoyency, we will analyse further this problem as soon as possible.

Best regards,
Benoît
Attachments
run_solver.log
(7.92 MiB) Downloaded 79 times
setup.xml
(10.4 KiB) Downloaded 90 times
cs_user_source_terms-momentum.c
(5.08 KiB) Downloaded 91 times
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Dear Benoît,

Thank you very much for your codes. It's very helpful.

Using your source term subroutine, I did a test case that is described in the paper in my previous post. I compared Code_Saturne result with other solvers' results, which is good. The result, mesh and setup file are attached. Hope it is interesting for centrifugal buoyant flows.

Best regards,
Ruonan
Attachments
setup.xml
(9.87 KiB) Downloaded 77 times
Bohn_1995_configB_2D_Ra1E7.cgns
(9.49 MiB) Downloaded 75 times
Centrifugal buoyancy test case in closed cavity Ra1E7.pdf
(449.14 KiB) Downloaded 73 times
Last edited by Ruonan on Tue Jan 11, 2022 11:36 pm, edited 2 times in total.
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Dear Benoît,

Could you please help me to confirm another question?

When I did the test case, I made a small change to your source term subroutine. I changed it from the Boussinesq approximation to ideal gas law. I defined the density as P/(R*T) in another subroutine, and call the density in the source term subroutine. The subroutines are attached. But I wonder which pressure value should I use here?

As you said, when I run in a rotating frame, there are three pressure values in the result: pressure, total pressure and absolute pressure. Now I'm using the total pressure for calculating density.

In this simple case, these three pressure values won't have much difference. But in other cases the difference may be large, so I want to make it correct. Thank you!

Best regards,
Ruonan
Attachments
cs_user_source_terms-momentum.c
(5.09 KiB) Downloaded 74 times
cs_user_physical_properties.f90
(5.67 KiB) Downloaded 75 times
Post Reply