To solve the liquid-phase mass balance and energy on a spatially 2D domain in cylindrical coordinates in MATLAB, we can use the finite volume method. Here is an example code:
main.m1408 chars68 lines
This example code solves for the liquid-phase mass balance and energy on a cylindrical domain with 20 radial cells and 40 axial cells. It uses a finite volume method to calculate the mass fluxes and update temperature. We assume constant density, heat capacity, thermal conductivity, and heat transfer coefficient. The boundary conditions are a constant wall temperature and adiabatic top and bottom surfaces. The code outputs a contour plot of the temperature distribution over the cylindrical domain.
gistlibby LogSnag