CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Uds_unsteady (https://www.cfd-online.com/Forums/fluent/110102-uds_unsteady.html)

vsmkrm298 December 3, 2012 19:57

Uds_unsteady
 
Hi, I am solving an unsteady state problem in which the coefficient of unsteady term is different than the advective term, so i just need to multiply the default unsteady term with some number to get required unsteady term. I actually copied the same code from fluent udf manual and multiplied with that number. But my results are wrong. In the udf manual, why are we multiplying the unsteady term with volume(are we integrating it?, if yes, then do we need to integrate remaining terms also>?). I am posting my code also. Please help me.
Here s4 is some number which i need to multiply. Actually i tried by removing this term and adding a source term on right hand side, but solution is diverging. I still dont understand why are we integrating.

DEFINE_UDS_UNSTEADY(my_uds_unsteady,c,t,i,apu,su)
{
real physical_dt, vol, rho, phi_old;
physical_dt = CURRENT_TIMESTEP;
vol = C_VOLUME(c,t);
rho = C_R_M1(c,t);
*apu = -s4*rho*vol / physical_dt;
/*implicit part*/
phi_old = C_STORAGE_R(c,t,SV_UDSI_M1(i));
*su = s4*rho*vol*phi_old/physical_dt;
/*explicit part*/
}


All times are GMT -4. The time now is 04:27.