Message Boards Message Boards

Problem about how to find a length related to the Nusselt number

Posted 9 months ago

I have to find the value of z that correspond to Nu=NuInfinity *1.05, where Nuinfinity=3.657, and the nusselt number is:

Nulocal[z_] := 2*(D[solT[0, 1, z], y])/(solT[0, 1, z] - Tb[z])

Here is the code that i wrote, but it doesn't work:

geo = ImplicitRegion[x^2 + y^2 <= 1, {x, y}];

equa = {2*(1 - (x^2 + y^2))*D[T[t, x, y], {t, 1}] == 
    D[T[t, x, y], {x, 2}] + D[T[t, x, y], {y, 2}], 
   DirichletCondition[T[t, x, y] == 1 - E^(-1000*t), x^2 + y^2 == 1], 
   T[0, x, y] == 0};

solT = NDSolveValue[equa, T, {t, 0, 1}, {x, y} \[Element] geo, 
   Method -> {"PDEDiscretization" -> {"FiniteElement", 
       "MeshOptions" -> {"MaxCellMeasure" -> 0.001}}}];

Tb[z_] := 
  4*NIntegrate[y*(1 - y^2)*solT[0, 1, z], {y, 0, 0.99}, 
    WorkingPrecision -> 20];

Nulocal[z_] := 2*(D[solT[0, 1, z], y])/(solT[0, 1, z] - Tb[z])


desiredValue = 3.657*1.05;

zValue = z /. FindRoot[Nulocal[z] == desiredValue, {z, zGuess}]
POSTED BY: Fredom W.
3 Replies
Posted 8 months ago

The code above still seems to miss something. The definition of Tb[z] is 4 times an integral. That integral is 0.999604*solT[0, 0, 1].

solT[0, 0, 1] seems to be identically zero from the boundary conditions.

So, Tb[z] seems to be identically zero, irrespective of z.

The definition of Nulocal involves a derivative, the derivative of solt[0, 0, y] with respect to y. This seems to be zero from the boundary conditions.

I may be missing the point of what you are trying to do, but my impression is that you may not be using the variables you intend to use.

Best, O. Linsuain

POSTED BY: Otto Linsuain
Posted 9 months ago

You may know this already, but if you put that equation in polar coordinates and do separation of variables, I believe the solution simplifies into something that you can write explicitly as an expansion over linear combinations of Laguerre polynomials and confluent hypergeometric functions (for r) and probably just decaying exponentials for t. There could be a reason why one of the two sets of coefficients is zero. This will not give you a simple solution, it will give an analytic solution written as an infinite series.

I have another question. The definition of Tb. The integral seems like the integral is just y^2/2 - y^4/4 evaluated between the limits of integration. Why invoke NIntegrate? Perhaps a typo?

Finally, the definition of Nulocal. The derivative of solT[0,1,z] with respect to y. Wouldn't that be zero? Typo?

Regards, Otto

POSTED BY: Otto Linsuain
Posted 9 months ago

thanks for the help, i changed the code:

Clear[Tb]
Clear[Nulocal]

geo = Disk[];

equa = {2*(1 - (x^2 + y^2))*D[T[t, x, y], {t, 1}] == 
    D[T[t, x, y], {x, 2}] + D[T[t, x, y], {y, 2}], 
   DirichletCondition[T[t, x, y] == 1 - Exp[-1000*t], x^2 + y^2 == 1],
    T[0, x, y] == 0};

solT = NDSolveValue[equa, T, {t, 0, 1}, {x, y} \[Element] geo, 
   Method -> {"PDEDiscretization" -> {"FiniteElement", 
       "MeshOptions" -> {"MaxCellMeasure" -> 0.001}}}];


Tb[z_?NumericQ] := 
  4*NIntegrate[y*(1 - y^2)*solT[0, 0, 1], {y, 0, 0.99}, 
    WorkingPrecision -> 3, MinRecursion -> 2, AccuracyGoal -> 10];

Nulocal[z_?NumericQ] := 
  With[{derivative = 
     D[solT[0, 0, y], y] /. y -> 1}, (2*derivative)/(solT[0, 0, 1] - 
      Tb[z])];

desiredValue = 3.657*1.05;
zGuess = 1;
zValue = z /. FindRoot[Nulocal[z] == desiredValue, {z, zGuess}];

but it gives me this error: FindRoot::jsing: Encountered a singular Jacobian at the point {z} = {1.}. Try perturbing the initial point(s).

POSTED BY: Fredom W.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract