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.
Call the rotational axis and rotational velocity in user_subrutine in C
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4145
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Call the rotational axis and rotational velocity in user_subrutine in C
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
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
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.
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.
-
- Posts: 4145
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Call the rotational axis and rotational velocity in user_subrutine in C
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
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
Hi,
Got it, thanks.
Best,
Hyder.
Got it, thanks.
Best,
Hyder.