|
[Sponsors] |
May 31, 2021, 18:24 |
Update of face fluxes in simpleFoam
|
#1 |
Member
Join Date: Mar 2021
Posts: 39
Rep Power: 5 |
Hello to all,
I am new o CFD in general and just started studying the SIMPLE algorithm (in simpleFoam). The continuity equation for incompressible flows is: And the momentum equation in a semi-discritezed manner is: or alternatively We can now write an expression for as: To derive the pressure correction equation we must replace the into the continuity equation. Which results in: We must also compute the face fluxes. In this case: In simpleFOAM: is defined as: Code:
volScalarField rAU(1.0/UEqn.A()); Code:
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p)); Code:
surfaceScalarField phiHbyA("phiHbyA", fvc::flux(HbyA)); Code:
fvScalarMatrix pEqn ( fvm::laplacian(rAtU(), p) == fvc::div(phiHbyA) ); The velocity is reconstructed as: Code:
U = HbyA - rAtU()*fvc::grad(p); In the code, we have : Code:
phi = phiHbyA - pEqn.flux(); In addition, why does the equation change in a compressible case (rhoSimpleFoam) to: Code:
phi = phiHbyA + pEqn.flux(); |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
[blockMesh] edges not aligned with or perpendicular to non-empty directions | ynos | OpenFOAM Meshing & Mesh Conversion | 6 | March 26, 2020 15:02 |
SimpleFoam not running after changing geometry | kkarbach | OpenFOAM Running, Solving & CFD | 2 | June 20, 2018 20:07 |
divergence evaluation: direct (div(U)) or through face fluxes (div(phi)) | t.teschner | OpenFOAM Programming & Development | 0 | March 16, 2018 13:26 |
Update Fluxes | luca | OpenFOAM Running, Solving & CFD | 2 | March 29, 2006 10:47 |