Hello,

The source-terms-plugin adds the source term to all solution points, but I want to add source term for some particular solution points, could someone give me some tips?

Is it that you want to add a source term at a specific point in space? If so, the best thing to do is probably to use a sharp Gaussian something like exp(-a((x - x_p)^2 + (y-y_p)^2)), where a is large and (x_p, y_p) is the point you want the source term at.

Yes. but my point (x_p, y_p) is chosen by some conditions, and I write a plugin to get these points. So I think I should change something in some .py file.

I highly doubt you want this. If you can’t express what you want as a smooth function, it is highly likely to be erroneous and order-of-accuracy destroying.

Regards, Freddie.

I don’t quite understand your saying. I identify certain points by some conditions and then I apply source terms to those points. So I need to control the selection of points in a file, which need to add source term.

I am saying this is not a sensible thing to do. Your source term needs to be a smooth function for things to work as expected. Anything which turns on for one point but off for another implies a discontinuous first derivative. This is not what you want.

Regards, Freddie.

No rho, u, v, w can be added to the source term, is it possible to implement?