-
-
October 17, 2018 at 4:18 pm
vwiegmann
SubscriberHi everyone,
I intend to rotate my model around the origin with a radius of 25 mm, while rotating the model around its center so that it always faces the same way. The UDF that I have (see below) works well for round models, but I have trouble generating the same motion with my square model (model rotates around its center, but only travels along the x-axis).
Do any of you know why this could be the case?
I use ANSYS Fluent; after compiling the UDF, I select it under mesh motion in the Cell Zone Boundaries tab.
Any help is greatly appreciated!!
-
October 18, 2018 at 10:26 am
Rob
Ansys EmployeeCan you check the round model was working correctly? The shape shouldn't have an effect so I wonder if you're just not seeing the issue in the earlier test.
As staff we can't get too involved, so we're reliant on the community to debug cases and code.
-
October 21, 2018 at 11:36 am
vwiegmann
SubscriberThank you very much for your help and time. I have tried it with the round version, which worked well (cylinder rotates around the origin). The same code with a square well results in above motion. This would suggest a problem with the model. I have since tried two things:
1) The distance between the center of the model and the origin is equal to the orbital diameter of the rotation: model rotates around its center, but only travels along the x-axis.
2) Center of the model lies on the origin: model rotates around its center, but only travels along the y-axis.
Not sure what to make of this at the moment. Any input is greatly appreciated!
-
October 22, 2018 at 6:09 am
Keyur Kanade
Ansys EmployeeHello,
As rwoolhou, as ANSYS employee we can not download attachments and can not debug cases and code.
Can you please insert some images with more description.
Thanks!
Regards,
Keyur
-
October 22, 2018 at 8:43 am
vwiegmann
SubscriberHey Keyur,
Here are some configurations that I have tested with below UDF:
This is the footprint of the model. It is supposed to rotate around the origin but only rotates around itself while moving along the x-axis. When changing the 'rdar' to '0' in the UDF, the rotation around the origin will be accurate, but the rotation around the centre of the model is missing.
Only rotates around itself while moving along the y-axis.
UDF:
#include "udf.h"
#define PI 3.14592654
DEFINE_ZONE_MOTION(rotation, omega, axis, origin, velocity, time, dtime)
{
real theta0, theta1, omegac, omegar, rdar, ox, oy;
omegar = -20.94;
omegac = -omegar;
theta0 = PI;
theta1 = omegac*(time+dtime);
*omega = omegar;
rdar = 0.0125;
ox = rdar*cos(theta0+theta1);
oy = rdar*sin(theta0+theta1);
origin [0] = ox;
origin [1] = oy;
origin[2] = (0,0);
} -
October 22, 2018 at 9:03 am
Keyur Kanade
Ansys EmployeePlease use DEFINE_CG_MOTION.
You can find its example in help.
Regards,
Keyur
-
October 23, 2018 at 1:24 pm
vwiegmann
SubscriberThank you very much Keyur. If I understand correctly, though, DEFINE_CG_MOTION would only let me rotate the model around the origin. What I intend to do is rotate the model around the origin while at the same time rotating it around its center, so that the square always faces the same direction during the rotation. Is that possible with DEFINE_CG_MOTION?
-
February 2, 2020 at 8:11 am
Antoni
SubscriberHi vwiegmann
I have the same problem here, have you found the answer?
Would someone please answer this question?
-
February 4, 2020 at 2:19 pm
Rob
Ansys EmployeeCheck the moving mesh functions, I think with DEFINE_CG_MOTION you have a rotational & translational section. Note, for complex motion you may need to use multiple steps to the maths, ie rotate in xy and then in yz etc.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Difference between K-epsilon and K-omega Turbulence Model
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error in cfd post
-
2726
-
2146
-
1357
-
1150
-
462
© 2023 Copyright ANSYS, Inc. All rights reserved.