averaging in les
Dear All,
I made a compressible LES simulation and used the averaging function to get the mean and r.m.s. pressure. A bit disturbing, but the r.m.s. pressure contains negative values in some cells. How can this be? Thanks, Lilla |
I don't think the Prime2Mean values are being calculated in the way you think, i.e
Field_rms = sqrt(Mean(sqr(Field-FieldMean))) Remember, this is a running average, so the initial value for FieldMean is not accurate. As a result the mean squares are calculated as: Field_ms_new = alpha * Field_ms_old + beta*sqr(Field) - sqr(FieldMean_old) + sqr(FieldMean_new) where alpha = (N-1)/N and beta = 1/N, which can lead to negative values for small N. It could also happen, that you restart the calculation with a FieldMean present, but with no Field_ms. This could lead to large initial negative values, as the initial Field_ms is calculated as: Field_ms_init = sqr(Field) - sqr(FieldMean) A better initialisation would probably be: Field_ms_init = sqr(Field - FieldMean) |
Dear Eugene,
thanks for your answer. Indeed, I checked the implementation as well, and the problem can arise from my test case. I have a pulsating source around a constant flowfield. The source term I guess makes harder to compute the mean, so I decided to fix the mean flow by myself and than calculate p^2 for noise computation. Best regards, Lilla |
All times are GMT -4. The time now is 14:52. |