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

UDF coding for dynamic mesh geometry lifting

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 19, 2019, 05:48
Post UDF coding for dynamic mesh geometry lifting
  #1
New Member
 
Jiwon Yoon
Join Date: Feb 2019
Posts: 11
Rep Power: 7
Jiwon Y is on a distinguished road
Hello UDF experts!

I'm trying to make a up and down movement(Y-axis movement) of 0.8mm with my geometry model.

upward movement should take place with velocity of 0.65m/s during time 0~0.0014 sec.

downward movement should take place with velocity of 0.43m/s during 0.0014~0.0033 sec.

down below is my UDF but it does not compile properly

#include "udf.h"
#include "dynamesh_tools.h"
DEFINE_CG_MOTION(nozzle, dt, cg_vel, cg_omega, time, dtime)
{
/* reset velocities */
NV_S (cg_vel, =, 0.0);
NV_S (cg_omega, =, 0.0);
/* compute velocity formula */

if (time <= 0.0014)
{
cg_vel[1] = 0.65;
}

else if (0.0014 < time < 0.0033)
{
cg_vel[1] = -0.43;
}
else
{
NV_S (cg_vel, =, 0.0);
NV_S (cg_omega, =, 0.0);
}
message("\n");
message("\n y_velocity = %g \n",cg_vel[1]);
}

I also attatched my geometry file.(Trying to move all my geometry parts)
any corrections to UDF or suggestions would be VERY helpful
Attached Files
File Type: zip udf_test_one (2).zip (85.4 KB, 17 views)
Jiwon Y is offline   Reply With Quote

Old   August 20, 2019, 00:35
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
message has capital M

Code:
Message0("\n");
Message0("\n y_velocity = %g \n",cg_vel[1]);
best regards
Jiwon Y likes this.
AlexanderZ is offline   Reply With Quote

Old   August 20, 2019, 01:12
Default
  #3
New Member
 
Jiwon Yoon
Join Date: Feb 2019
Posts: 11
Rep Power: 7
Jiwon Y is on a distinguished road
Many Thanks to you..!
I have solved my UDF problem at last
Jiwon Y is offline   Reply With Quote

Reply

Tags
cg motion, dynamic mesh, 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
UDF coding for dynamic mesh Needle valve lifting Jiwon Y Fluent UDF and Scheme Programming 2 August 19, 2019 05:20
how to simulate a velocity profile UDF with sliding mesh? mani1455 Fluent UDF and Scheme Programming 0 May 1, 2014 02:28
[ANSYS Meshing] Meshing Strategy for inside geometry powpow ANSYS Meshing & Geometry 6 January 16, 2013 04:32
Inner geometry gets lost exporting mesh from ICEM CFD to CFX-Pre powpow CFX 3 December 20, 2012 09:14
unstructured vs. structured grids Frank Muldoon Main CFD Forum 1 January 5, 1999 10:09


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