overloaded function type in div
hi foamers,
I am a newbie to openfoam, i am trying to implement a species transfer eq. on interfoam solver but i am getting errors while compiling my solver: Quote:
surfaceScalarField cPhi= ( fvc::interpolate((D1 - D2/He)/(alpha1 +(1-alpha1)/He))*fvc::snGrad(alpha1) )*mesh.magSf(); surfaceScalarField DPhi= ( fvc::snGrad(Di) )*mesh.magSf(); fvScalarMatrix Eqn ( fvm::ddt(C) +fvm::div(phi,C) -fvm::laplacian(fvc::interpolate(Di),C) -fvm::div(DPhi,C,Foam::fvc::scheme) +fvm::div(cPhi,C,Foam::fvc::scheme) ); Eqn.solve(); |
Can someone plz reply to my query, i m stuck :confused:
|
Greetings shash,
I think the problem is this part of the code: Code:
fvm::div(DPhi,C,Foam::fvc::scheme) +fvm::div(cPhi,C,Foam::fvc::scheme) Best regards, Bruno |
Hi bruno,
Thanks for the reply, ya you are correct , this part of the code is giving me lots of problems. first i tried fvm::div(DPhi,C,scheme) but it didn't work so i modified to fvm::div(DPhi,C,Foam::fvc::scheme) , Can you please suggest what modification should i make . :D |
Why aren't you simply using:
Code:
fvm::div(DPhi,C) The scheme is meant to be configured in the case folder, namely in file "system/fvSchemes"! |
hi bruno I tried that , thou i was able to successfully compile my solver but when i ran my case i got following errors and i assumed probably its b'coz i haven't specified the third parameter.
Quote:
|
Hi shash,
:confused: But the message says it all! All you need to do is to edit the file "system/fvSchemes" inside your case folder and find the group "divSchemes" and add this entry or similar: Code:
div(((interpolate(((rho-(rho|rho))|(alpha1+((1-alpha1)|rho))))*snGrad(alpha1))*magSf),C) Gauss linear; Code:
divSchemes Code:
divSchemes Bruno |
Hi bruno,
Thanks a very lot it works, I suppose i misinterpreted the errors that were displayed :D |
All times are GMT -4. The time now is 08:17. |