However the matrices used for multiplication change depending on the boundary conditions, the value at matrix location (1,1) and (n,n). Also make sure you correctly alter the matrices you use for your computation besides altering the boundary values.ĭiscretization schemes should not change when you differ the BCs. The way these BCs translate to your code depend on whether the grid is staggered or collocated. Also setting one of the pressures to a reference value could be usefull (p = 0 at outflow for example). You can also try free-slip BCs for the velocity at the walls, which will better represent infinite domain then the velocity=0. You could also use dudx = -dvdy at the outflow (from continuity equation). Ouflow: free outflow dudx = 0, dvdx = 0 and dpdx = 0 Inflow: uniform inflow profile U = 1, dvdx=0 (free-slip) and dpdx=0 (neumann) You should clearly specify the BCs you want to use for your flow. If all is well (you are correctly solving Navier-Stokes equations) changing Lid Driven Cavity flow is as 'easy' as changing the Boundary Conditions.ĭo you make use of a staggered (velocity defined on cell faces, pressure in cell center) grid or a collocated arrangement (velocity and pressure defined in cell center)? Matlab code for pipe flow - CFD Online Discussion Forums
0 Comments
Leave a Reply. |