1
$\begingroup$

Equations

T''[r] + T'[r] + a/k1==0

U''[r] + U'[r]==0

Boundary Conditions

T'[0]==0

T[r1]==U[r1]==Tw

k1*T'[r1]==k2*U[r2]

U[r2]==Ts

What would be the simplest way of solving for T and U in mathematica? I can do it in individual steps as I would do on paper, but I feel like there should be an easier way.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Because there is one too many boundary conditions, I chose to omit k1*T'[r1]==k2*U[r2] for now. Then,

Flatten@DSolve[{T''[r] + T'[r] + a/k1 == 0, U''[r] + U'[r] == 0, T'[0] == 0, 
    U[r2] == Ts, T[r1] == U[r1] == Tw}, {U, T}, r]

(* {T -> Function[{r}, (E^(-r - r1) (a E^r - a E^r1 - a E^(r + r1) r + a E^(r + r1) r1 + 
         E^(r + r1) k1 Tw))/k1], 
    U -> Function[{r}, -((E^-r (-E^(r + r2) Ts + E^(r1 + r2) Ts + E^(r + r1) Tw - 
         E^(r1 + r2) Tw))/(-E^r1 + E^r2))]} *)

Applying this to the final boundary condition yields

Simplify[(k1*T'[r1] == k2*U[r2]) /. %]

(* a + k2 Ts == a E^-r1 *)

which is a constraint on the constants.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.