The source term in the UDS
1 Attachment(s)
Hi,
I am working on the UDS by fluent, and I want to set a source by UDF, I have coded a UDF like: #include "udf.h" DEFINE_SOURCE(uds1_source,c,t,dS,eqn) { real x[ND_ND]; real source; real time; C_CENTROID(x,c,t); if (x[0]<3 && x[0]>2.9 && x[1]>=2.7 && x[1]<=2.8) { source = 1; dS[eqn] = 0.; } else { source=0.; dS[eqn] = 0.; } return source; } As you can see, I want the release rate of the source to be 1. But when I run the simulation, for example, until time 8.65s (The time step size is 0.001s). The integral of the scalar in the whole domain is 14.92015, which is strange. I think that the value should be 1*8.65=8.65, why this phenomenon happened? I am really confused about that. Thank you. |
Source Term
That's because sources are always volumetric. That means you have to divide by the volume. For source value to be 1, you need to return 1/C_VOLUME.
|
Quote:
|
Integral
That's because you are looking at something else while expecting something else. The area integral that you are reporting is product of area with the scalar and not scalar multiplied by time. This is not time integral but area integral.
|
All times are GMT -4. The time now is 11:06. |