Add vector field in momentum conservation equation
Hi community!
I would like to add a vector field (with constant value) in the momentum conservation equation. I have the following equation form in the solver: Code:
fvVectorMatrix UEqn I would like to subtract a constant vector field (Up) from the velocity vector U. I changed the code as follows: Code:
fvVectorMatrix UEqn Code:
Info<< "Reading field Up\n" << endl; Code:
/opt/OpenFOAM/OpenFOAM-v2012/src/finiteVolume/lnInclude/fvmSup.C:142:1: note: template argument deduction/substitution failed: Do you have any proposals or tips? Thank you in advance! Nikos |
The method fvm::Sp() is used to add a source term implicitly to an equation to be solved, meaning as matrix components on the "left" side of the equation. So its argument must be the field to be solved (U in your case). But now, you also try to add the Up field to the matrix, which is not solved for. So you have to put on the "right" side of the equation explicitly. So I guess, you have to split this fmv::Sp() term into two, one for with fvm::Sp(..., U) and one without fvm:Sp() and just Up.
|
Thank you Joachim for your reply. I have split the two terms as you proposed. For the second term (with the constant Up vector) I have tried to use fvm::Sp(..., Up) but I get:
Code:
--> FOAM FATAL ERROR: (openfoam-2012) Code:
fvc::Sp(..., Up) |
You are right, you need to use the explicit operator fvc::Sp() for Up, because it is obviously not the solution variable, so you cannot use the implicit fvm::Sp().
|
All times are GMT -4. The time now is 20:46. |