-
-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
hi! solving the diffusion equation with (i) concentration-dependent diffusion coefficient and (ii) Robin BC.
I get an error:
ExtraVariablesSystemException: The system is unbalanced. There are 102 highest order derivative variables and 101 equations.
More variables than equations, here are the potential extra variable(s):
here is our PDE:
@parameters x t
@variables c(..)
∂t = Differential(t)
∂x = Differential(x)
∂²x = Differential(x) ^ 2
diff_eq = ∂t(c(x, t)) ~ ∂x((D₀ + α * c(x, t)) * ∂x(c(x, t)))
bcs = [c(x, 0) ~ 0.0, # initial condition
R * (D₀ + α * c(0, t)) * ∂x(c(0, t)) ~ c(0, t) - cₑ, # Robin
∂x(c(ℓ, t)) ~ 0.0] # no flux
so my student found that, if we re-arrange the Robin BC to instead look like:
R * ∂x(c(0, t)) + (cₑ - c(0, t)) / (D₀ + α * c(0, t)) ~ 0.0,
it works! maybe something to add to the docs?
(for novices like me, would be great to have c[1](t) and c[end](t) inferred by default instead of cutting off the solution at the boundaries.) thanks!
EDIT: nevermind, it doesn't start at c[3](t). I had an additional BC in there by accident. sorry. I can figure out how to infer c[1](t) from c[2](t). I'll edit this post when I figure it out. :)
Metadata
Metadata
Assignees
Labels
No labels