Hi Chris, Differential Equations is a neat package. Thanks for providing this to the community.
I have been having some issue with the RobinBC and General boundary condition. I have u(0)=0 and u'(L)=0 in my problem. RobinBC works well on the rhs but bot on the left hand side. Also when using the General BC I get another behavior even with the same BCs.
Any idea what the problem could be?
My BC is
const bc1 = RobinBC((1., 0., 0.), (0., 1., 0.), dx, 2)
or
const bc1bis = GeneralBC([0.0, 1.0, 0.0], [0.0, 0.0, 1.0], dx, 2)
And the equation I am solving for is:
step!(u,p,t) = Ksat/νe*((cos(α)*Δ+sin(α)∂x)bc1bisu)
tmax = 365.086400.0
prob = ODEProblem(step!, u0, (0.0, tmax))
alg = KenCarp4()
sol = solve(prob, alg)
with initial conditions:
t0 = 0.0
#u_analytic(x, t) = sin(2πx) * exp(-t*(2π)^2)
hmax0 = 100.0
u_analytic(x, t) = hmax0sin(2πx/(4L)) * exp(-t(2*π)^2)
u0 = u_analytic.(knots, t0);
and parameters
CFL = 0.5 # =u.dt/dxCourant-Friedrichs-Lewy CFL stability
α = π/10
Ksat = 2.0e-5; # saturated hydraulic conductivity
νe = 0.4 #porosity
u = Ksat/νe
dt = CFL*dx/u # 0.03 #3600.0
Thanks a lot