Calculate shear rate with known velocity forcing function and stokes solution

28 Views Asked by At

I have a forcing function of velocity as a function of time (it is a repeating pattern that resembles a sinusoidal function). I want to calculate shear rate as a function of time numerically using finite differences. I differential equation that governs this problem is given as:

$$ \frac{\partial u}{\partial t} = \nu\frac{\partial^2u}{\partial y^2} $$ as per stokes solution found here. I want to solve this using MatLab, EES, or similar software where my velocity function is entered as an array.

I haven't had to solve a problem like this in a while, and I am forgetting where to start, so any information would be helpful. Velocity forcing function

1

There are 1 best solutions below

0
On

This is such a basic problem, that there are certainly enough resources out here to tackle it. A first approach would be to discretize the spatial derivative using second order accurate central differences and using Forward Euler to handle the temporal derivative. This gives you an explicit update equation with no need for solving a linear system. Next, you could move on to Backward Euler to increase stability of the system which requires you to set up a linear system. In the case you are really interested, you can perform a von-Neumann stability analysis to see how velocity $\nu$ is related to timestep $\Delta t$ and grid width $\Delta x$ in terms of stability.