CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Localized Filtering (

Wen Long January 1, 2004 23:56

Localized Filtering

In my program of solving ocean wave problems, sometimes I need filtering around moving shorelines or complicated structures to kill spurious oscillations.

Then, do you think there is any algorithm for triggering a localied filtering in a 2D domain? I want it fast and precise in finding where the spurious oscillations are.



Question Man. January 4, 2004 09:32

Re: Localized Filtering
Hi Wen,

Can you explain what you mean by filtering...? I am simply interested to know. Thank you.

Wen Long January 4, 2004 14:49

Re: Localized Filtering
What I mean is that:

When I solve a 2 Dimensional PDE (basically shallow water wave equation) using Finite Difference Method.

The scheme I used is linearly stable, but in order to make the code suitable for complicated geometry, such as a harbor with many islands, wharfs, breakwaters..., I need to treat moving shorelines as the waves approach the shoreline. Also waves will break on a sloping beach, all this causes spurious oscillations in the solution, and I had to use numerical filter (weighted averages around a point) to smooth the solution.

Now I want the filtering to be executed only at locations where the spurious oscillations occur, instead of all over the whole computation domain.

I wanted to define something to measure the "nastyness" of the solution, when it is greater than a certain value at some location, then we start filtering at that location. I wonder if there is available literature for this kind of computational tricks.

wen long

Question Man. January 5, 2004 08:39

Re: Localized Filtering
O.k. Well, I am taking a stab in the dark here, but would something like the TVD limiter schemes be of any use? These can locate discontinuities and apply certain schemes at these discontinuities. Thats the basic idea at least.

wen January 6, 2004 12:15

Re: Localized Filtering
I think your right, I'll take a look. But I don't want too much modification to the scheme I'm using.


alex January 6, 2004 13:24

Re: Localized Filtering
Paint brush in a photoshop might help:) Seriously though, your oscillations are telling you something about your method's inability to resolve the physics of the problem thus producing dispersive errors. Gaining a credible numerical solution would require the use of a theoretically sound approach (TVD, WENO/ENO, TWS and such...), which by definition is more involved than adding a couple of lines to your code.

All times are GMT -4. The time now is 03:35.