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

Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Dear developers,

Could you please help me with this question?

I use the latest master version with GUI. My model is a closed rotating cavity, shown in the figure below. I want to put the entire domain in a rotating reference frame. So for the "Turbomachinery model", should I use "Frozen rotor model" or "Full transient simulation"? For RNS and LES, should I choose the same or different "Turbomachinery model"?

(
I learned frozen rotor or full transient are for interface behaviour between rotating domain and stationary domain. But in my domain there is no interface, so I don't know which to choose.
And the strange thing is, for LES, when I use "full transient", the velocity result is not reasonable; but when I use "frozen rotor", the velocity result is ok. So I'm confusing.
)

Many thanks,
Ruonan
Attachments
Rotating annulus.PNG
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery model: frozen rotor or full transient?

Post by Yvan Fournier »

Hello,

For a rotating frame of reference, you do not need the turbomachinery option. Just search for "icorio" for user-defined functions, or using the GUI: Calculation features/body forces/Coriolis source terms.

Regards,

Yvan
Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Hello Yvan,

Thank you very much, I really appreciate your help. I tried this method but without success. Could you guide me where is wrong please?

Now my model is rotating along x axis, the rotating speed is 10 rad/s. I tried in GUI, set omega_x=10.0 s^-1. I also tried to set it in the subroutine. But the case always stop at the first iteration. The error is shown below but I didn't find any obvious indication. The xml, log and subroutine are attached.

Code: Select all

SIGSEGV signal (forbidden memory area access) intercepted!

Call stack:
   1: 0x7ff933dff09d <predvv_+0x5d96>                 (libsaturne-7.1.so)
   2: 0x7ff933de9bbf <navstv_+0x11b7>                 (libsaturne-7.1.so)
   3: 0x7ff933e0dc40 <tridim_+0x34cd>                 (libsaturne-7.1.so)
   4: 0x7ff933c7f058 <caltri_+0x1d0c>                 (libsaturne-7.1.so)
   5: 0x7ff934d6a95b <main+0x70b>                     (libcs_solver-7.1.so)
   6: 0x7ff9337f2b97 <__libc_start_main+0xe7>         (libc.so.6)
   7: 0x556b2dcd4a5a <_start+0x2a>                    (cs_solver)
End of stack
Many thanks,
Ruonan
Attachments
setup.xml
(10.21 KiB) Downloaded 98 times
run_solver.log
(22.13 KiB) Downloaded 94 times
cs_user_parameters-rotation.c
(3.84 KiB) Downloaded 104 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery model: frozen rotor or full transient?

Post by Yvan Fournier »

Hello,

Do you have a small mesh for this case that I could use to try to reproduce this issue ?

Best regards,

Yvan
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 appreciate your help! The mesh is small and I attached it here. I use the master version from GitHub.

It seems a simple case so I really want to know why is this error.

Best regards,
Ruonan
Attachments
Bohn_1995_configB_2D_Ra1E7.cgns
(9.49 MiB) Downloaded 99 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery model: frozen rotor or full transient?

Post by Yvan Fournier »

Hello,

That was a bug. I just fixed it in the master and v7.0 branches, and synced with GitHub.

Thanks for the report and test case.

Best regards,

Yvan
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 can't thank you enough. Your bug fixing helped me a lot. Now the "icorio" subroutine can work with no error. Another question please:

Now I want the annuli to rotate along x axis with 8.159 rad/s, and I want the whole domain to be solved in a rotating reference frame. I set omega_x in the subroutine, as shown below. But I found the annuli was not rotating, no velocity in the annuli at all. I still need to set the rotating speed as boundary conditions on the wall. Is it correct that I need to define both rotation vector and wall rotating boundary conditions?

Best regards,
Ruonan

Code: Select all

void
cs_user_parameters(cs_domain_t *domain)
{
  CS_UNUSED(domain);

  /* Rotation of the reference frame (omega in rad/s)
   *
   * If the rotation is not nul, then
   *   icorio = 0: rotation is taken into account by rotating the mesh
   *               (simulation in the absolute frame)
   *            = 1: rotation is taken into account by Coriolis source terms
   *                (simulation in the relative frame) */

  /*! [param_rotation] */
  cs_physical_constants_t *p_constants = cs_get_glob_physical_constants();
  p_constants->icorio = 1;

  cs_rotation_define(8.159, 0., 0.,   /* rotation vector */
                     0., 0., 0.);  /* invariant point */
  /*! [param_rotation] */
}

Ruonan
Posts: 136
Joined: Mon Dec 14, 2020 11:38 am

Re: Turbomachinery model: frozen rotor or full transient?

Post by Ruonan »

Hello Yvan,

May I confirm if the plus or minus of omega component in the "icorio" follows the right-hand law? For example, if I look along the x axis and the model is rotating anticlockwise, should I set omega_x=-Ω rad/s?

Best regards,
Ruonan
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Turbomachinery model: frozen rotor or full transient?

Post by Yvan Fournier »

Hello,

Yes, the rotation velocity definition should follow the right hand law.

Regarding the boundary conditions, I am not sure. Using Coriolis source terms means the whole domain is in a rotating frame of reference. The computed and post-processed velocity is defined relative to that frame of reference. So if the boundaries rotate at the same speed as that frame of reference (i.e. are fixed in that frame of reference), you should not need to do anything special.

It seems we do not have any standard test case exercising the "icorio" options. The case that did use this function was a code/code coupling turbomachinery case (the rotor used icorio, the stator did not), but since this was improved so that this coupling is now handled in one code instance, it is rarely used. So I hope there is no additional bug. In the code itself, the code paths for "icorio = 1" and "iturbo = 2" should be very similar, as the use the same mechanisms.

Thinking of this, it might be interesting to check if results are similar setting the case as a transient turbomachinery case, with only a rotor.

Best regards,

Yvan
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 really appreciate your time and help! Please find some idea based on my tests:

1. When I define rotation vector either in GUI or subroutine, the case can run with no error, thanks to your debugging. When I post-process the result, I can find two additional variables, "Abs_Pressure" and "Abs_Velocity", indicating the case has been set in the rotating frame. But, the velocity values are all 0 in the domain, means the model is stationary, not rotating. Like you, I also think this is strange. I suppose this is an additional bug?

2. Bacause the velocity values are all 0 in the domain, I tried to set wall rotating speed in the subroutine. Then the velocity values appeared in the domain. But the results are wrong, not what I expected. So I think this is not the correct setting method. As you said, I "should not need to do anything special".

Please do you think this bug is easy to be solved? It will be very good if I set icorio=1 and I can get the model rotating, then I think the result may be correct.

(Because I also tried the full transient turbomachinery module, as you suggest. But I always get velocity values much higher than they should be. I don't know whether it's because I run LES directly without restarting from RANS, or I use a 2D mesh. Now I still can't get this "simple" test case work.)

Best regards,
Ruonan
Post Reply