View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000829OpenFOAM[All Projects] Bugpublic2013-05-01 11:562014-02-18 10:04
Reporterhakostra 
Assigned Toandy 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinuxOSMintOS Version14
Product Version2.2.x 
Target VersionFixed in Version2.3.x 
Summary0000829: VoidFraction field always returns 0 (exactly)
DescriptionThe cloud function object "voidFraction" always calculate theta = 0 (exactly) (i.e. does not work).
Steps To ReproduceTake for example the "hopper" tutorial, and add the voidFraction function object to kinematicCloudProperties:

cloudFunctions
{
    voidFraction;
}

Run the tutorial. The voidFraction field is written, but is zero (exactly) at all times. Also see http://www.cfd-online.com/Forums/openfoam-solving/112612-cloud-function-objects-question.html [^] which is the same problem.
Additional InformationTo experiment and debug, I added a print to terminal at the end of the postMove-function in VoidFraction.C:

template<class CloudType>
void Foam::VoidFraction<CloudType>::postMove
(
    const parcelType& p,
    const label cellI,
    const scalar dt,
    bool&
)
{
    volScalarField& theta = thetaPtr_();

    theta[cellI] += dt*p.nParticle()*p.volume();
    Info<< "Post-move hook"<<endl;
}

I also did the same in the postEvolve function:

template<class CloudType>
void Foam::VoidFraction<CloudType>::postEvolve()
{
    volScalarField& theta = thetaPtr_();

    const fvMesh& mesh = this->owner().mesh();

    theta.internalField() /= mesh.time().deltaTValue()*mesh.V();

    CloudFunctionObject<CloudType>::postEvolve();
    Info<< "Post-evolve hook"<<endl;
}

The result is that the only message printed to terminal is the "Post-evolve hook" message, which is printed after the cloud has evolved. The "Post-move hook" message is never printed. I therefore suspect that postMove() is never called, and that this the reason for the kinematicCloudTheta field to be zero.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002146)
hakostra (reporter)
2013-05-01 13:58

I guess the solution to the problem is posted here: http://www.cfd-online.com/Forums/openfoam-solving/97629-dispersion-model-lagragian-particle-tracking-model-incompressible-flows-2.html#post420104 [^]

I have tried it, and it looks like it is working fine, although I have not yet verified the results.
(0002153)
andy (manager)
2013-05-03 11:07

Thanks for the report - fixed by commit 8f8d4bf
(0002582)
hakostra (reporter)
2013-10-25 08:15

I believe that this issue has re-surfaced. Repeat the same procedure, i.e. try to calculate the 'voidFraction' in the 'hopper' tutorial. The field is written, but is exactly zero at all times. Tested on latest Git verion, 2.2.x-9fbba21a924c.
(0002843)
andy (manager)
2014-02-18 10:04

Thanks for the report - fixed by commit f08a413

- Issue History
Date Modified Username Field Change
2013-05-01 11:56 hakostra New Issue
2013-05-01 13:58 hakostra Note Added: 0002146
2013-05-03 11:07 andy Note Added: 0002153
2013-05-03 11:07 andy Status new => resolved
2013-05-03 11:07 andy Fixed in Version => 2.2.x
2013-05-03 11:07 andy Resolution open => fixed
2013-05-03 11:07 andy Assigned To => andy
2013-10-25 08:15 hakostra Note Added: 0002582
2013-10-25 08:15 hakostra Status resolved => feedback
2013-10-25 08:15 hakostra Resolution fixed => reopened
2014-02-18 10:04 andy Note Added: 0002843
2014-02-18 10:04 andy Status feedback => resolved
2014-02-18 10:04 andy Fixed in Version 2.2.x => 2.3.x
2014-02-18 10:04 andy Resolution reopened => fixed