|
[Sponsors] |
Fluent wall motion specified in the form of array of velocity with corresponding time |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 8, 2019, 11:15 |
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 |
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 |
|
August 8, 2019, 22:18 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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]; } |
|
Tags |
array, piston, udf, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |