Scalar Conservation
My Studying Notes for Upper-division CFD Intro Class
Operators on velocity fields
For 3D cartesian coordinates, velocity is a vector and is a function of x, y, and z. The respective components of velocity are known as u, v, and w.
Divergence is kind of a measure of how much the vectors are pointing away from each other. The divergence of a fluid’s velocity can only be non-zero if it is compressible i.e. it can change density like a gas for example. If an incompressible fluid were to have a non-zero divergence it would violate the conservation of mass since the fluid would be moving away from itself making a void of nothing.
Gradient is kind of like a vector derivative, showing the rate of change of a function in different directions. When applied to a velocity field it resembles an acceleration vector.
Gauss’ Divergence Theorem and “Flux“
We will want to be able to evaluate a quantity passing in and out of a control volume. The divergence theorem shows that you can either integrate the divergence within the entire volume or just integrate the flux of the quantity at the surface which bounds the volume.
Quantities can enter and exit the volume in 2 ways. With convective flux, the quantity is literally flowing into or out of the volume with the fluid velocity. An example of a quantity that is transported via convection is mass. Diffusive flux is where the quantity is conducted through the boundary without needing to be “carried“ by anything physically passing through the surface. An example of something which is diffusively transported is heat.
Conservation Equations
The integral form of the scalar conservation law is the most intuitively understandable for me since it relates to finite volumes. q represents a quantity per unit volume. The volume integral of q is equal to the quantity so the unsteady term is equal to the rate of change of the quantity in volume V. The flux vector has units of the quantity per unit time per unit area. Dotting the flux with the local normal vector ensures that only the flux into or out of the surface is being accounted for and also returns a scalar. Integrating over the surface gives us units of quantity per time. The source Q has units of q/s and represents the quantity getting generated or destroyed in the volume. It is often zero since commonly used quantities like mass are not created or destroyed.
An implementation of the integral form to conserve mass uses the density times velocity as the flux, having units of (Kg/s)/m^2 or mass flow rate per unit area. When integrated over the surface it becomes Kg/s.
An alternative but equivalent way to express conservation is with a differential form. Considering the divergence theorem, the surface integral can be rewritten and the whole equation differentiated.