CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Fluent UDF for AUV sine wave movement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 18, 2020, 04:37
Post Fluent UDF for AUV sine wave movement
  #1
New Member
 
Nguyễn Quốc Cường
Join Date: Jan 2020
Posts: 1
Rep Power: 0
conthula is on a distinguished road
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;
}
or this

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]);
}
Both of them give me what you want about the linear movement of AUV


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.
conthula is offline   Reply With Quote

Old   January 19, 2020, 21:33
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
what problem do you have, if everything works well?
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Reply

Tags
auv, cg_motion, cg_motion udf, udf, underwater


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 16:15.