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/)
-   -   Help with new volVectorField (https://www.cfd-online.com/Forums/openfoam-programming-development/241576-help-new-volvectorfield.html)

hiep.nguyentrong March 7, 2022 03:22

Help with new volVectorField
 
I look in to steadyCompressibleFoam in foam-extend-4.1 and run the simple tutorial test like transonicbump.

The base code used U instead of field HbyA run well.
When i create new volVectorField HbyA with same definition like below and replace U with HbyA, the code still run but divergence with wrong result.

What is the trick here? Can anyone explain it?

Code:

        volVectorField HbyA = rUA*UEqn().H();
        U =  rUA*UEqn().H();

        // Calculate phi for boundary conditions
        phi = rhof*(fvc::interpolate(HbyA) & mesh.Sf());



All times are GMT -4. The time now is 02:48.