-
-
October 2, 2018 at 10:27 pm
RCamp
SubscriberHi all,
I am attempting to write a UDF such that a simple harmonic vibration is loaded into the entire fluid region of my model. Something such that the velocity would be:
vel[t] = sin(2*M_PI*freq*time)
I wrote a simple code:
" #include "udf.h"
real freq = 1.;
DEFINE_CG_MOTION(osc, dt, vel, omega, time, dtime) {
vel[0] = sin(2*M_PI*freq*time); } "
However, I am extremely new to coding and this code keeps kicking back the following errors in the TUI and GUI when I am trying to hook it to Fluent:
Can someone help explain what I am doing wrong?
Best,
-
October 2, 2018 at 10:52 pm
desouzadacosta
SubscriberIt says is missing the curly brackets
-
October 3, 2018 at 3:06 am
-
- You must be logged in to reply to this topic.

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
-
2656
-
2120
-
1347
-
1118
-
461
© 2023 Copyright ANSYS, Inc. All rights reserved.