|
[Sponsors] |
July 29, 2021, 12:51 |
Replace time with current timestep
|
#1 |
New Member
Join Date: Jul 2021
Posts: 2
Rep Power: 0 |
Hello,
I am trying to use the timesteps of my steady state solver instead of the time function I used to set my case as a transient one in the code below: /* flap.c */ /* UDF for specifying a simple harmonic motion*/ /* */ /**********************************************/ #include "udf.h" #define Freq 0.1 #define angular_freq 2.0*M_PI*Freq #define tetmax -45.0*M_PI/180 DEFINE_CG_MOTION(shm, dt, cg_vel, cg_omega, time, dtime) { real omega; omega = tetmax*angular_freq*cos(angular_freq*time); /* rotational speed about axis*/ cg_vel[0] = 0.0075 * sin(3.1415927 * time / 5.); cg_vel[1] = 0.0; cg_vel[2] = 0.0; cg_omega[0] = 0.0; cg_omega[1] = 0.0; cg_omega[2] = omega; } I found this function CURRENT_TIMESTEP in the UDF manual to use the timestep of the solver for my steady state case. However, I have been unable to rework this into my code to replace time with the current timestep function and need help regarding this. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 11:04 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
LES, Courant Number, Crash, Sudden | Alhasan | OpenFOAM Running, Solving & CFD | 5 | November 22, 2019 02:05 |
laplacianFoam with source term | Herwig | OpenFOAM Running, Solving & CFD | 17 | November 19, 2019 13:47 |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 07:09 |