|
[Sponsors] |
June 15, 2013, 04:45 |
overloaded function type in div
|
#1 | |
Member
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 13 |
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(); |
||
June 16, 2013, 16:04 |
|
#2 |
Member
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 13 |
Can someone plz reply to my query, i m stuck
|
|
June 16, 2013, 16:23 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
June 16, 2013, 16:28 |
|
#4 |
Member
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 13 |
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 . |
|
June 16, 2013, 16:30 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
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"!
__________________
|
|
June 16, 2013, 16:40 |
|
#6 | |
Member
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 13 |
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:
|
||
June 17, 2013, 16:52 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi shash,
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 { div(rho*phi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; div((muEff*dev(T(grad(U))))) Gauss linear; } Code:
divSchemes { div(rho*phi,U) Gauss linear; div(phi,alpha) Gauss vanLeer; div(phirb,alpha) Gauss interfaceCompression; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; div(phi,R) Gauss upwind; div(R) Gauss linear; div(phi,nuTilda) Gauss upwind; div((muEff*dev(T(grad(U))))) Gauss linear; div(((interpolate(((rho-(rho|rho))|(alpha1+((1-alpha1)|rho))))*snGrad(alpha1))*magSf),C) Gauss linear; } Bruno
__________________
|
|
June 18, 2013, 12:21 |
|
#8 |
Member
shiv
Join Date: Jun 2012
Location: Lucknow, IN
Posts: 51
Rep Power: 13 |
Hi bruno,
Thanks a very lot it works, I suppose i misinterpreted the errors that were displayed |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 18:00 |
interFoam/kOmegaSST tank filling with printStackError/Mules | simpomann | OpenFOAM Running, Solving & CFD | 3 | February 17, 2014 17:06 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 00:35 |
Elements that limit the Courant number | skabilan | OpenFOAM Running, Solving & CFD | 9 | July 3, 2008 12:07 |