Inhomogeneous PDEs - Series solutions

Sorin Mitran (mitran@unc.edu, 2/21/24)

Clear["Global`*"]

Reciprocating, internal combustion engines dissipate heat into the environment through specific systems to eliminate thermal stress in the engine . This lab studies heat transfer in a cylinder head fin.

Problem formulation - Dirichlet boundary conditions

Solve (Subscript[u, t])=k (Subscript[u, xx])+q(x,t)  with u(0,t)=(Subscript[U, 0])+U  sin(Ω t), u(L,t)=(Subscript[U, 0]), u(x,0)=(Subscript[U, 0]),for 0<x<L
q(x,t)=Q (x/L) V [1+ W cos(ω t)]

u0[t_]=U0+U1 Cos[Ω t]; u1[t_]=U0;
q[x_,t_]=Q(x/L) V (1+(W/V) Cos[ω t]);

Typical parameter values in SI units

Parameters = {k->9.7 × (10^(-5)),U0->300, U1->100, L->0.05, V->50,W->25,Q->-5,Ω->2π 2500, ω->2 π 500}

Homogeneous problem

Set u(x,t)=w(x,t)+Ψ(x,t) such that a homogeneous Dirichlet problem is formulated for w(x,t),
with Ψ(x,t)=(Subscript[u, 0])(t)+(x/L)((Subscript[u, 1])(t)-(Subscript[u, 0])(t))
Solve (Subscript[w, t])=k (Subscript[w, xx])+g  with w(0,t)=0, w(L,t)=0, w(x,0)=0,for 0<x<L,
g(x,t)=q(x,t)-(Subscript[Ψ, t])(x,t)

ψ[x_,t_]=u0[t]+(x/L)(u1[t]-u0[t])

g[x_,t_]=Simplify[q[x,t]-D[ψ[x,t],t]]

The solution is obtained by expanding both the unknown function  and the forcing term   in terms of the eigenfunctions  of the homogeneous Dirichlet boundary conditions

w(x,t)=(∑_(n=1)^(Subscript[n, T]))(Subscript[c, n])(t)(Subscript[y, n])(x),
g(x,t)=(∑_(n=1)^(Subscript[n, T]))(Subscript[d, n])(t)(Subscript[y, n])(x)

y[x_,n_]=Sin[ n π (x/L)]

nT=10;
d=Table[(2/L)Integrate[g[x,t] y[x,n],{x,0,L}],{n,1,nT}]

sols=Flatten[Table[DSolve[{D[c[t,n],t] + k (((((n π)/L)))^2) c[t,n] == d[[n]],c[0,n]==0},c[t,n],t],{n,1,nT}]];

w[x_,t_]=Total[Table[(c[t,n] y[x,n] /. sols /. Parameters) ,{n,1,nT}]]

ψ[x,t]

Manipulate[Plot[w[x,t]+ψ[x,t] /. Parameters,{x,0,0.05},PlotRange->{{0,0.05},{200,500}},GridLines->Automatic],{t,0,0.05,0.001}]

Problem formulation - Robin boundary conditions

Change the above formulation to Robin boundary conditions

Solve (Subscript[u, t])=k (Subscript[u, xx])+q(x,t)  with u(0,t)=-T k (Subscript[u, x])(0,t)+(Subscript[U, 0])+U  sin(Ω t), u(L,t)=(Subscript[U, 0]), u(x,0)=(Subscript[U, 0]),for 0<x<L
q(x,t)=Q (x/L) V [1+ W cos(ω t)]

u0[t_]=U0+U1 Cos[Ω t]; u1[t_]=U0;
q[x_,t_]=Q(x/L) V (1+(W/V) Cos[ω t]);

Typical parameter values in SI units

Parameters = {k->9.7 × (10^(-5)),U0->300, U1->100, L->0.05, V->50,W->25,Q->-5,Ω->2π 2500, ω->2 π 500,T->1}

Homogeneous problem

Set u(x,t)=w(x,t)+Ψ(x,t) such that a homogeneous Dirichlet problem is formulated for w(x,t),
with Ψ(x,t)=(Subscript[u, 0])(t)+(x/L)((Subscript[u, 1])(t)-(Subscript[u, 0])(t))
Solve (Subscript[w, t])=k (Subscript[w, xx])+g  with w(0,t)=0, w(L,t)=0, w(x,0)=0,for 0<x<L,
g(x,t)=q(x,t)-(Subscript[Ψ, t])(x,t)

ψ[x_,t_]=u0[t]+(x/L)(u1[t]-u0[t])

g[x_,t_]=Simplify[q[x,t]-D[ψ[x,t],t]]

The solution is obtained by expanding both the unknown function  and the forcing term   in terms of the eigenfunctions  of the homogeneous Dirichlet boundary conditions

w(x,t)=(∑_(n=1)^(Subscript[n, T]))(Subscript[c, n])(t)(Subscript[y, n])(x),
g(x,t)=(∑_(n=1)^(Subscript[n, T]))(Subscript[d, n])(t)(Subscript[y, n])(x)

y[x_,n_]=Sin[ n π (x/L)]

nT=10;
d=Table[(2/L)Integrate[g[x,t] y[x,n],{x,0,L}],{n,1,nT}]

sols=Flatten[Table[DSolve[{D[c[t,n],t] + k (((((n π)/L)))^2) c[t,n] == d[[n]],c[0,n]==0},c[t,n],t],{n,1,nT}]];

w[x_,t_]=Total[Table[(c[t,n] y[x,n] /. sols /. Parameters) ,{n,1,nT}]]

ψ[x,t]

Manipulate[Plot[w[x,t]+ψ[x,t] /. Parameters,{x,0,0.05},PlotRange->{{0,0.05},{200,500}},GridLines->Automatic],{t,0,0.05,0.001}]