143 | | = The code - Non-Entropy Fix= |
144 | | To get a 1D version of the method Toro was describing, without an 'entropy fix', I had the intuition to do the following- keep the flux equation the same, but ignore certain vectors and eigenvalues associated with y and z directions. This got rid of alpha's 3 and 4, K's 3 and 4, and lambda's 3 and 4. I changed the remaining eigenvectors to have 3 components each, again choosing to get rid of the y and z elements. This is the resulting code that I added to the Godunov solver. Unfortunately it did not work, and produced wonky results, see below. |
145 | | |
146 | | [[Image(CallRoe.png, 50%)]] |
147 | | [[Image(rhoSolver.png, 100%)]] |
| 143 | = The code - Entropy Fix= |
| 144 | |
| 145 | My code essentially does the following: 1) sets up left and right local Riemann problems as usual, 2) for each intercell boundary determines if the contact is left or right traveling, 3) Chooses bases on the position of the contact, which wave would cross the intercell boundary (the left wave associated with the u-a Euler eigenvalue for a right traveling contact, and vice versa), 4) decides if this wave is a sonic rarefaction, and if so, applies the Harten- Hyman entropy fix (described below), 5) if the wave is not a sonic rarefaction it determines if it crossed the intercell boundary, and if so, calculates the Roe flux, 6) if the wave has not crossed the intercell boundary, then it can be thought of as not having disturbed the adjacent cell's state, and so we just take the numerical flux to be the physical flux of that adjacent cell. |
| 146 | |
| 147 | As stated above, the Rho flux is given by: |
| 148 | |
| 149 | [[latex(\vec{F}_{i+1/2} = \vec{F}_L + lambda*alpha*\vec{K})]] |
| 150 | |
| 151 | Where [[latex(\vec{K}_{i+1/2})]] is the vector of ''numerical'' fluxes, [[latex(\vec{F}_L)]] is the vector of physical fluxes for the left state, lambda and [[latex(\vec{K})]] are the eigenvalues and eigenvectors, and alpha is the wave speed, all with corresponding expressions given in detail above. |
| 152 | |
| 153 | For the case of sonic rarefactions, the lambda in the above equation for Roe's flux must be adjusted, and following the Harten-Hyman approach, is taken to be: |
| 154 | |
| 155 | [[latex(\lambda ' = (u_L-a_L)*\frac{ustar-astarL-\lambda}{ustar-astarL-u_L+a_L}]] |
| 156 | |
| 157 | for a left sonic rarefaction. For a right sonic rarefaction, the coefficients are slightly adjusted. Note that the entropy fix requires estimates for the velocity and sound speed of the star region, ustar and astarL. We get estimates of these using the Roe approach for linearizing the Euler equations. They are listed in Toro, section 11.4.3. |
| 158 | |
| 159 | |
| 160 | [[Image(Roe1.png, 50%)]] |
| 161 | [[Image(Roe2.png, 50%)]] |
| 162 | [[Image(Roe3.png, 50%)]] |