BuoyantSimpleFOAM P_rgh deduction problem
Hello Fellow Foamers!
I've been working with BuoyantSimpleFOAM and I've shifted my focus on understanding why, even when no energy is provided to the system, a spurious flow is created in the compressible buoyant Simple FOAM. This problem is not unique to me, (eg.: this thread and This thesis) and, it's more of a code verification exercise rather than an actual simulation. In actual simulations, this problem seems to give origin to bad convergence in open reservoirs. The reason for this could be the assumption behind the formulation of P_rgh assuming an incompressible fluid in buyoantSimpleFOAM, a compressible solver. The derivation of this quantity comes from the integration of the hidrostatic equilibrium if the density is considered constant we have which is rewritten in OpenFoam's Code:
p = p_rgh + rho*gh All of this is achieved only if incompressible flow is admitted . This is however the way that the solver is implemented in the compressible solver. The compressible approach, where rho is not constant, depends on the law that we assume the fluid obeys. In my case the Ideal gas Law. This leads to a more complex derivation of the hidrostatic pressure or in OpenFOAM's nomenclature, Code:
p = p_rgh * exp( (gh) / RperfectGas / T) My questions are: - As anyone dealt with this before? I've looked for threads about this particular problem, and I've found none where this was pointed out as the problem and fixed. - Why was this assumption done? Was it a mistake, or am I wrong? (EDIT: I was wrong, check post 5) - I'm currently trying to fix this by including the rho*g term in SimpleFOAM. Has anyone achieved this or know of a thread where this was done? (EDIT: Answered by Zeppo, #2 post in this thread) Thank you all for the long read. I apologize in advance for errors the mathematical notation may have, however I'm pretty sure the essence of the derivations is correct. cheers! |
AFAICS, buoyancy force can be added explicitly into fvVectorMatrix through fvOptions object:
Code:
//--- UEqn.H --- Code:
//--- buoyancyForce.C --- |
Thank you for your reply, I was not aware of this possible usage of fvOptions!
https://github.com/OpenFOAM/OpenFOAM...uoyancyForce.H The way to implement this is to add the following fvOptions file of the case: Code:
GravitySource Is there any good source to learn how to use fvOptions? i've had a hard time with the documentation for this part of OpenFOAM and not many threads are clear about it's usage. Cheers! |
Quote:
Code:
fv::options fvOptions (fvMesh); Quote:
|
All times are GMT -4. The time now is 16:47. |