View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003825 | OpenFOAM | Bug | public | 2022-04-11 15:52 | 2022-04-11 16:10 |
Reporter | NicolasDelaisse | Assigned To | henry | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | CentOS | OS Version | 7 |
Fixed in Version | dev | ||||
Summary | 0003825: In cavitatingFoam correction of Uf is done with relative phi instead of absolute phi | ||||
Description | In the solver cavitatingFoam.C, in case of a dynamic mesh, Uf is corrected In pEqn.H, on line 83 with the flux phi, which has been made relative on line 19, see the code below: ---------------------------------------------------- phi = fvc::flux(HbyA) + rhorAUf*fvc::ddtCorr(U, phi, Uf); fvc::makeRelative(phi, U); .... // Correct Uf if the mesh is moving fvc::correctUf(Uf, U, phi); ----------------------------------------------------- Based on the implementation of fvc::correctUf in fvcMeshPhi.C (see below), I believe the absolute flux phi should be used. This is also supported by the use of the function in other solvers. ---------------------------------------------------- void Foam::fvc::correctUf ( autoPtr<surfaceVectorField>& Uf, const volVectorField& U, const surfaceScalarField& phi ) { const fvMesh& mesh = U.mesh(); if (mesh.dynamic()) { Uf() = fvc::interpolate(U); surfaceVectorField n(mesh.Sf()/mesh.magSf()); Uf() += n*(phi/mesh.magSf() - (n & Uf())); } } ---------------------------------------------------- If this is not a bug, I would appreciate a comment on why the relative flux is used and why this is different from other solvers. Otherwise, a possible fix is proposed below: ---------------------------------------------------- // Correct Uf if the mesh is moving fvc::correctUf(Uf, U, fvc::absolute(phi, U)); ---------------------------------------------------- Thanks in advance | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2022-04-11 15:52 | NicolasDelaisse | New Issue | |
2022-04-11 16:10 | henry | Assigned To | => henry |
2022-04-11 16:10 | henry | Status | new => resolved |
2022-04-11 16:10 | henry | Resolution | open => fixed |
2022-04-11 16:10 | henry | Fixed in Version | => dev |
2022-04-11 16:10 | henry | Note Added: 0012544 |