-
-
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
ALEXANDRE COSTA
SubscriberIt says is missing  the curly brackets
-
October 3, 2018 at 3:06 am
-
Viewing 2 reply threads
- The topic ‘Simple Harmonic UDF’ is closed to new replies.
Innovation Space
Trending discussions
Top Contributors
-
4683
-
1565
-
1386
-
1242
-
1021
Top Rated Tags
© 2025 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.


