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

3D moving car simulation with dynamic mesh and UDF.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 13, 2015, 20:43
Question 3D moving car simulation with dynamic mesh and UDF.
  #1
New Member
 
Yoon
Join Date: Mar 2015
Location: Seoul
Posts: 10
Rep Power: 3
touyet is on a distinguished road
Hi
I'm trying to simulate moving car on the road.
but when I use UDF code belows, Error sign occur
(Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64).)


#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] = 5.0;
}

this code is from here.
remeshing & smoothing
K-e standard
density based


Is anyone knows why this error occur??
need your help. thanks
touyet is offline   Reply With Quote

Old   September 1, 2016, 16:36
Default
  #2
New Member
 
Marcelo Italo Adotti
Join Date: Jul 2011
Posts: 3
Rep Power: 7
italoadotti is on a distinguished road
Hello Touyet have found a solution to the problem?

I am considering starting a project with the same idea
italoadotti is offline   Reply With Quote

Old   September 2, 2016, 04:45
Default
  #3
Senior Member
 
duri
Join Date: May 2010
Posts: 160
Rep Power: 8
duri is on a distinguished road
Quote:
Originally Posted by touyet View Post

if(!Data_Valid_P())
return;
What is the meaning of this if condition? Remove this and check.
duri is offline   Reply With Quote

Old   September 5, 2016, 06:41
Default
  #4
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 689
Rep Power: 15
vasava will become famous soon enough
Quote:
Originally Posted by duri View Post
What is the meaning of this if condition? Remove this and check.
It simply checks if the variables needed by UDF are initialized or not. See this link for explanation.

Quote:
Originally Posted by touyet View Post
(Error: The UDF library you are trying to load (libudf) is not compiled for 3ddp on the current platform (win64).)
It is possible that you do not have properly installed Visual studio and/or SDK. There could also be problem with your UDF.

Try this:
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;
}
This is from butterfly valve tutorial in Fluent.
vasava is offline   Reply With Quote

Old   September 6, 2016, 08:27
Default
  #5
D.M
Member
 
D.Malekian
Join Date: Jan 2016
Posts: 34
Rep Power: 3
D.M is on a distinguished road
Hello
i checked the code myself and didn't get any error, there was some obvious problems in your code that i have highlighted them. this is the code:

#include "udf.h"

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

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

if(!Data_Valid_P())
return;

vel[0] = 5.0;
}

the code loaded properly for me , so if it didn't load for you the problem is your compiler.
D.M is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Mesh UDF Qureshi FLUENT 6 January 17, 2017 10:50
UDF applied dynamic mesh and mesh motion in the same time lostmmind Fluent UDF and Scheme Programming 7 April 6, 2015 09:57
UDF to simulate car moving, dynamic mesh costy Fluent UDF and Scheme Programming 3 December 11, 2013 11:46
udf for dynamic mesh moloykb Fluent UDF and Scheme Programming 1 February 13, 2013 00:06
Dynamic Mesh moving interface help akash.iitb FLUENT 0 August 23, 2010 23:53


All times are GMT -4. The time now is 09:02.