Boundary condition. How to get the normal gradient of the patchField U
Dear Foam,
I have a home-made solver, which has the volVectorField named Vs aside the classic U and p field. In a custom inlet boundary condition of U (named "customBC"), I need to access Vs, which is quite easy with a lookupObject. I also need the normal gradient of Vs on my inlet BC. I have implemented several possibilities, which work fine, but they are either costly or not flexible.
Cheers, Marcel |
From a boundary field you have access to the face value ("psif"), the value at the cell center ("psic") and the delta coeffient ("delta"), which is 1/(distance from center to face).
From these values you can calculate the normal gradient sngrad=delta*(psif-psic). I don't remember the functions to access psif,psic and delta, but you'll find them if you browse the fvPatchField documentation. Martin |
All times are GMT -4. The time now is 06:47. |