Henry Weller a9cb40b55b reactingEulerFoam::phasePair: Provide more convenient method to "loop" over pair
Checking a pair contains a particular phase and adding a contribution from the
"other" phase can now be written:

            if (pair.contains(phase))
            {
                const phaseModel& otherPhase = pair.other(phase);

                phiHbyAs[phasei] +=
                    fvc::interpolate(rAUs[phasei]*K)
                   *MRF.absolute(otherPhase.phi());

                HbyAs[phasei] += rAUs[phasei]*K*otherPhase.U();
            }

which previously would have been written as a loop over the pair and excluding
self reference:

            const phaseModel* phase1 = &pair.phase1();
            const phaseModel* phase2 = &pair.phase2();

            forAllConstIter(phasePair, pair, iter)
            {
                if (phase1 == &phase)
                {
                    phiHbyAs[phasei] +=
                        fvc::interpolate(rAUs[phasei]*K)
                       *MRF.absolute(phase2->phi());

                    HbyAs[phasei] += rAUs[phasei]*K*phase2->U();
                }

                Swap(phase1, phase2);
            }
2018-01-01 16:06:56 +00:00
2017-12-31 20:15:10 +00:00

README for OpenFOAM-dev

#

About OpenFOAM

OpenFOAM is a free, open source computational fluid dynamics (CFD) software package released by the OpenFOAM Foundation. It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.

Copyright

OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See the file COPYING in this directory or http://www.gnu.org/licenses/, for a description of the GNU General Public License terms under which you can copy the files.

Description
OpenFOAM Foundation repository for OpenFOAM version 6
Readme 86 MiB
Languages
C++ 49.4%
C 48.9%
Shell 1.5%
Liquid 0.2%