You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/NS_2d_cylinder_PHS.m
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
function [W3,p] =NS_2d_cylinder_PHS(dt,nu,W1,W2,Dy,Dx,L_inv,L_u_inv,L_v_inv,L0,L_B,L_B_obs,L_W,L_B_y,L_B_S,D0_12_x,D0_12_y,D0_21_x,D0_21_y,Dy_b,Dy_b_1,D0_12_x_obs,D0_12_y_obs,p0,W0)
2
-
%NS_2D_CYLINDER_PHS Fractional step method for 2D Navier-Stokes equations around cylinder
1
+
function [W3,p] =NS_2d_fractional_step_PHS(dt,nu,W1,W2,Dy,Dx,L_inv,L_u_inv,L_v_inv,L0,L_B,L_B_obs,L_W,L_B_y,L_B_S,D0_12_x,D0_12_y,D0_21_x,D0_21_y,Dy_b,Dy_b_1,D0_12_x_obs,D0_12_y_obs,p0,W0)
2
+
%NS_2D_FRACTIONAL_STEP_PHS Fractional step method for 2D incompressible Navier-Stokes equations
3
3
%
4
4
% This function implements the fractional step method for incompressible Navier-Stokes:
5
5
% 1. Advection-diffusion step using Adams-Bashforth + Crank-Nicolson
function [W3,p] = NS_2d_fractional_step_PHS(dt,nu,W1,W2,Dy,Dx,L_inv,L_u_inv,L_v_inv,L0,L_B,L_B_obs,L_W,L_B_y,L_B_S,D0_12_x,D0_12_y,D0_21_x,D0_21_y,Dy_b,Dy_b_1,D0_12_x_obs,D0_12_y_obs,p0,W0)
2
+
%NS_2D_FRACTIONAL_STEP_PHS Fractional step method for 2D incompressible Navier-Stokes equations
3
+
%
4
+
% This function implements the fractional step method for incompressible Navier-Stokes:
5
+
% 1. Advection-diffusion step using Adams-Bashforth + Crank-Nicolson
6
+
% 2. Pressure correction step to enforce incompressibility
7
+
% 3. Velocity correction using pressure gradient
8
+
%
9
+
% INPUTS:
10
+
% dt - Time step size
11
+
% nu - Kinematic viscosity (1/Reynolds number)
12
+
% W1, W2 - Velocity fields at previous time steps [U1; V1], [U2; V2]
13
+
% Dy, Dx - Spatial derivative operators (y and x directions)
0 commit comments