# Simple Neumann condition over rectangle

have some problem with Neumann boundary conditions over simple rectangle. Here my code

currentTime := 0;
bounds := 4;
timeLimit := 50;
rect = Rectangle[{-bounds, -bounds}, {+bounds, +bounds}]
bsf = Interpolation@Flatten[Table[{{x, y}, 0.5 + 0.2 * RandomReal[{-1, 1}]}, {x, -bounds, +bounds}, {y, -bounds, +bounds}], 1];
initial = {f[x, y, 0] == bsf[x, y], D[f[-bounds, -bounds, t], t] == D[f[bounds, -bounds, t], t] ==D[f[-bounds, bounds, t], t] == D[f[bounds, bounds, t], t] == 0}
equation := With[{d = 0.1, a = 0.8, b = 0.005, c = 0.0005, g = 0.000005,    tm = 0.3, tmc = 0.2}, D[f[x, y, t], t] == d*Laplacian[a*(tm - tmc)*f[x, y, t] - (b*f[x, y, t]^3) + (c*f[x, y, t]^5) - g*Laplacian[f[x, y, t], {x, y}], {x, y}]]
ProgressIndicator[Dynamic[currentTime], {0, timeLimit}]
result = NDSolve[{equation, initial}, f[x, y, t], {x, y} \[Element] rect, {t, 0.1, timeLimit}, EvaluationMonitor :> (currentTime = t;), Method -> {"MethodOfLines", Method -> {"FixedStep", "StepSize" -> .5,
Method -> "ImplicitRungeKutta"}, "SpatialDiscretization" -> {"TensorProductGrid", "MinPoints" -> 50, "MaxPoints" -> 100}}]
plots = Table[DensityPlot[f[x, y, t] /. result, {x, y} \[Element] rect], {t,0,timeLimit, 0.5}];
ListAnimate[plots]


There are error "Boundary conditions is not specified on a single edge of the boundary of the computational domain", but i already specified conditions. What's wrong ?

Thanks for attention !

• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! Jan 10 '16 at 23:08

f[x,bounds,0] == Sin[x]

• I defined boundaries on edges initial = {f[x, y, 0] == bsf[x, y], D[f[x, -bounds, t], t] == D[f[x, +bounds, t], t] == D[f[-bounds, y, t], t] == D[f[bounds, y, t], t] == 0} but still have same error. May be exist more.. correct way to define Neumann boundaries over rectangle ? Jan 11 '16 at 9:29
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.17131546139717102, "perplexity": 9850.519934180758}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-43/segments/1634323585045.2/warc/CC-MAIN-20211016231019-20211017021019-00559.warc.gz"}