[solved]problem when decomposing velocity flux according to the x, y and z directions
Hi!
I would like to decompose the velocity flux phi into 3 flux, one for each direction: Code:
phi = phi_x + phi_y + phi_z Code:
surfaceScalarField phi_x = linearInterpolate(U.component(vector::X)*vector(1,0,0)) & mesh.Sf(); Code:
phiTest = phi - (phi_x+phi_y+phi_z) Is someone know how to do such a thing ? I was wondering is there is a way to get these fields from the fvScalarMatrix pEqn exactly in the same manner we update the phi flux field : In OpenFOAM, we get the phi flux from the pEqn matrix: Code:
fvScalarMatrix pEqn Best regards, Cyp PS: in my example, M is a volTensorField |
I found a solution : from phi = pEqn.flux() I can create phix, phiy and phiz.
First, I defined a flux phi_ex with 1 on the faces concerning x and 0 elsewhere. I can create this flux with this snippet: Code:
volVectorField E Code:
phix = phi * phi_ex; However, I still have problem on my outlet BC.... |
All times are GMT -4. The time now is 07:34. |