|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Nguyễn Quốc Cường
Join Date: Jan 2020
Posts: 1
Rep Power: 0 ![]() |
Hello Every one
I'm from VietNam, i'm reseaching about AUV - Autonomous Underwater Vehicle, i tried to simulate the movement of AUV follow a sine wave using Dynamic mesh in Ansys Fluent. I have success by simulate the AUV moving linear, but with the sine wave i have failed. This is the UDF code i use for linear movement Code:
#include "udf.h" DEFINE_CG_MOTION(car_velocity, dt, cg_vel, cg_omega, time, dtime) { cg_vel[0] = 5.0; cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = 0.0; } Code:
#include "udf.h" static real velx = 0.0; DEFINE_CG_MOTION(box, dt, vel, omega, time, dtime) { NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); velx = 0.05* sin(3.14145927*time / 10.); vel[0] = velx; Message("time=%f vel[0]=%f\n", time, vel[0]); } Hope someone can help me with the sine wave movement UDF, or give me some hint. I willing to buy it, if someone have. Thanks you very much. ![]() |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 ![]() ![]() |
what problem do you have, if everything works well?
__________________
best regards ****************************** press LIKE if this message was helpful |
|
![]() |
![]() |
![]() |
Tags |
auv, cg_motion, cg_motion udf, udf, underwater |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Passing udf value to fluent | durg | Fluent UDF and Scheme Programming | 2 | February 11, 2019 12:55 |
Fluent do not use my velocity field(by UDF) to solve energy equation | tangleiplus | Fluent UDF and Scheme Programming | 6 | January 21, 2019 21:28 |
My UDF works well with Fluent 16 but not with Fluent 19 | Ahmed A. Serageldin | Fluent UDF and Scheme Programming | 3 | October 19, 2018 11:38 |
UDF interpret in Fluent | wanghaojie | Fluent UDF and Scheme Programming | 1 | February 3, 2012 14:51 |
Help! Compiled UDF problem 4 Wave tank tutorial | Shane | FLUENT | 1 | September 3, 2010 02:32 |