Description
Say we have a model with a governing equation of the following form:
N = some_expression(grad(c))
dcdt = -pybamm.div(N)
model.rhs = {c: dcdt}
To define a boundary condition given for the flux N, this currently has to be reformulated in terms of grad(c) as a Neumann boundary condition on c. We propose to add another type of boundary condition that allows to directly define a boundary condition for the flux N, possibly looking something like this:
model.boundary_conditions = {
c: {
"left": (pybamm.Scalar(0), "Neumann"),
"right": (pybamm.Scalar(-2), ("Flux", N)),
}
}
Motivation
This will simplify the implementation of models with more complex Fluxes and corresponding boundary conditions.
Possible Implementation
No response
Additional context
No response
Description
Say we have a model with a governing equation of the following form:
To define a boundary condition given for the flux
N, this currently has to be reformulated in terms ofgrad(c)as a Neumann boundary condition onc. We propose to add another type of boundary condition that allows to directly define a boundary condition for the fluxN, possibly looking something like this:Motivation
This will simplify the implementation of models with more complex Fluxes and corresponding boundary conditions.
Possible Implementation
No response
Additional context
No response