|
[Sponsors] |
problem when decomposing the velocity flux according to the x, y and z directions.. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 24, 2011, 06:48 |
[solved]problem when decomposing velocity flux according to the x, y and z directions
|
#1 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
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(); surfaceScalarField phi_y = linearInterpolate(U.component(vector::Y)*vector(0,1,0)) & mesh.Sf(); surfaceScalarField phi_z = linearInterpolate(U.component(vector::Z)*vector(0,0,1)) & 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 ( fvm::laplacian(-M,p) ); pEqn.setReference (....); pEqn.solve(); phi = pEqn.flux(); Best regards, Cyp PS: in my example, M is a volTensorField Last edited by Cyp; January 25, 2011 at 06:33. |
|
January 24, 2011, 15:46 |
|
#2 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
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 ( IOobject ( "E", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedVector ("E",dimensionSet(0,0,0,0,0),vector::zero) ); E = vector(1,0,0); surfaceScalarField phi_ex = linearInterpolate(E) & mesh.Sf() / mesh.magSf(); Code:
phix = phi * phi_ex; However, I still have problem on my outlet BC.... |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Velocity profiles problem behind the elbow (3D problem) | kabat73 | FLUENT | 8 | May 9, 2010 05:26 |
Plot a graph of velocity & boundary condition problem | wanie | Fluent UDF and Scheme Programming | 0 | December 11, 2009 11:40 |
Multi step transient UDF velocity profile problem | William177 | FLUENT | 1 | February 3, 2008 07:47 |
unsteady state velocity problem | Vedavyasa M | FLUENT | 0 | June 28, 2007 07:33 |
problem for UDF velocity | Geremi | FLUENT | 0 | April 19, 2005 03:13 |