4
$\begingroup$

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.

enter image description here

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*)}]
$\endgroup$
4
  • 1
    $\begingroup$ 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. $\endgroup$
    – user21
    Commented Mar 8, 2019 at 6:00
  • $\begingroup$ 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. $\endgroup$
    – xzczd
    Commented Mar 8, 2019 at 6:20
  • $\begingroup$ 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? $\endgroup$ Commented Mar 8, 2019 at 8:15
  • 1
    $\begingroup$ 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. $\endgroup$
    – xzczd
    Commented Mar 8, 2019 at 15:30

1 Answer 1

2
$\begingroup$

This is not an answer but I'd like to point you to the new in 12.0 Acoustics PDE monographs. There is one about modeling acoustics in the time domain and one about acoustics modeling in the frequency domain. Both these tutorials include sections on absorbing boundary conditions and perfectly matched layers (PMLs). Both of those are for modeling domains with infinite extend. You could read through these sections and see if that can be applied to your case.

$\endgroup$
1
  • $\begingroup$ excellent, thank you so much - I'll have a look $\endgroup$ Commented Apr 20, 2019 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.