Following this question
I came across this strange behaviour.
Let me define a 1 D interval implicitely
a = 1; b = 2;
Ω = ImplicitRegion[a <= r <= b, {r}]
and let me try to solve PDEs on this interval.
This works as expected (second order ODE)
w1 = NDSolveValue[{w''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b]}, w, {r, a, b}]
Plot[w1[x], x ∈ Ω]
and so does this
w2 = NDSolveValue[{w''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b]}, w, r ∈ Ω]
This works again as expected (this time 4th order ODE)
w1 = NDSolveValue[{w''''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w'[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b],
DirichletCondition[w'[r] == 0, r == b]}, w, {r, a, b}]
Plot[w1[x], x ∈ Ω]
Question
But why does this fail?
w2 = NDSolveValue[{w''''[r] == 1/2,
DirichletCondition[w[r] == 0, r == a],
DirichletCondition[w'[r] == 0, r == a],
DirichletCondition[w[r] == 0, r == b],
DirichletCondition[w'[r] == 0, r == b]}, w, r ∈ Ω]
with the error message The spatial derivative order of the PDE may not exceed two. >>
The only difference being using r ∈ Ω
as a domain instead of {r,a,b}
.
NDSolve
to go to FEM, without looking at whether the region is amenable to other methods. $\endgroup$Ω
could be viewed as having a direction and therefore integrated over as if it were time is a coincidence of it being 1D and the necessity of describing it in terms of a coordinate system. Still, you'd think it could say "FEM failed; integrating as an ODE with temporal variabler
." $\endgroup$Method
to something other than"FiniteElement"
makes no difference. You do not even get a warning that it is being ignored. $\endgroup$