residualold.m
来自「MDPSAS工具箱是马里兰大学开发的」· M 代码 · 共 27 行
M
27 行
function A = residual(A)% residual.m Nonlinear equation model object residual update.%% INPUT/OUTPUT PARAMETERS% A : an object derived from the neqmodel class%% Copyright (c) by Raymond A. Adomaitis, 1998-2003unpack(A,'var')unpack(A,'param')vx = a*Bvx;vy = b*Bvy + vyBC;press = d*Bp;% Interior residualsRvx = wip( DDx*vx + DDy*vx - Dx*press, Bvx );Rvy = wip( DDx*vy + DDy*vy - Dy*press, Bvy );Rp = wip( Dx*vx + Dy*vy, Bp );Rp(1,1) = d(1,1)-0; % set mean pressure = 0;% No boundary condition residualsA = set(A,'resid',{Rvx Rvy Rp});
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?