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

Fluent wall motion specified in the form of array of velocity with corresponding time

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

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2019, 10:15
Exclamation Fluent wall motion specified in the form of array of velocity with corresponding time
  #1
New Member
 
Desmond Miles
Join Date: Oct 2016
Posts: 1
Rep Power: 0
DesmondM. is on a distinguished road
I want to simulate a piston moving in a chamber.

I have the velocity of the piston as an array with corresponding time.
vel = [time1 vel1
time2 vel2
time3 vel3
...]

How can i specify this as a udf?
What precaution I need to follow when defining my time step here and in fluent while solving.

Thanks
DesmondM. is offline   Reply With Quote

Old   August 8, 2019, 21:18
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
ansys fluent customization manual
start with DEFINE_CG_MOTION macro

regarding your table:
you may make 2 arrays:
time = {time1, time2, ... ,timen}
velocity = {vel1,vel2,...,veln}
size of arrays shoulb be same in this approach

check time and define velocity according to your time
part of code you may use
Code:
temp_time = CURRENT_TIME;
for (i=1;i<(sizeof(time)/sizeof(time[0]);i++)
{
if (temp_time>time[i-1] and temp_time<time[i])
   velocity = vel[i-1];
}
best regards
DesmondM. likes this.
AlexanderZ is offline   Reply With Quote

Reply

Tags
array, piston, udf, velocity

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 01:27
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 04:39.