# Absorbing/Derivative Boundary Conditions

I am attempting to solve a differential equation, however I am having issues implementing boundary conditions that reduce the impact of reflections/instabilities.

I've had a look at similar questions asked and how they've been answered - applying an absorbing potential, derivative boundary conditions, etc, but I've had no luck.

At the moment I'm applying Dirichlet at the edges of the domain, but I would rather have constant flux/absorbing boundaries to replicate an infinite domain and prevent negative and artificial values from being created.

You can see these in the contour plot.

Is there any way to apply such conditions to this code in particular and rid it of these artificial values?

L = 20;
LPlot = 10;
Time = 0.01;
h = 0.0001;

eqm = Derivative[1, 0, 0][f][t, x, y] - (1/10 (x - y) (Derivative[1, 1, 0][f][t, x, y] - Derivative[1, 0, 1][f][t, x, y]))
== 50 I*(Derivative[0, 2, 0][f][t, x, y] - Derivative[0, 0, 2][f][t, x, y])
- I*(x - y) (Derivative[0, 1, 0][f][t, x, y] - Derivative[0, 0, 1][f][t, x, y])
- 5*(x - y)^2 f[t, x, y]
+ 1/10*((-1)*(5*(Derivative[0, 2, 0][f][t, x, y] - Derivative[0, 0, 2][f][t, x, y])
+ 5*(x - y) (Derivative[0, 1, 0][f][t, x, y] - Derivative[0, 0, 1][f][t, x, y])
+ 5*(x - y)^2 f[t, x, y])
+ (5*(x - y)^3 (Derivative[0, 1, 0][f][t, x, y] - Derivative[0, 0, 1][f][t, x, y])
+ 5*(x - y)^2 (Derivative[0, 2, 0][f][t, x, y] - 2*Derivative[0, 1, 1][f][t, x, y] + Derivative[0, 0, 2][f][t, x, y])
+ 10 I*(x - y) (Derivative[0, 1, 0][f][t, x, y] + Derivative[0, 0, 1][f][t, x, y])));

ic = f[0, x, y] == (Exp[-((x + 5)^2 + (y + 5)^2)] + Exp[-((x - 5)^2 + (y - 5)^2)]) + (Exp[-((x + 5)^2 + (y - 5)^2)] + Exp[-((x - 5)^2 + (y + 5)^2)]);

sol = Evaluate[NDSolveValue[{
eqm,
ic,
DirichletCondition[f[t, x, y] == 0, {x == L, y == L, x == -L, y == -L}]},
f, {t, -0.001, Time}, {x, -L, L}, {y, -L, L}, MaxStepSize -> h,
AccuracyGoal -> 5, PrecisionGoal -> 5,
Method -> {"MethodOfLines", "TemporalVariable" -> t,
"SpatialDiscretization" -> {"FiniteElement"}}]];

Manipulate[Plot[Re[sol[t, x, -x]], {x, -LPlot, LPlot}, PlotRange -> {-0.5, 1}], {{t, Time}, 0, Time, Appearance -> "Labeled"(*,Animator*)}]

Manipulate[ContourPlot[Re[sol[t, x, y]], {x, -LPlot, LPlot}, {y, -LPlot, LPlot}, Contours -> 20, ColorFunction -> "TemperatureMap", PlotLegends -> Automatic, PlotRange -> All], {{t, Time}, 0, Time, Appearance -> "Labeled"(*,Animator*)}]

• Here are a few thoughts/observations: You start the time integration from -0.001 but your ic is at 0. In principal you could just leave out the DirichletConditon. Also the options MaxStepSize\[Rule]h,AccuracyGoal\[Rule]5,PrecisionGoal\[Rule]5 to NDSolve are not really needed. You can check for min max values with MinMax /@ Through[{Re, Im}[sol["ValuesOnGrid"]]] If you remove the DirichletBC and the FEM option you get other messages maybe those lead you in the right direction. – user21 Mar 8 '19 at 6:00
• There's no general way to define b.c. at infinity, AFAIK. Is this equation studied before? If so, you may have some luck by searching related papers. Asking in this site isn't a very good idea, I'm afraid, because creating proper b.c. at infinity for specific PDE (especially those related to waves) can be tricky. – xzczd Mar 8 '19 at 6:20
• I'm unaware if it has been studied before, is there anywhere you could direct me to constructing correct infinite boundary conditions for specific PDEs? – Tbone Willsone Mar 8 '19 at 8:15
• You need to add @xzczd in the comment, or I won't get the reminder. To be honest I don't know where we can find experts for Absorb b.c. (math.SE perhaps? ) Anyway, you may try periodic b.c. (placed in a sufficient far position of course) first. – xzczd Mar 8 '19 at 15:30