In regard to my first question, you can always write the continuity equation in differential form instead of integral form:
If we break it into the (.)* and (.)' terms, we get for the time derivative: and for the divergence term The first term in the time derivative should be "fvc::ddt(rho)" while the second term would then be approximated by "psi*fvm::ddt(p)", where p here is the correction pressure. For the divergence terms, the first term should be "fvc::div(phiHbyA)-fvc::div(laplacian(rhorAUf, p))", but in rhoPimpleFoam, it is written as "fvc::div(phiHbyA)-fvm::div(laplacian(rhorAUf, p))". Why is that? And what about the remaining terms in the divergence term (i.e. all the u' and rho' terms)? I think I am missing something, as I am not sure how the pressure equation is derived in rhoPimpleFoam. |
I think I have (semi) figured out my first question. If we re-write the continuity equation as:
Where (*) is the predicted values and (') are the corrected values. We can then break each term down to: But from the definition of , we can rewrite the above equation as: This simply equals (in OpenFOAM notation): Code:
fvc::div(phiHbyA) - fvm::laplacian(rhorAUf,P) Adding all the terms, we get: Code:
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) There doesn't seem to be any additional terms in the OpenFOAM pressure equation to account for this. Is this somehow hidden inside psi*correction(fvm::ddt(p)) and I just don't know? Any help is appreciated. |
Have you been able to solve for the missing term ?
Hello
thank you for your detailed explanation, have you been able to find a solution to account for the missing term ? Also could you please explain the role of the the fvc::ddtCorr(rho, U, phi) term ? |
|
Quote:
|
All times are GMT -4. The time now is 07:29. |