CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   2D flow with non zero out-of-plane component (https://www.cfd-online.com/Forums/openfoam-solving/107742-2d-flow-non-zero-out-plane-component.html)

mevoili October 5, 2012 11:07

2D flow with non zero out-of-plane component
 
Hi foamers!

I'm trying to compute a 2D flow in the (x,y) plane but the trick is that flow has non zero Ux Uy and Uz component. All components are functions of x and y only though.
Does anybody know how I can do such a run ?
The problem is, with "empty" BC to have a 2D case, the Uz component is set to zero by the solver (even though the inflow Uz is non zero)...

What I am currently doing is computing a 3D flow with a few cells in the z direction and with cyclic BC, but this is not computationnally efficient at all, so I am trying to find a way to resolve the system in 2D only.

xisto October 27, 2012 08:57

Quote:

Originally Posted by mevoili (Post 385118)
Hi foamers!

I'm trying to compute a 2D flow in the (x,y) plane but the trick is that flow has non zero Ux Uy and Uz component. All components are functions of x and y only though.
Does anybody know how I can do such a run ?
The problem is, with "empty" BC to have a 2D case, the Uz component is set to zero by the solver (even though the inflow Uz is non zero)...

What I am currently doing is computing a 3D flow with a few cells in the z direction and with cyclic BC, but this is not computationnally efficient at all, so I am trying to find a way to resolve the system in 2D only.

My suggestion is to write an equation to each component of Ux, Uy, Uz.

Carlos

mevoili October 29, 2012 05:46

What do you mean ? Should I write my own solver then ?

xisto October 29, 2012 06:31

Quote:

Originally Posted by mevoili (Post 389054)
What do you mean ? Should I write my own solver then ?

Yes! You should write your own solver..

You need something like this.


fvScalarMatrix UxEqn
(
fvm::ddt(rho, Ux)
+ fvm::div(phi,Ux)
+ fvc::grad(p).component(vector::X) // The x component for the gradient term.
);


All times are GMT -4. The time now is 23:24.