-
-
February 10, 2023 at 2:14 am
sidjou
SubscriberHi,
I'm using an udf file to put a plate in motion. I'm interested in the position of the plate. From the collected position of the plate, i noticed that at t=0, the plate is not exactly at the known center of gravity of 6.25e-5 m and the plate has the same position (1.23e-4 m) for 2 consecutive times step (24 & 25).
How can i correct it please? I want to have the exact known center of gravity (6.25e-5 m) at t=0 and expect different position at time step 24 and 25. Below are the report of the plate position and the udf code. Thanks!
/* UDF for specifying a sinusoidal motion */
#include "udf.h"
#define amp RP_Get_Input_Parameter("amplitudeid")
#define freq RP_Get_Input_Parameter("frequencyid")
#define angular_freq 2.0*M_PI*freqDEFINE_CG_MOTION(movingplate, dt, cg_vel, cg_omega, time, dtime)
{
real disp;
disp = amp*angular_freq*cos(angular_freq*time); /*displacement speed*/cg_vel [0] = 0.0;
cg_vel [1] = 0.0;
cg_vel [2] = disp;
cg_omega [0] = 0.0;
cg_omega [1] = 0.0;
cg_omega [2] = 0.0;
} -
February 15, 2023 at 2:09 pm
Federico Alzamora Previtali
SubscriberHello,
for your first question, are you using single or double precision for your simulation? You can find out by looking at the very top of your Fluent window and looking for "dp" (double precision). If you're running on single precision, it may affect the precision of the data that you are writing to file.
Regarding your second question, is it possible that at time step 24, your velocity cg_vel[2] is exactly zero? i.e. angular_freq*time = pi/2?
I hope this helps!
Federico
-
February 15, 2023 at 2:17 pm
Federico Alzamora Previtali
Subscriber25000 RPM would yield exactly 0 at that time. I would suggest changing the time step a little bit to avoid such situation where your plate has zero velocity at a particular time step.
-
February 20, 2023 at 1:45 pm
sidjou
SubscriberThanks for your suggestion!
I reduce the time step and the issue for the position repetition has been corrected.
About the exact position issue at t=0, I'm already using the double precision for my calculation.
-
-
- 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
-
3930
-
2649
-
1861
-
1272
-
610
© 2023 Copyright ANSYS, Inc. All rights reserved.