|
[Sponsors] |
July 30, 2020, 10:50 |
cg motion profile
|
#1 |
Member
Join Date: Dec 2016
Posts: 44
Rep Power: 9 |
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]); } |
|
July 30, 2020, 15:42 |
|
#2 |
Member
Join Date: Dec 2016
Posts: 44
Rep Power: 9 |
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]); { |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |