HI every former:
I have a problem about equation. Now I have a equation like this:
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- (add)
);
the function for "add" in the () is like this:
for X dirction: add(x)=x ; fro Y dirction: add(y)=u.component(y)*y; for Z dirction add(z)=0;
how can add for this? I really hope someone can heip me. Thank you in davance!

bojie zhang

nimasam

October 30, 2011 03:24

first declare a volVectorField add variable, then loop over it and fill it with your values.