CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Using lcsMassFraction function object for icoUncoupledKinematicParcelFoam (https://www.cfd-online.com/Forums/openfoam-solving/154471-using-lcsmassfraction-function-object-icouncoupledkinematicparcelfoam.html)

Mojtaba.a June 15, 2015 11:01

Using lcsMassFraction function object for icoUncoupledKinematicParcelFoam
 
Hi,
Before, I had used lcsMassFraction(cloudName) from swak4Foam function objects to convert lagrangian particle concentration into eulerian mass fraction. This was how I did that and it worked perfectly:

Code:

    mu
    {
        type expressionField;
        expression "18.6";
    dimension [1 -1 -1 0 0 0 0];
        fieldName mu;
        autowrite true;
    }

    rho
    {
        type expressionField;
        expression "1.25";
    dimension [1 -3 0 0 0 0 0];
        fieldName rho;
        autowrite true;
    }

    particles
    {
        type evolveKinematicCloud;
        cloudName particleCloud;
        g "down" [0 1 -2 0 0 0 0] (0 -9.81 0 );
        rhoName rho;
        muName mu;
        UName U;
    }

    massFractionKinematic
    {
        type expressionField;
        autowrite true;
        expression "lcsMassFraction(particleCloud)";
        outputControl timeStep;
        outputInterval 1;
        fieldName massFraction;
    }

However when I try to use it in solver icoUncoupledKinematicParcelFoam, like this:

Code:

massFractionKinematic
    {
        type expressionField;
        autowrite true;
        expression "lcsMassFraction(kinematicCloud)";
        outputControl timeStep;
        outputInterval 1;
        fieldName massFraction;
    }

I get the following error:

Code:

swak4Foam: Setting default mesh


Available clouds in region0
                Name | Type
-------------------------------------------------------------
      kinematicCloud | Cloud<basicKinematicCollidingParcel>
-------------------------------------------------------------
Cloud kinematicCloud has type Cloud<basicKinematicCollidingParcel> typeid:N4Foam14CollidingCloudINS_14KinematicCloudINS_5CloudINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEE


--> FOAM FATAL ERROR:
No matching cloud kinematicCloud found
Supported cloud types (typeid):
4
(
N4Foam13ReactingCloudINS_11ThermoCloudINS_14KinematicCloudINS_5CloudINS_14ReactingParcelINS_12ThermoParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEE
N4Foam11ThermoCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEE
N4Foam14KinematicCloudINS_5CloudINS_15KinematicParcelINS_8particleEEEEEEE
N4Foam23ReactingMultiphaseCloudINS_13ReactingCloudINS_11ThermoCloudINS_14KinematicCloudINS_5CloudINS_24ReactingMultiphaseParcelINS_14ReactingParcelINS_12ThermoParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEEEEEE
)


    From function Plugin function lcsMassFraction
    in file lcsMassFractionPluginFunction.C at line 102.

FOAM exiting

Any suggestions is appreciated.
Thanks.

chpjz0391 May 23, 2016 01:57

Quote:

Originally Posted by Mojtaba.a (Post 550426)
Hi,
Before, I had used lcsMassFraction(cloudName) from swak4Foam function objects to convert lagrangian particle concentration into eulerian mass fraction. This was how I did that and it worked perfectly:

Code:

    mu
    {
        type expressionField;
        expression "18.6";
    dimension [1 -1 -1 0 0 0 0];
        fieldName mu;
        autowrite true;
    }

    rho
    {
        type expressionField;
        expression "1.25";
    dimension [1 -3 0 0 0 0 0];
        fieldName rho;
        autowrite true;
    }

    particles
    {
        type evolveKinematicCloud;
        cloudName particleCloud;
        g "down" [0 1 -2 0 0 0 0] (0 -9.81 0 );
        rhoName rho;
        muName mu;
        UName U;
    }

    massFractionKinematic
    {
        type expressionField;
        autowrite true;
        expression "lcsMassFraction(particleCloud)";
        outputControl timeStep;
        outputInterval 1;
        fieldName massFraction;
    }

However when I try to use it in solver icoUncoupledKinematicParcelFoam, like this:

Code:

massFractionKinematic
    {
        type expressionField;
        autowrite true;
        expression "lcsMassFraction(kinematicCloud)";
        outputControl timeStep;
        outputInterval 1;
        fieldName massFraction;
    }

I get the following error:

Code:

swak4Foam: Setting default mesh


Available clouds in region0
                Name | Type
-------------------------------------------------------------
      kinematicCloud | Cloud<basicKinematicCollidingParcel>
-------------------------------------------------------------
Cloud kinematicCloud has type Cloud<basicKinematicCollidingParcel> typeid:N4Foam14CollidingCloudINS_14KinematicCloudINS_5CloudINS_15CollidingParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEE


--> FOAM FATAL ERROR:
No matching cloud kinematicCloud found
Supported cloud types (typeid):
4
(
N4Foam13ReactingCloudINS_11ThermoCloudINS_14KinematicCloudINS_5CloudINS_14ReactingParcelINS_12ThermoParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEE
N4Foam11ThermoCloudINS_14KinematicCloudINS_5CloudINS_12ThermoParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEE
N4Foam14KinematicCloudINS_5CloudINS_15KinematicParcelINS_8particleEEEEEEE
N4Foam23ReactingMultiphaseCloudINS_13ReactingCloudINS_11ThermoCloudINS_14KinematicCloudINS_5CloudINS_24ReactingMultiphaseParcelINS_14ReactingParcelINS_12ThermoParcelINS_15KinematicParcelINS_8particleEEEEEEEEEEEEEEEEEEE
)


    From function Plugin function lcsMassFraction
    in file lcsMassFractionPluginFunction.C at line 102.

FOAM exiting

Any suggestions is appreciated.
Thanks.

have you solved your problem?


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