gdmcbain / skfem-cfd

computational fluid dynamics in scikit-fem
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

GS98 fig. 2.4-1 #2

Closed gdmcbain closed 2 years ago

gdmcbain commented 2 years ago

The reference is:

I think the problem is (see p. 92)

The figure plots the exact solution at x = 0, viz. T (0, t) = (4t/π)½ for 0 < t < 0.012 and superimposes the numerical solution for a grid xi = (i/N)1.2 and N = 20 (which is not consistent with x1 = 0/

gdmcbain commented 2 years ago

So dT/dt = T'', <v, dT/dt> = <T'', v>, d <v, T> / dt = [T', v] - <T', v'>

gdmcbain commented 2 years ago

The time-integration is supposed to be sufficiently accurate that only the spatial discretization, particularly of the OBC, is in question. That was done in the book using LSODE but we might just use TR (trapezoidal rule) with very small timesteps. Or can we adapt scipy.integrate.LSODA?

gdmcbain commented 2 years ago

M dT/dt = f - lap T

where M = mass matrix, lap = <u', v'>, laplacian matrix, and f includes the forcing heat flux at the origin.

Then write as an ODE, thinking about LSODA.

dT/dt = M**-1 (f - lap T).