|
[Sponsors] |
February 2, 2014, 09:15 |
Wankel Engine UDF Problem
|
#1 |
New Member
Kieran
Join Date: Dec 2013
Posts: 6
Rep Power: 13 |
I am modelling a Wankel Engine for a University project in Fluent 14.5.
I first tried the method of creating the entire geometry and running a simulation which causes problems of negative cell volumes. This seems inherent to Fluent and to the Wankel Engine problem. Many people on this forum have tried this method with limited success. Therefore I am looking at the problem from a different angle. I have just created one chamber and plan to rotate that through 360 degrees to simulate one cycle of a Wankel Rotary Engine. I decided to test the problem by simplifying it to a semi-circular geometry - the centreline just rotates about its midpoint using DEFINE_CG_MOTION UDF. Then I have tried to generate the circular arc for any given rotational angle of the straight line part of the semi-circle using a DEFINE_GEOM UDF: #include "udf.h" #define NCOORDS 360 #define r 50 #define its 180 #define pi 3.1415926 DEFINE_CG_MOTION(eccentric, dt, vel, omega, time, dtime) { NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); omega[2] = -1.0; } DEFINE_GEOM(housing, domain, dt, position) { int i,j; real rad, x, y; int start=0; for(i=0;i<=NCOORDS;i++) { for(j=start;j<=start+its;j++) { j=j%360; rad = ((j * pi )/ 180); position[0] = r * cos(rad); position[1] = r * sin(rad); } start=start+1; } } I know this seems an overly complicated way of rotating a semi-circle but it is required when the problem includes the correct Wankel geometry. This UDF compiles fine with no errors. When I calculate the solution, the whole program freezes with no error messages. I have to close Fluent from the Task Manager. It would be much appreciated if someone could provide some insight. Kieran |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
For Joe : CFD in a Wankel engine | amcfd | FLUENT | 15 | March 27, 2013 05:40 |
Problem with my udf | july | Fluent UDF and Scheme Programming | 3 | June 20, 2010 07:56 |
udf compiling problem | akr | FLUENT | 3 | August 22, 2007 08:14 |
I have problem of UDF with turbulent premx source. | Z | FLUENT | 0 | February 16, 2005 04:34 |