CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Momentum source term problem (http://www.cfd-online.com/Forums/openfoam-solving/57976-momentum-source-term-problem.html)

kdarc February 10, 2009 13:00

Hi. I have a momentum source
 
Hi. I have a momentum source I need to use (in 2d) that operates with a positive value in the x-direction, but a negative value in the y-direction.

Is there a way to apply source terms to individual components of vectors???

I want to do something along the lines of:
+ fvm::Sp(S,U.component(0)) - fvm::Sp(S,U.component(1))

Any ideas??

thanks,
Ken

eugene February 10, 2009 14:53

As far as I know its not curre
 
As far as I know its not currently possible. The diagonal coefficient always has to be a scalar, you are trying to make it a vector.

kdarc February 10, 2009 16:17

One way to do this may be to s
 
One way to do this may be to simply specify Ux and Uy as scalars, and solve them separately with their own different source terms. The U vector can simply be recomposed afterwards for other standard operations.

Any obvious problems (that aren't occurring to me!!) with doing this???

Thanks.

eugene February 11, 2009 08:52

Well the Laplacian operator th
 
Well the Laplacian operator that you need for the pressure equation, is not defined for a vector. I am not sure how you would get around this problem. Perhaps use a sparse tensor?

Other than this I don't see anything fundamental, but I'm sure there will be a lot of operational issues that will complicate the problem.

I have a vague recollection that someone else wanted to do this kind of thing a few years back. Have you tried searching the forum?


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