I try to model the transient heat flow in a pipe, assuming that the temperature in radial direction doesn't change:
temperature u[t, \[CurlyPhi], z] , 0<z<10,0<\[CurlyPhi]<2Pi
The flux boundary conditions are described by NeumannValue. In direction of circumference two continuity conditions are considered:
Evaluating my model
NDSolveValue[{ 2.4 10^6 Derivative[1, 0, 0][u][t, \[CurlyPhi], z] == 172 (Derivative[0, 0, 2][u][t, \[CurlyPhi], z] +30.5 Derivative[0, 2, 0][u][t, \[CurlyPhi], z])
+ 1/138 1.85 10^7 NeumannValue[1, (-10 \[Degree] <= \[CurlyPhi]<= 10 \[Degree]) &&z == 10 ]
+ NeumannValue[0, (- 10 \[Degree] <= \[CurlyPhi] <= 10 \[Degree]) &&z == 0 ]
, u[0, \[CurlyPhi], z] == 0
, u[t, 0, z] == u[t, 2 Pi, z]
, Derivative[0, 1, 0][u][t, 0, z] ==Derivative[0, 1, 0][u][t, 2 Pi, z]},
u,{t, 0, 1}, {\[CurlyPhi], 0, 2 Pi}, {z, 0, 10}
, Method -> {"MethodOfLines", "TemporalVariable" -> t,"SpatialDiscretization" -> {"TensorProductGrid" }}]
(*NDSolveValue::bcart: Warning: an insufficient number of
boundary conditions have been specified for the direction of
independent variable z. Artificial boundary effects may be present in the solution.*)
gives an error message "insufficient boundary conditions in z-direction", inspite of two NeumannValue's, which I don't understand
What's wrong with my code? Thanks!
addendum #1(21.11.2019) (thanks for the several contributions! )
Substituting NeumannValue by explicit Derivative-boundaries the modified simulation
NDSolveValue[{ 2.4 10^6 (Derivative[1, 0, 0][u][t, \[CurlyPhi], z] ) ==172 (Derivative[0, 0, 2][u][t, \[CurlyPhi], z] + 30.5 Derivative[0, 2, 0][u][t, \[CurlyPhi], z])
, u[0, \[CurlyPhi], z] == 0
, u[t, 0, z] == u[t, 2 Pi, z]
, Derivative[0, 1, 0][u][t, 0, z] ==Derivative[0, 1, 0][u][t, 2 Pi, z]
, Derivative[0, 0, 1][u][t, \[CurlyPhi], 10] == If[-10 \[Degree] <= \[CurlyPhi]<= 10 \[Degree],1/138 1.85 10^7 , 0]
, Derivative[0, 0, 1][u][t, \[CurlyPhi], 0] == 0},
u,{t, 0, 1}, {\[CurlyPhi], 0, 2 Pi}, {z, 0, 10}, Method -> {"MethodOfLines", "TemporalVariable" -> t,"SpatialDiscretization" -> {"TensorProductGrid" }}
runs without error but only evaluates the solution u==0, that means the flux boundary at z==0 doesn't contribute to the solution???
addendum #2(21.11.2019)
Learning&Knowing that flux boundaries might be more easier formulated in FEM I tried to find a executable FEM-model:
NDSolveValue[{2.4 10^6 Derivative[1, 0, 0][u][t, \[CurlyPhi], z] ==172 (Derivative[0, 0, 2][u][t, \[CurlyPhi], z] + 30.5 Derivative[0, 2, 0][u][t, \[CurlyPhi], z]) +
1/138 1.85 10^7 NeumannValue[1, (-10 \[Degree] <= \[CurlyPhi] <= 10 \[Degree]) && z == 10] +
NeumannValue[0, (-10 \[Degree] <= \[CurlyPhi] <= 10 \[Degree]) && z == 0], u[0, \[CurlyPhi], z] == 0
, PeriodicBoundaryCondition[u[t, \[CurlyPhi], z], \[CurlyPhi] == \[Pi],Function[\[Phi], \[Phi] - 2 \[Pi]]]},
u, {t, 0, 1}, {\[CurlyPhi], -Pi, Pi}, {z, 0, 10},
Method -> {"MethodOfLines", "TemporalVariable" -> t, "SpatialDiscretization" -> {"FiniteElement"}}]
But Mathematica gives error message NDSolveValue::bcnop: No places were found on the boundary where -10 \[Degree]<=\[CurlyPhi]<=10 \[Degree]&&z==0 was True, so NeumannValue[0,-10 \[Degree]<=\[CurlyPhi]<=10 \[Degree]&&z==0] will effectively be ignored.
What's wrong here? Thanks!







PeriodicBoundaryCondition. E.g.PeriodicBoundaryCondition[u[t, \[Phi], z], \[Phi] == 2 \[Pi], Function[\[Phi], \[Phi] - 2 \[Pi]]]andPeriodicBoundaryCondition[ Derivative[0, 1, 0][u][t, \[Phi], z], \[Phi] == 2 \[Pi], Function[\[Phi], \[Phi] - 2 \[Pi]]]. However, Mathematica complains about the latter. =| – Henrik Schumacher Nov 19 '19 at 21:17TensorProductGridtogether withNeumannValue, butNeumannValueis only forFiniteElement, at least now. – xzczd Nov 20 '19 at 05:26NeumannValueI didn't find that restriction. It would imply that no flux -conditions could be imposed withTensorPorductGridand difference-methods? – Ulrich Neumann Nov 20 '19 at 07:32Derivativeto express the flux condition whenTensorProductGridis chosen. – xzczd Nov 20 '19 at 07:36Derivativehow to restrict the parameter range(- 10 \[Degree] <= \[CurlyPhi] <= 10 \[Degree]) &&z == 0(for example)? – Ulrich Neumann Nov 20 '19 at 09:08IforPiecewise. (BTW, you might need to useSimplify`PWToUnitStepto circumvent certain bug(s), for example: https://mathematica.stackexchange.com/a/137838/1871 ) – xzczd Nov 20 '19 at 09:58"SpatialDiscretization" -> {"FiniteElement", "MeshOptions" -> {"MaxCellMeasure" -> 0.05}}fix the issue. – xzczd Nov 21 '19 at 11:46