CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

error: expression list treated as compound expression in mem-initializer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2015, 15:50
Default error: expression list treated as compound expression in mem-initializer
  #1
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Hi everybody,

I'm trying to define a new twoPhase model for viscoelastic fluids. when I compiled it the following error appeared:

Code:
myViscoelasticTwoPhaseMixture/myViscoelasticTwoPhaseMixture.C:159:5: error: expression list treated as compound expression in mem-initializer [-fpermissive]
     )
     ^
the part of code which the error mentioned to is as below
Code:
Foam::myViscoelasticTwoPhaseMixture::myViscoelasticTwoPhaseMixture
(
    const volVectorField& U,
    const surfaceScalarField& phi,
    const word& alpha1Name
)
:
    transportModel(U, phi),

    phase1Name_("phase1"),
    phase2Name_("phase2"),

    nuModel1_
    (
        viscosityModel::New
        (
            "nu1",
            subDict(phase1Name_),
            U,
            phi
        )
    ),
    nuModel2_
    (
        viscosityModel::New
        (
            "nu2",
            subDict(phase2Name_),
            U,
            phi
        )
    ),

    U_(U),
    phi_(phi),

    alpha1_(U_.db().lookupObject<const volScalarField> (alpha1Name)),
    



    rho1_(nuModel1_->viscosityProperties().lookup("rho")),
    rho2_(nuModel2_->viscosityProperties().lookup("rho")),
    
    rheologyType_(nuModel1_->viscosityProperties().lookup("rheology")),

    etaS1_(nuModel1_->viscosityProperties().lookup("etaS")),
    etaS2_(nuModel2_->viscosityProperties().lookup("etaS")),

    etaP1_(nuModel1_->viscosityProperties().lookup("etaP")),
    etaP2_(nuModel2_->viscosityProperties().lookup("etaP")),

    lambda1_(nuModel1_->viscosityProperties().lookup("lambda")),
    lambda2_(nuModel2_->viscosityProperties().lookup("lambda")),

    L2_1_(nuModel1_->viscosityProperties().lookup("L2")),
    L2_2_(nuModel2_->viscosityProperties().lookup("L2")),


    tau_
    (
        IOobject
        (
            "tau",
            U.time().timeName(),
            U.mesh(),
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        U.mesh()
    ),

    etaS_
    (
        IOobject
        (
            "etaS",
            U_.time().timeName(),
            U_.db()
        ),
        U_.mesh(),
        etaS1_
    ),
    
    etaP_
    (
        IOobject
        (
            "etaP",
            U_.time().timeName(),
            U_.db()
        ),
        U_.mesh(),
        etaP1_
    ),

    limitedAlpha1
    (
        IOobject
        (
            "limitedAlpha1",
            U_.time().timeName(),
            U_.db()
        ),
        alpha1_
159    )

{
    calcEta();
}
Does anybody know what that error means? and how can I fix it?

Regards,
Mostafa
adambarfi is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
Help for the small implementation in turbulence model shipman OpenFOAM Programming & Development 25 March 19, 2014 10:08
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 00:09.