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

Step function UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2024, 03:32
Default Step function UDF
  #1
New Member
 
Quoc-Viet Le
Join Date: Mar 2023
Posts: 18
Rep Power: 3
vietle is on a distinguished road
Hi,
i am working on a simulation which contains the motion of a rigid wall zone defined by a profile.

The motion is divided into 3 phases:

1. Translation from A to B
2. Certain time span without motion
3. Translation from B back to A

My current UDF

#include "udf.h"

DEFINE_CG_MOTION(moving_wall, dt, vel, omega, time, dtime)
{

real t = CURRENT_TIME;
NV_S(vel, =, 0.0);
vel[0] = 0.00016 * 3.1415 * 20 * cos(10*3.1415 * t + 3.1415/2);

}
vietle is offline   Reply With Quote

Reply


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 18:22
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 06:42
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 01:35


All times are GMT -4. The time now is 11:38.