% This document contains the known differences between NavierStokesInc_DO_rho.m 'rho-version' (contains density in DO state vector) and NavierStokesInc_DO.m % 'non-rho-version' contains only u and v velocities in DO state vector) as we attempt to merge both their updated versions into one all-purpose solver. % % Written by: Tapovan Lolla. % Last Updated: 5th February, 2014. 1. Formatting differences and white spaces (Partially corrected). 2. Field app.IP is absent in the non-rho-version. It is not even initialized by default. 3. Field app.PrRa is absent in non-rho-version. 4. Coriolis forcing terms are absent. For example, the lines %Options related to the Coriolis forces if ~isfield(app,'Fcor'), app.Fcor = @(t, p) zeros(size(p, 1), 1);end are not present in the non-rho-version. Moreover, matrices Au2v and Av2u etc, are not computed in the non-rho-version. 5. After computing AU, AV, ARHO is NOT computed in the non-rho-version. 6. After defining Neu and Nev, NbcsDrho, NbcsDu and NbcsDv are not defined/computed in the non-rho-version. 7. frho, frhoi, frhoij are not initialized/present in the non-rho-version. 8. After DOInit, the lines: if (~exist('rhoi', 'var'))&&((app.S(1) > 0)||(length(app.S) > 1)) rhoi = zeros(length(rho), app.S(1)); end; are not present in the non-rho-version. 9. non-rho-version uses DOAdapt and not DOAdapt_mex 10. Inside the time loop, rhoi_old is not computed in the non-rho-version. 11. There is no Boussinesq density forcing term, i.e. src in the non-rho-version. 12. The non-rho-version uses UV_advect_DO for calculating the advection terms for u, v while the rho-version uses UVadvect_TVD_mex. UVadvect_TVD_mex uses app.dt, Nbcs, NbcsDu, NbcsDv (the terms computed in point 6) and UV_advect_DO does not use these. 13. fu and fv thus computed do not have any Coriolis forcings (Au2v, Av2u are not present) in the non-rho-version. Additionally, frho is also absent in the non-rho version. 14. fui and fvi in the non-rho-version are also computed using UVadvect_DO and not UVadvect_TVD_mex as in the rho-version. 15. IMPORTANT: terms tmp, tmp1, tmp2, tmp3 in computing average TVD advection of mean by the modes is handled differently in the non-rho-version. Only the upwind direction of the modes are considered (no averaging performed as in the rho-version). Fluxes are computed using UVadvect_DO_CDS (non-rho-version) and not UVadvect_TVD_mex (rho-version). 16. UVadvect_DO_CDS is used to compute fuij and fvij in the non-rho-version, instead of UVadvect_TVD_mex in the rho-version. Again, the 'average' TVD method is not used in the non-rho-version. 17. frhoi_diffusion is absent in the non-rho-version. 18. As app.IP is absent in the non-rho-version, A1j and A2j are computed differently. 19. In non-rho-version, RHSv contains a source term src due to the density of the fluid when advancing the mean fields. This is not present in the rho-version (it's accounted for in the fv term computed previously). Moreover, RHSq of the mean field contribution is absent in the non-rho-version. 20. frhoijmyyy computation is not necessary in the non-rho-version. 21. While advancing the modes, computation of f1rho, f2rho is not necessary in the non-rho-version. Additionally, the computation of Inprodi does not involve app.IP in the non-rho-version. 22. RHSq computation for tracer advection is not necessary in the non-rho-version. 23. Whle correcting the DO contition for implicit terms, the Inprodi computation in the non-rho-version does not involve app.IPs, f2rho and frhoi. 24. rhoi etc, are never computed in the non-rho-version of the DO correction. 25. Orthonormalization of modes in the rho-version uses rhoi, while the non-rho-version does not. 26. Tracers are advected after the mode orthonormalization in the non-rho-version, as they are not a part of the DO decomposition. % EOF.