|
[Sponsors] |
February 17, 2013, 16:52 |
??fvVectorMatrix+fvVectorField??
|
#1 | ||
New Member
|
Hello All!
I try to remake the icoFoam solver to an solver for stratified almost incompressible liquid and I've an following problem: I added a new term to momentum equation, which is defined as: - rhoMin+f*(rhoMax-rhoMin)-rho0)/rho0*g (where rhoMin, rhoMax, rho0 are a constants) And if I write the momentum equation a intuitive way: Quote:
But if we write the equation as follows Quote:
And for me it's realy strange, because expression - fvm::laplacian(nu, U)- rhoMin+f*(rhoMax-rhoMin)-rho0)/rho0*g means that we add matrix coefficient to vector. |
|||
February 18, 2013, 01:53 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
All of the terms are vectors, i.e. the Laplacian of a vector is a vector and your custom term is also a vector, since you include g. Is this what your confusion is about?
|
|
February 18, 2013, 02:18 |
|
#3 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Alexander,
I suppose that you question is about two "identical" modifications to the momentum equation, however, you get two different results on the flow field, correct? The second implementation is the correct one to choose, simply because you are otherwise solving a pressure equation, which do not know about the additional source term. When you put the source inside fvVectorMatrix, it works correctly with respect to the pressure-velocity coupling. Kind regards Niels |
|
|
|