|
[Sponsors] |
December 8, 2013, 06:57 |
UDF to simulate car moving, dynamic mesh
|
#1 |
New Member
diego
Join Date: Sep 2013
Posts: 14
Rep Power: 13 |
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) } |
|
December 10, 2013, 07:36 |
copy from the UDF help
|
#2 |
Member
CAO Liushuai
Join Date: Apr 2012
Posts: 30
Rep Power: 14 |
#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; } |
|
December 11, 2013, 06:26 |
|
#3 |
New Member
diego
Join Date: Sep 2013
Posts: 14
Rep Power: 13 |
Thank you very much for your help
|
|
December 11, 2013, 11:46 |
|
#4 |
New Member
diego
Join Date: Sep 2013
Posts: 14
Rep Power: 13 |
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? |
|
Tags |
dynamic mesh, fluent, udf |
|
|
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 |