CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Errors in running "wmake" (https://www.cfd-online.com/Forums/openfoam-programming-development/126187-errors-running-wmake.html)

Thamali November 10, 2013 11:48

Errors in running "wmake"
 
Dear OpenFoamers,

I am running a solver edited for wood chip combustion.When running "wmake",I get the following error.Could someone help me please?
I cannot understand the reason for this.

Code:

rhoEqn.H:11:67: error: no match for ‘operator==’ in  ‘Foam::fvc::div(const surfaceScalarField&, const  Foam::GeometricField<Type, Foam::fvPatchField,  Foam::volMesh>&) [with Type = double, Foam::surfaceScalarField =  Foam::GeometricField<double, Foam::fvsPatchField,  Foam::surfaceMesh>]((*(const Foam::GeometricField<double,  Foam::fvPatchField, Foam::volMesh>*)(& rhos))) == Foam::operator-(const  Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh>  >&) [with Type = double, PatchField = Foam::fvPatchField, GeoMesh  = Foam::volMesh]()’
the rhoEqn.H is as follows;
Code:

fvScalarMatrix rhoEqn
(
    fvc::div(betaVg,phi1)
            ==
            dryingRate + charCombustionRate + pyrolysisRateCO + pyrolysisRateH2 + pyrolysisRateCO2 + pyrolysisRateCH4 + pyrolysisRateCxHyOz
);

all the "Rate" have been introduced as volScalarField using "IOobjects",for example "dryingRate" as follows;

Code:

volScalarField dryingRate
    (
    IOobject
    (
      "dryingRate",
      runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
    ),
    -scalar(2.822)*pow(scalar (10),-4)*(-Edry/ts)*beta*rhos*Ymoist*pow(mag(ts-T),(float) 7)
    );


jhoepken November 11, 2013 05:16

I suggest that you use
Code:

fvScalarMatrix rhoEqn
(
    fvm::div(betaVg,phi1)
            ==
            dryingRate + charCombustionRate + pyrolysisRateCO + pyrolysisRateH2 + pyrolysisRateCO2 + pyrolysisRateCH4 + pyrolysisRateCxHyOz
);

instead of

Code:

fvScalarMatrix rhoEqn
(
    fvc::div(betaVg,phi1)
            ==
            dryingRate + charCombustionRate + pyrolysisRateCO +  pyrolysisRateH2 + pyrolysisRateCO2 + pyrolysisRateCH4 +  pyrolysisRateCxHyOz
);

Did this resolve the issue?

Bernhard November 11, 2013 06:40

Quote:

Originally Posted by jhoepken (Post 461501)
I suggest that you use
[..]instead of
[..]

Hi Jens, I tried to find the difference between the two codes you posted, but is there a difference?

Thamali November 11, 2013 07:37

I think the amendment is "fvm" instead of "fvc" is it?

jhoepken November 11, 2013 08:06

Quote:

Originally Posted by Thamali (Post 461534)
I think the amendment is "fvm" instead of "fvc" is it?

Yep, you are right. I've screwed up the copy & paste ;)

Thamali November 11, 2013 08:40

Thanks a lot.I got the error only after you mentioned it.I cnnot get a fvScalarmatrix from an fvc.
I have another question,In this equation what will be solved,is it betaVg or phi1??
I am bit confused??
Thanks in advance.


All times are GMT -4. The time now is 05:58.