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/)
-   -   Accessing alpha.oldTime() in multiphaseMixture (https://www.cfd-online.com/Forums/openfoam-solving/106149-accessing-alpha-oldtime-multiphasemixture.html)

tgvosk August 20, 2012 15:39

Accessing alpha.oldTime() in multiphaseMixture
 
Hello,

I am trying to access old time values of alpha in multiphaseMixture in multiphaseInterFoam but it does not seem to be accessible by the standard "oldTime()" convention. As a test, I have added the following in multiphaseMixture::solveAlphas in the base multiphaseInterFoam solver (no other modifications):

Code:

    forAllIter(PtrDictionary<phase>, phases_, iter)
    {
        phase& alpha = iter();

        //Added these two lines to see what's going on
        Info<< "Max delta(alpha"<<alpha.name()<<") = "
            << Foam::max(mag(alpha.field() - alpha.oldTime().field())) << endl;

        //the rest of the function is un-modified

This prints 0 every time, even when alpha is changing with time (running on the damBreak4phase example). Why is this not picking up the old time values, and how is MULES::explicitSolve then able to access those values? How should I be calling this to get the old time values??


All times are GMT -4. The time now is 15:51.