Problems with weak imposition of boundary conditions

Hello everyone,

I’m solving an euler-like problem using DG method. My solver works pretty well for most cases but I have a problem with the imposition of the boundary conditions. I want to impose a gaussian density profile in the inlet normalised to one in the centre. However, it seems like the external facets with very low densities don’t see their Dirichlet boundary conditions enforced.

I might be wrong, but my guess is that the local residual in those cells is negligible in comparison to the higher density ones and therefore residual for the whole problem isn’t affected by changes in those cells.

Here you can see \log_{10}(density) for a density profile with higher density that works well (solution in blue target BC in orange):

And in a lower density profile that doesn’t:

I know the density I want to impose on the sides is very low and should be negligible but it does have an effect on the final solution. Also in these figures the mesh is quite coarse but the behaviour is reproduced when refining the mesh.

So the question is:

Is my assumption (small local residuals not changing the total residual) right?

If so, is there a natural way to weight the residuals of the external facets with low densities so that the boundary conditions are well enforced?

Thanks in advance.

Is there any situation with a simple demonstrable example which exhibits this behaviour? Your question is pretty difficult to understand in its current form with too many barriers in terms of physical modelling precluding discovery of the underlying issue.

1 Like

Hi @nate, yes I’m sorry my question is a bit vague my code is already getting quite lengthy. I’ll try to make a MWE addapting it and try to give more details about the implementation. Thanks anyway for the quick response.