|November 22, 2013, 16:31||
Two-phase Eulerian UDF problem
Join Date: May 2013
Posts: 1Rep Power: 0
I am developing an Eulerian two-phase axisymmetric model to predict the dynamic flow system in magnetic separation process. So I wrote a UDF for the source term for the force on magnetic particles (phase 2) due to the magnetic field. In my code, I defined several UDSs, which were just used as variables to store the FIXED values regarding the magnetic field strength or gradient. So these UDSs should be independent of time. However, after the simulation started running, the UDSs were perfectly showing the expected values for the first several seconds, and then it started to deform with time. As shown in the following figure, near the top two corners, the UDS 0 (magnetic field strength) values became zero. The two bubbles started from a small region (probably from one cell) and then grew bigger with time. If the simulation kept running, it just ruined all the values.
Since I am using UDSs to store the fixed values, the unsteady/convection/diffusion/sources in the main function of UDS should not be calculated. So in the User-Defined Scalars dialog box, I did switch the Flux Function and Unsteady Function to NONE. But this did not fix the deformation problem with time.
Here I attached my code. Can anyone help me figure out where I did wrong? How to resolve this deformation problem?
real PI = 3.1415926;
real L = 0.04; /*Length of the tube*/
real MUO = 4*PI*pow(10,-7.);
real M = 1.220703;
x = xc;
y = xc;
r1 = pow(x+0.00625,2)+pow(y,2);
r2 = pow(x-(L+0.00625),2)+pow(y,2);
C_UDSI(c,t,0) = M/(4.0*PI*sqrt(pow(r1,3)))*sqrt(3.0*pow(y,2)/r1+1.0) + M/(4.0*PI*sqrt(pow(r2,3)))*sqrt(3.0*pow(y,2)/r2+1.0);
C_UDSI(c,t,1) = C_UDSI(c,t,0)*MUO;
C_UDSI(c,t,2) = pow(C_UDSI(c,t,0),2);
Many thanks in advance!!
|Thread||Thread Starter||Forum||Replies||Last Post|
|A problem about 'printf' and 'Message' in UDF.||LICH||Fluent UDF and Scheme Programming||2||May 2, 2013 02:45|
|Source Term used in Eulerian Model(Two phase)||Padian||FLUENT||1||May 19, 2008 03:47|
|fluent UDF external library lapack problem||Rick||FLUENT||0||May 7, 2008 10:16|
|Multiphase flow problem||icedou||FLUENT||6||July 10, 2005 02:52|
|UDF variables F1, y / problem with UDF||Fabian||FLUENT||6||June 2, 2003 10:22|