Page 1 of 1

Call the rotational axis and rotational velocity in user_subrutine in C

Posted: Wed May 24, 2023 4:30 pm
by hyder4
Dear Developers,

I am using frozen rotor model and I want to call the rotation axis and velocity from GUI to my user subrutine in C.
what function should I use? Thanks!

Kind regards,
Hyder.

Re: Call the rotational axis and rotational velocity in user_subrutine in C

Posted: Thu May 25, 2023 6:55 pm
by Yvan Fournier
Hello,

Check the Doxygen documentation for cs_rotation.c.

When running a turbomachinery case, rotation 0 matches the stator, and each subsequent rotation id matches the rotors, in order of declaration, so if you defined a single rotor in the GUI, simply access it as rotation 1 with the functions from cs_rotation.c/h.

Best regards,

Yvan

Re: Call the rotational axis and rotational velocity in user_subrutine in C

Posted: Sun May 28, 2023 11:30 pm
by hyder4
Hello,
Got it, thank you.
May I also ask how can I call rotation velocity and axis if I am using Coriolis source term option in body force in GUI?
Best,
Hyder.

Re: Call the rotational axis and rotational velocity in user_subrutine in C

Posted: Mon May 29, 2023 12:02 am
by Yvan Fournier
Hello,

If you are using the Coriolis source term, the whole domain is in rotation, which matches rotation id 0 (in C).

The logic is then the same as for turbomachinery.

Note that I do not know if Coriolis + turbomachinery are compatible, as we do not consider compostion of rotations. I believe that would be possible with "not too complicated" adjustments, but the combination would probably provide incorrect results today.

Best regards,

Yvan

Re: Call the rotational axis and rotational velocity in user_subrutine in C

Posted: Wed May 31, 2023 3:41 pm
by hyder4
Hi,
Got it, thanks.
Best,
Hyder.