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

UDF to simulate car moving, dynamic mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 8, 2013, 06:57
Default UDF to simulate car moving, dynamic mesh
  #1
New Member
 
diego
Join Date: Sep 2013
Posts: 14
Rep Power: 13
costy is on a distinguished road
I've to simulate a car moving along a street. The car velocity mustn't change during the time. Is it correct the following udf?


#include "udf.h"

DEFINE_CG_MOTION(car,dt,vel,omega,time,dtime )
{
Thread *t;
face_t f;
t = DT_THREAD(dt)
vel (10, 0, 0)
omega (0, 0, 0)
}
costy is offline   Reply With Quote

Old   December 10, 2013, 07:36
Default copy from the UDF help
  #2
Member
 
shuai_manlou's Avatar
 
CAO Liushuai
Join Date: Apr 2012
Posts: 30
Rep Power: 14
shuai_manlou is on a distinguished road
#include “udf.h”

DEFINE_CG_MOTION(car_velocity,dt,vel,omega,time,dt ime)
{
Thread *t;

NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);

if(!Data_Valid_P())
return;

vel[0] = 10.0;
}
shuai_manlou is offline   Reply With Quote

Old   December 11, 2013, 06:26
Default
  #3
New Member
 
diego
Join Date: Sep 2013
Posts: 14
Rep Power: 13
costy is on a distinguished road
Thank you very much for your help
costy is offline   Reply With Quote

Old   December 11, 2013, 11:46
Default
  #4
New Member
 
diego
Join Date: Sep 2013
Posts: 14
Rep Power: 13
costy is on a distinguished road
I've compiled the udf file, but when I click on preview mesh motion and the following error appears:

Updating mesh to time 5.00000e-02 (step = 00001)...
Warning: non-positive volumes exist.
Error: Update-Dynamic-Mesh failed. Negative cell volume detected.
Error Object: #f

How can I resolve the problem?
costy is offline   Reply With Quote

Reply

Tags
dynamic mesh, fluent, udf


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
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
UDF for Dynamic Mesh vasava Fluent UDF and Scheme Programming 2 September 25, 2013 01:54
udf for dynamic mesh moloykb Fluent UDF and Scheme Programming 1 February 13, 2013 00:06
Dynamic mesh for rotating wall - UDF ? Tobard FLUENT 1 April 28, 2011 19:00
Dynamic Mesh UDF Parallelization sy_aloy FLUENT 0 February 13, 2006 13:14


All times are GMT -4. The time now is 14:58.