free_fem_navier_stokes ( 'nodes6.txt', 'triangles6.txt' ) 22-Jul-2005 14:51:23 FREE_FEM_NAVIER_STOKES (MATLAB version): Finite element solution of the Navier Stokes equations on a triangulated region in 2 dimensions. - nu * ( Uxx + Uyy ) + UUx + VUy + dPdx = F1(x,y) - nu * ( Vxx + Vyy ) + UVx + VVy + dPdy = F2(x,y) Ux + Vy = F3(x,y). Boundary conditions: U(x,y) = U_BC(x,y) V(x,y) = V_BC(x,y) P(x,y) = P_BC(x,y) The finite element method uses Taylor-Hood triangular elements which are linear for pressure and quadratic for velocity. Fluid viscosity NU = 1.000000: Current status: * This code is just being sketched out. Node file is "nodes6.txt". Triangle file is "triangles6.txt". Number of nodes = 65 First 10 nodes Row: 1 2 Col 1 0.000000 0.000000 2 0.000000 0.250000 3 0.000000 0.500000 4 0.000000 0.750000 5 0.000000 1.000000 6 0.250000 0.000000 7 0.250000 0.250000 8 0.250000 0.500000 9 0.250000 0.750000 10 0.250000 1.000000 Triangle order = 6 Number of triangles = 24 First 10 elements Row: 1 2 3 4 5 6 Col 1 1 11 3 6 7 2 2 13 3 11 8 7 12 3 3 13 5 8 9 4 4 15 5 13 10 9 14 5 11 21 13 16 17 12 6 23 13 21 18 17 22 7 13 23 15 18 19 14 8 25 15 23 20 19 24 9 21 31 23 26 27 22 10 33 23 31 28 27 32 Quadrature order = 3 Dirichlet boundary condition on pressure will be applied at node 1 Total number of variables is 151 Variable indices per node: Node U_index V_index P_index 1 1 2 3 2 4 5 -1 3 6 7 8 4 9 10 -1 5 11 12 13 6 14 15 -1 7 16 17 -1 8 18 19 -1 9 20 21 -1 10 22 23 -1 11 24 25 26 12 27 28 -1 13 29 30 31 14 32 33 -1 15 34 35 36 16 37 38 -1 17 39 40 -1 18 41 42 -1 19 43 44 -1 20 45 46 -1 21 47 48 49 22 50 51 -1 23 52 53 54 24 55 56 -1 25 57 58 59 26 60 61 -1 27 62 63 -1 28 64 65 -1 29 66 67 -1 30 68 69 -1 31 70 71 72 32 73 74 -1 33 75 76 77 34 78 79 -1 35 80 81 82 36 83 84 -1 37 85 86 -1 38 87 88 -1 39 89 90 -1 40 91 92 -1 41 93 94 95 42 96 97 -1 43 98 99 100 44 101 102 -1 45 103 104 105 46 106 107 -1 47 108 109 -1 48 110 111 -1 49 112 113 -1 50 114 115 -1 51 116 117 118 52 119 120 -1 53 121 122 123 54 124 125 -1 55 126 127 128 56 129 130 -1 57 131 132 -1 58 133 134 -1 59 135 136 -1 60 137 138 -1 61 139 140 141 62 142 143 -1 63 144 145 146 64 147 148 -1 65 149 150 151 The matrix half bandwidth is 25 The matrix bandwidth is 51 The storage bandwidth is 76 Order 6 nodes plotted in "nodes6.eps". Order 6 triangles plotted in "triangles6.eps". Initial block of Stokes matrix A: Col: 1 2 3 4 5 Row --- 1 0.111111 0.000000 0.000000 0.222222 0.000000 2 0.000000 0.111111 0.000000 0.000000 0.222222 3 -0.041667 -0.041667 0.000000 -0.166667 0.000000 4 0.222222 0.000000 -0.083333 0.888889 0.000000 5 0.000000 0.222222 -0.083333 0.000000 0.888889 6 -0.055556 0.000000 0.000000 0.000000 0.000000 7 0.000000 -0.055556 0.000000 0.000000 0.000000 8 0.000000 0.000000 0.000000 0.000000 0.000000 9 0.000000 0.000000 0.000000 0.000000 0.000000 10 0.000000 0.000000 0.000000 0.000000 0.000000 Col: 6 7 8 9 10 Row --- 1 -0.055556 0.000000 0.000000 0.000000 0.000000 2 0.000000 -0.055556 0.000000 0.000000 0.000000 3 0.000000 0.041667 0.000000 0.000000 0.000000 4 0.000000 0.000000 0.000000 0.000000 0.000000 5 0.000000 0.000000 0.083333 0.000000 0.000000 6 0.222222 0.000000 0.000000 0.222222 0.000000 7 0.000000 0.222222 0.000000 0.000000 0.222222 8 -0.083333 -0.041667 0.000000 -0.166667 0.000000 9 0.222222 0.000000 -0.083333 0.888889 0.000000 10 0.000000 0.222222 -0.083333 0.000000 0.888889 Part of Stokes right hand side vector: 1 0.000000 2 0.000000 3 0.000000 4 0.000000 5 0.000000 6 0.000000 7 0.000000 8 0.000000 ...... .............. 151 0.000000 Initial block of adjusted Stokes matrix: Col: 1 2 3 4 5 Row --- 1 1.000000 0.000000 0.000000 0.000000 0.000000 2 0.000000 1.000000 0.000000 0.000000 0.000000 3 0.000000 0.000000 1.000000 0.000000 0.000000 4 0.000000 0.000000 0.000000 1.000000 0.000000 5 0.000000 0.000000 0.000000 0.000000 1.000000 6 0.000000 0.000000 0.000000 0.000000 0.000000 7 0.000000 0.000000 0.000000 0.000000 0.000000 8 0.000000 0.000000 0.000000 0.000000 0.000000 9 0.000000 0.000000 0.000000 0.000000 0.000000 10 0.000000 0.000000 0.000000 0.000000 0.000000 Col: 6 7 8 9 10 Row --- 1 0.000000 0.000000 0.000000 0.000000 0.000000 2 0.000000 0.000000 0.000000 0.000000 0.000000 3 0.000000 0.000000 0.000000 0.000000 0.000000 4 0.000000 0.000000 0.000000 0.000000 0.000000 5 0.000000 0.000000 0.000000 0.000000 0.000000 6 1.000000 0.000000 0.000000 0.000000 0.000000 7 0.000000 1.000000 0.000000 0.000000 0.000000 8 -0.083333 -0.041667 0.000000 -0.166667 0.000000 9 0.000000 0.000000 0.000000 1.000000 0.000000 10 0.000000 0.000000 0.000000 0.000000 1.000000 Part of adjusted Stokes right hand: 1 0.000000 2 0.000000 3 0.000000 4 0.187500 5 0.000000 6 0.250000 7 0.000000 8 0.000000 ...... .............. 151 0.000000 Part of the solution vector: 1 0.000000 2 0.000000 3 0.000000 4 0.187500 5 0.000000 6 0.250000 7 0.000000 8 8.000000 ...... .............. 151 12.422098 Solution to the STOKES equations: Variable indices per node: Node U V P 1 0.000000 0.000000 0.000000 2 0.187500 0.000000 3 0.250000 0.000000 8.000000 4 0.187500 0.000000 5 0.000000 0.000000 -47.500000 6 0.000000 0.000000 7 -3.750000 0.703125 8 2260728089508755.500000 -2222831681826633.200000 9 2260728089508758.500000 -2222831681826634.200000 10 0.000000 0.000000 11 0.000000 0.000000 55.224398 12 2260728089508769.500000 -2222831681826639.700000 13 -9042912358035062.000000 8891326727306553.000000 57.008235 14 2260728089508761.500000 -2222831681826635.700000 15 0.000000 0.000000 54.764901 16 0.000000 0.000000 17 2260728089508771.500000 -2222831681826642.000000 18 661682777375989.870000 -2542497780366854.000000 19 -1599045312132781.500000 -319666098540210.560000 20 0.000000 0.000000 21 0.000000 0.000000 -41.592260 22 -1599045312132790.500000 -319666098540221.120000 23 6396181248531148.000000 1278664394160854.500000 2.083265 24 -1599045312132787.000000 -319666098540206.250000 25 0.000000 0.000000 -48.000000 26 0.000000 0.000000 27 -1599045312132794.700000 -319666098540216.870000 28 1491539271254478.700000 2371964567659994.000000 29 3090584583387271.000000 2691630666200208.500000 30 0.000000 0.000000 31 0.000000 0.000000 55.812218 32 3090584583387280.500000 2691630666200204.000000 33 -12362338333549118.000000 -10766522664800826.000000 52.800000 34 3090584583387275.000000 2691630666200204.000000 35 0.000000 0.000000 77.185796 36 0.000000 0.000000 37 3090584583387286.500000 2691630666200203.000000 38 4714053434460781.000000 4436493010406366.000000 39 1623468851073495.500000 1744862344206162.200000 40 0.000000 0.000000 41 0.000000 0.000000 -39.397847 42 1623468851073487.200000 1744862344206160.700000 43 -6493875404293956.000000 -6979449376824658.000000 -9.600000 44 1623468851073492.500000 1744862344206164.500000 45 0.000000 0.000000 -14.506816 46 0.000000 0.000000 47 1623468851073483.500000 1744862344206165.200000 48 966955030552062.620000 2041492051338837.000000 49 -656513820521421.870000 296629707132671.060000 50 0.000000 0.000000 51 0.000000 0.000000 65.588780 52 -656513820521415.250000 296629707132673.500000 53 2626055282085672.000000 -1186518828530680.500000 30.900000 54 -656513820521421.000000 296629707132670.190000 55 0.000000 0.000000 30.939478 56 0.000000 0.000000 57 -656513820521413.370000 296629707132669.250000 58 -656513820521414.120000 296629707132666.440000 59 0.932010 -0.744510 60 0.000000 0.000000 61 0.000000 0.000000 -44.628266 62 0.187500 0.000000 63 0.250000 0.000000 19.412032 64 0.187500 0.000000 65 0.000000 0.000000 12.422098 Pressure nodes written to "nodes3.txt". Pressure triangles written to "triangles3.txt". Pressures written to "pressure3.txt". FREE_FEM_NAVIER_STOKES: Wrote an ASCII solution file "solution.txt" of the form U ( X(I), Y(I) ) which can be used for plotting. FREE_FEM_NAVIER_STOKES: Normal end of execution. 22-Jul-2005 14:51:29