The spirit of SIMPLE algorithm in simpleFoam
1 Attachment(s)
Hello guys!
Im wondering where is the sprit of SIMPLE algorithm in simpleFoam. As we know in staggered mesh, the key point of SIMPLE is that: http://www.cfd-online.com/Forums/att...1&d=1432998836 But I did not see this is represented in simpleFoam. Maybe I miss sth? Or this omission can not be applied in un-staggered mesh with Rhie-chow interpolation? Because from Hrv's thesis, the math model behind simpleFoam is quite clear and straightforward. Best, |
Hi,
The algorithm of simpleFoam looks different from what is refered to as SIMPLE algorithm by many of us. In SIMPLE algorithm, U* is calculated from the momentum equation and then p' is calculated by substituting U* to the continuous equation. But simpleFoam calculates HbyA (which is identical to U^ of SIMPLER algorithm) instead of U* and then calculates p directly from the continuous equation by substituting HbyA. That is why simpleFoam doesn't have p' and U'. In simpleFoam, U is calculated from U = HbyA - grad(p)/UEqn.A() against U = U* + U' = U* - grad(p')/UEqn.A() of usual SIMPLE algorithm. |
Quote:
|
Quote:
SIMPLER algorithm is as follows: 1. Calculate U^ from the momentum equation HbyA = UEqn().H()/UEqn.A() 2. Calculate p from the continuity equation and U^ 3. Calculate Ustar from p calculated in Step 2 U* = HbyA - grad(p)/UEqn.A() ==== simpleFoam ends here and return to Step 1 with U = U* ==== 4. Calculate p' from the continuity equation and U* 5. Correct U using p' but do not correct p U = U* - grad(p')/UEqn.A() 6. Return to Step 1 |
I have to make some corrections.
I misunderstood SIMPLER algorithm. In Step 1, simpleFoam solves momentum equation before calculating HbyA, but SIMPLER calculates U^ from guessed velocity field and doesn't solve momentum equation here. And in Step 3, simpleFoam adds -grad(p)/UEqn.A() to HbyA for U, but SIMPLER solves momentum equation here in order to acquire Ustar. And I have to correct the answer to your first question. The spirit of SIMPLE algorithm can be seen in the pressure equation of simpleFoam. By applying the approximation of H(U') = 0, U can be expressed as U = H(U*)/A - grad(p)/A. Therefore div(U) = div(H(U*)/A) - laplacian(1/A, p) = 0, which is identical to pEqn. So simpleFoam is on SIMPLE algorithm. I was wrong. I am sorry for misleading you. |
Quote:
I came to the same conclusions when I analyzed the simpleFoam code. But now I cannot understand since we obtain pressure directly from the pressure equation instead the pressure correction p' what p.relax() means in the simpleFoam. It seems to mean the relaxation of p, but in the original SIMPLE the relaxation is related to pressure correction, i.e., p = p{previous} + p'. But the simpleFoam obtains the pressure directly. So, what does relaxation in the simpleFoam mean? I am not sure but from GeometricField.C, line 941 I can suggest that relaxation here means that the pressure for the next iteration is obtained as p := p{previous} + L * (p - p{previous}), where L is relaxation factor |
You can find a quite detailed description of simpleFoam here: https://openfoamwiki.net/index.php/SimpleFoam
|
All times are GMT -4. The time now is 03:00. |