|
[Sponsors] |
June 18, 2011, 05:05 |
Cyclic cg_motion
|
#1 |
New Member
Herman
Join Date: May 2011
Posts: 8
Rep Power: 15 |
Hi all! Thanks for everyone's help so far!
I want to implement a velocity set function in a udf over a period. Thus having a velocity over the first half and no velocity over the second. This will simulate the velocity inlet during rowing Here is my udf: #include "udf.h" #include "dynamesh_tools.h" DEFINE_CG_MOTION(trans, dt, vel, omega, t, dtime) { float t; face_t f; float T; T = 1.79; /*period of full cycle*/ /*reset velocities*/ NV_S(vel, =, 0.0); NV_S(omega, =, 0.0); if (!Data_Valid_P ()) { Message0("\n\nNo data->No mesh motion\n\n"); return; } while (t < 1000) /*will run until end specified in FLUENT*/ { t = 0; /*set current time to zero*/ for (t < (T/2)) /*first half of period*/ { vel[0] = 3; } for (t >= (T/2) && t < T ) /*second half of period*/ { vel[0] = 0; } } } Any tips? I am also struggling with negative cell volumes? Can anyone point me where I should look? Thank you in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cyclic bc. and overlapGgi | Pekka | OpenFOAM | 12 | February 15, 2012 07:10 |
[Commercial meshers] Handling cyclic BC from gambit to openfoam for a cascade airfoil problem - OF 1.6 | maverick | OpenFOAM Meshing & Mesh Conversion | 2 | June 18, 2011 04:36 |
Pressure instability with rhoSimpleFoam | daniel_mills | OpenFOAM Running, Solving & CFD | 44 | February 17, 2011 17:08 |
[snappyHexMesh] snappyHexMesh with cyclic patches? | Axel_T | OpenFOAM Meshing & Mesh Conversion | 1 | October 12, 2010 10:03 |
cyclic conditions | Laurent FERRY | Siemens | 0 | January 6, 2006 15:11 |