2018-01-19 22:53 GMT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000829OpenFOAM[All Projects] Bugpublic2014-02-18 10:04
Assigned Touser2 
PlatformLinuxOSMintOS Version14
Product Version 
Target VersionFixed in Version 
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:


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,
    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();

    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




hakostra (reporter)

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.



Thanks for the report - fixed by commit 8f8d4bf


hakostra (reporter)

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.



Thanks for the report - fixed by commit f08a413

-Issue History
Date Modified Username Field Change
2013-05-01 12:56 hakostra New Issue
2013-05-01 14:58 hakostra 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 hakostra Note Added: 0002582
2013-10-25 09:15 hakostra Status resolved => feedback
2013-10-25 09:15 hakostra 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
+Issue History