View Issue Details

IDProjectCategoryView StatusLast Update
0000829OpenFOAMBugpublic2014-02-18 10:04
Reporteruser507Assigned Touser2 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSMintOS Version14
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.

Activities

user507

2013-05-01 14:58

  ~0002146

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.

user2

2013-05-03 12:07

  ~0002153

Thanks for the report - fixed by commit 8f8d4bf

user507

2013-10-25 09:15

  ~0002582

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.

user2

2014-02-18 10:04

  ~0002843

Thanks for the report - fixed by commit f08a413

Issue History

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