Bug introduced in 5.0, persisting through 13.2.
I try to solve the heat transfer equation with boundary condition that depends on time:
r0 = 0.75 10^-3;(*Beam spot size, m*)
ω = π ν;
ν = 1; (*pulse repetition rate, Hz*)
c = 1710;(Heat capacity, W/(m·K))
ρ = 879; (Density, kg/m^3)
λ = 0.111;(Heat conductivity, W/(m·K))
T0 = 300;(initial temperature,K)
T1 = 1000 - T0; (Hot state temperature, K)
Rm = 3 10^-3;(Sample Radius, m)
zm = 2 10^-3 ;(Sample thickness, m)
eq = D[T[R, z, t], t] == λ/(
c ρ) (1/(R + 10^-20) D[R D[T[R, z, t], R], R] +
D[T[R, z, t], {z, 2}]);
init1 = T[R, z, 0] == T0;
bc1 = D[T[R, z, t], {R, 1}] == 0 /. R -> 0;
bc2 = D[T[R, z, t], {R, 1}] == 0 /. R -> Rm;
bc3 = T[R, z, t] ==
Piecewise[{{T0 + T1 (1 - Abs@Sin[ω t])^500,
0 <= R <= r0}, {T0, True}}] /. z -> 0;
bc4 = T[R, z, t] == T0 /. z -> zm;
sol = NDSolveValue[{eq, init1, bc1, bc2, bc3, bc4},
T[R, z, t], {R, 0, Rm}, {z, 0, zm}, {t, 0, 10},
AccuracyGoal -> 30, MaxStepFraction -> 0.05]
The piecewise function defines the temperature at the left side of the z-interval as a short square pulses coming with frequency ω to central part of the disk.
However, solver returns the error-messages:
NDSolveValue::ibcinc: Warning: boundary and initial conditions are inconsistent. NDSolveValue::ndnum: Encountered non-numerical value for a derivative at t == 0.
What's wrong? I've tried with FEM package but it produce even more error-messages :)


t=0,initandbc3are inconsistent, it makesT[R, 0, 0]both300and1000for0 <= R <= 0.00075. – Feyre Feb 15 '17 at 09:43tat bc3 making (t-5*10^-3) instead of t inside Sin. Unfortunately, it does not change principally anything. – Rom38 Feb 15 '17 at 10:42SintoCosinbc3? – zhk Feb 15 '17 at 10:51(1 - Abs@Sin[ω t])^500term exist? Are you approximateDiracDeltawith it? If so, then it's incorrect because these peaks don't integrate to1, if not, then this term can be simply taken away, because it'll almost have no effect in the solution. – xzczd Feb 15 '17 at 10:54DiracDelta. Do you have any ideas? The integration errors should lead to certain problems with convergence of the solution but in this case solver do not start at all.. Actually, these peaks can have any area from the common point - the heat incomes can has an arbitrary form. – Rom38 Feb 15 '17 at 11:01ndnumwarning isn't the only issue behind OP's problem, I think it's good to have a question related to this bug tagged with "bugs", so future visitors can find it easier. – xzczd Feb 15 '17 at 12:32