CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Error about IOobject compile

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 21, 2009, 04:16
Default Error about IOobject compile
  #1
Senior Member
 
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 8
chiven is on a distinguished road
I am trying to revise the incompressibleTwoPhaseMixture codes for interFoam solver.
I want to put the rho1 (dimensionedScalar) to rho3 (volScalarField), the code is shown in

Code:
    rho3_
    (
        IOobject
        (
            "rho3",
            U_.time().timeName(),
            U_.db(),
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        U_.mesh(),
        rho1_
    ),
    alpha1_(U_.db().lookupObject<const volScalarField> (alpha1Name)),
    nu_
    (
        IOobject
        (
            "nu",
            U_.time().timeName(),
            U_.db()
        ),
        U_.mesh(),
        dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0),
        calculatedFvPatchScalarField::typeName
    )                                                                                 ------line137 
{
    calcNu();
}
However, errors occur when compiling the codes.

HTML Code:
incompressibleTwoPhaseMixture/twoPhaseMixture.C:137: error: member initializer expression list treated as compound expression
incompressibleTwoPhaseMixture/twoPhaseMixture.C:137: error: invalid initialization of reference of type 'const Foam::volScalarField&' from expression of type 'Foam::dimensionedScalar'
make: *** [Make/linuxIA64GccDPOpt/twoPhaseMixture.o] Error 1
When I delete the part of rho3, it is OK?

Any comments? Thanks.
chiven
chiven is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM Rizwan Fluent UDF and Scheme Programming 32 May 8, 2015 06:05
DUNS compile with VC++, VF or gcc/g77 in PC Ali Irvi Main CFD Forum 17 August 6, 2014 09:19
Error compile file udf czfluent Fluent UDF and Scheme Programming 24 September 26, 2009 13:24
reconstructParMesh not working with an axisymetric case francesco OpenFOAM Bugs 4 May 8, 2009 05:49
Can someone PLEASE document the development version installation bernd OpenFOAM Installation 76 November 14, 2008 22:51


All times are GMT -4. The time now is 07:10.