solve equation
Hello everyone
I would like to solve a equation that looks like this: ddt(f) + div(F) = k*laplacian(f) f is a volScalarField F is a volVectorField and function of f k is a scalar How can I solve this in openFoam? Is it like this? fvScalarMatrix feqn ( fvm::ddt(f) +fvm::div(F) k*fvm::laplacian(f) ); solve feqn; Thanks! 
Did you try it like this? You can just compile your solver, which then gives you at an error at solve feqn; Afaik it should be solve(feqn); or feqn.solve().

I think you have to write the divergence term as:
fvm::div(F1, f) where F = F1*f Best, 
Thank you for your replies!
"solve feqn" should be "feqn.solve()" of course, you are right :). But actually I don't get to solve anything yet. I'm still stuck at the div part. I tried fvm::div(F1,f), but I get the error no matching function for call to ‘div(Foam::volVectorField&, Foam::volScalarField&)’ Should it maybe be fvc::div? 
Sorry, I missed the fact F was a volVectorField. If you can assume F lagged, you can use fvc::div(F), which discretises it explicitly.

All times are GMT 4. The time now is 12:41. 