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

cg motion profile

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2020, 10:50
Default cg motion profile
  #1
Member
 
Join Date: Dec 2016
Posts: 44
Rep Power: 9
Duke711 is on a distinguished road
what is wrong?
the wall only rotate in positive vector, the motion profile is not working?


#include "udf.h"

static real omega1 = 0.0;

DEFINE_CG_MOTION(box,dt,vel,omega,time,dtime)
{
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);

if (time > 0)
omega1 = 0.8726 * time;
else if (time > 1.4)
omega1 = 0;
else if (time > 5.4 < 6.8)
omega1 = -0.8726 * time;
else
omega1 = 0;

omega[1] = omega1;
Message ("time =%f, omega[1] = %f\n", time, omega[1]);
}
Duke711 is offline   Reply With Quote

Old   July 30, 2020, 15:42
Default
  #2
Member
 
Join Date: Dec 2016
Posts: 44
Rep Power: 9
Duke711 is on a distinguished road
Problem solved:




#include "udf.h"

static real omega1 = 0.0;

DEFINE_CG_MOTION(box,dt,vel,omega,time,dtime)
{
NV_S(vel, =, 0.0);
NV_S(omega, =, 0.0);

if (time >= 6.8)
omega1 = 0;
else if (time > 5.4)
omega1 = -0.8726 * (time -5.4);
else if (time > 1.4)
omega1 = 0;
else
omega1 = 0.8726 * time;

omega[1] = omega1;
Message ("time =%f, omega[1] = %f\n", time, omega[1]);
{
Duke711 is offline   Reply With Quote

Reply

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
Activating gas radiation leads to energy imbalance seph FLUENT 1 August 2, 2022 12:33
SU2 inlet profile error dwstevens SU2 1 June 8, 2020 16:08
OpenFoam restarting simulation, stops at first Time loop syntex OpenFOAM Running, Solving & CFD 4 April 5, 2019 11:20
3D UDF Paraboilc Velocity Profile (Can't Maintain) Sing FLUENT 12 August 7, 2017 06:25
Pulsatile profile at inlet Josyula Fluent UDF and Scheme Programming 4 May 6, 2012 10:09


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