I'm trying to solve 2D Fick's law of diffusion from the boundaries of a triangle (future shapes will include more complex implicit regions). I'm able to model diffusion without time in complex implicit regions. I'm also able to model diffusion with time over a rectangular region. However, once I use the implicit region function along with time in Fick's law, I get the error message
NDSolve::femimvr: The number of independent variables 3 ({x,y,t}) does not match the embedding dimension 2 >>
Is there any way to correct my code for this error? I've included the code below.
\[CapitalOmega] = ImplicitRegion[(x + y <= 10), {{x, 0, 10}, {y, 0, 10}}];
Dif = 0.0000072;
eq1 = D[u[x, y, t], t] == Dif*(D[u[x, y, t], x, x] + D[u[x, y, t], y, y]) - 1.2;
sol = NDSolve[{eq1, DirichletCondition[u[x, y, t] == 100, x + y == 10], u[x, 0, t] == 100,
u[0, y, t] == 100, u[x, y, 0] == 100}, u, {x, y} \[Element] \[CapitalOmega], {t, 0, 1000}];
Animate[ContourPlot[u[x, y, t] /. sol, {x, y} \[Element] \[CapitalOmega],
PlotRange -> {0, 100}, ClippingStyle -> Automatic,
ColorFunction -> "DarkRainbow", PlotLegends -> Automatic], {t, 0, 1000}]
t
has to come first for some reason. You have to make itu[t, x, y]
everywhere and doNDSolve[..., u, {t, 0, 1000}, {x, y} ∈ Ω]
, then it works. $\endgroup$