I want to solve some heat transfer problems with Mathematica. I am trying to run the heat transfer tutorial cases but I am always getting the error "NDSolveValue: Equation or list of equations expected instead of ..." I was reading into the HeatTransferPDEComponent documentation and tried running the example case, but the same problem appears. See the code below, I tried some stuff I found on the forum in the top 3 lines.
What is causing these errors and how can I fix it?
Needs["NDSolve`FEM`"]
Clear[vars, pars, \[CapitalOmega], eqn, Tfun]
ClearAll[vars, pars, \[CapitalOmega], eqn, Tfun]
vars = {\[CapitalTheta][x], {x}};
pars = <|"ThermalConductivity" -> 0.026, "HeatSource" -> 1|>;
\[CapitalOmega] = Line[{{0}, {1}}];
eqn = HeatTransferPDEComponent[vars, pars] == 0
Tfun = NDSolveValue[{eqn,
HeatTemperatureCondition[x == 0, vars,
pars, <|"SurfaceTemperature" -> 0|>]}, \[CapitalTheta],
x \[Element] \[CapitalOmega]];
Plot[Tfun[x], {x} \[Element] \[CapitalOmega]]
I want to add that I am new to Mathematica. Further I tried running some code snippets not using the HeatTransferPDEComponent stuff but defining the heat equation in the code, which worked just fine.
HeatTransferPDEComponent[{\[CapitalTheta][t, x], t, {x}}, <| "MassDensity" -> \[Rho], "SpecificHeatCapacity" -> Subscript[C, p], "ThermalConductivity" -> \[Kappa]|>]
in 12.3. $\endgroup$