# Transient Neumann Values

Compute the cooling effect of a duct with a cooling liquid in an axisymmetric cross section of a pipe.

Specify a solution domain.

 In:= X\[CapitalOmega] = ImplicitRegion[ y >= 0 && (x - 3/2)^2 + y^2 >= 1/25 && x^2 + y^2 >= 1 && x^2 + y^2 <= 4 && y <= x Tan[\[Pi]/8], {x, y}];

Specify a Neumann value that depends on time and stationary Dirichlet conditions.

 In:= XSubscript[\[CapitalGamma], N][t_] = NeumannValue[ If[t <= 10., -100. t, -1000.], (x - 3/2)^2 + y^2 == 1/25];
 In:= XSubscript[\[CapitalGamma], D][ t_] = {DirichletCondition[u[t, x, y] == 200., x^2 + y^2 == 1], DirichletCondition[u[t, x, y] == 15., x^2 + y^2 == 4]};

Solve a steady-state problem corresponding to the boundary conditions at to find an initial condition. The "Continuation" mesh generator is used to better resolve the corners and edges of the domain .

 In:= Xuinit = NDSolveValue[{10 \!\( \*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[0, x, y]\)\) == 0, Subscript[\[CapitalGamma], D]}, u[0, x, y], {x, y} \[Element] \[CapitalOmega], Method -> {"PDEDiscretization" -> {"FiniteElement", "MeshOptions" -> {"BoundaryMeshGenerator" -> "Continuation"}}}];

Solve a heat equation with a temperature set on the outer boundaries and a time-dependent flux over the inner boundary, using the steady-state solution as an initial condition. To ensure the best initialization, the same spatial mesh is used as for the steady-state solution.

 In:= Xuif = NDSolveValue[{D[u[t, x, y], t] - 10 \!\( \*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[t, x, y]\)\) == Subscript[\[CapitalGamma], N][t], Subscript[\[CapitalGamma], D], u[0, x, y] == uinit}, u, {t, 0, 25}, {x, y} \[Element] Head[uinit]["ElementMesh"]];

Plot the solution.

Out= Play AnimationStop Animation

## Mathematica

Questions? Comments? Contact a Wolfram expert »