Comparison 1D transient heat transfer with analytic solution wrong

Dear ngsolve-Team,

I am trying to validate my simulation by comparing it to the analytical solution but the results do not match and I cannot find my mistake.

I set up a 1D-case of a plate with an initial temperature of 0 °C. On the left and right side of the plate I set the temperature to 20 °C and calculate the transient temperatures (see attached

These results do not match the analytic solution (see comparison.png).

Thank you very much!

*(sorry there was a error with the attachments before)


Attachment: analytic_numeric.pdf


found the error: I mixed up ‘region_hcs’ and ‘region_conductivities’ in line 122.

Correct is:

m = BilinearForm(fes, symmetric=False)
m += SymbolicBFI(CoefficientFunction(region_densities * region_hcs) * u * v)

Now the solution fits also the analytic solution.