CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   buoyantPimpleDyMFoam dimension mismatch between Uf and phi (https://www.cfd-online.com/Forums/openfoam-programming-development/154495-buoyantpimpledymfoam-dimension-mismatch-between-uf-phi.html)

Sumit07 June 16, 2015 03:30

buoyantPimpleDyMFoam dimension mismatch between Uf and phi
 
I have combined buoyantPimpleFoam with pimpleDyMFoam to create new solver buoyantPimpleDyMFoam. But when running case using this solver then it gives an error that
Different dimensions for =
dimensions : [1 0 -1 0 0 0 0] = [0 3 -1 0 0 0 0]
at line where phi is calculating
phi = mesh.Sf() & Uf;
Now when I look in this equation Uf have dimension of [0 1 -1 0 0 0 0] and mesh.Sf() have dimension of [0 2 1 0 0 0 0].
But as this equation is a dot product of mesh.Sf() & Uf , so phi should have dimension of [0 1 -1 0 0 0 0] but instead it has dimension [1 0 -1 0 0 0 0].
Can any body knows why this is coming?

gaza June 16, 2015 15:02

Hi Sumit
Dimensions [1 0 -1 0 0 0 0] are kg/s. It seems that phi is calculated as for compressible fluid. Phi in incompressible flow has dimensions [0 3 -1 0 0 0 0]. BuoyantPimpleFoam is for compressible fluid, while pimpleDyMFoam is for incompressible. You should merge solvers for the same type of fluid. So it looks like LHS is calculated for compressible fluid and RHS for incompressible.

Sumit07 June 17, 2015 03:55

Thanks Przemek
I have found my error.
The error is present in createUf.H and fvc::makeRelative(phi, U) which are incopressible library.
So I created my own compressible library compressibleCreateUf.H and compressible version of makeRelative(phi, U) i.e. fvc::makeRelative(phi, rho, U).


All times are GMT -4. The time now is 18:09.