/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2025-2026 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. 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. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see . Class Foam::Function2s::binaryDiffusionCoefficient Description Binary diffusion coefficient polynomial function of the log of temperature correcting the standard kinetic theory temperature dependence. \verbatim Dji = T^(3/2)*(c0 + c1*lnT + c2*lnT^2 + c3*lnT^3 + c4*lnT^4)/p \endverbatim SourceFiles binaryDiffusionCoefficient.C \*---------------------------------------------------------------------------*/ #ifndef binaryDiffusionCoefficient_H #define binaryDiffusionCoefficient_H #include "Function2.H" #include "FixedPolynomial.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { namespace Function2s { /*---------------------------------------------------------------------------*\ Class binaryDiffusionCoefficient Declaration \*---------------------------------------------------------------------------*/ class binaryDiffusionCoefficient : public FieldFunction2 { // Private Data //- Polynomial coefficients FixedPolynomial coeffs_; public: //- Runtime type information TypeName("binaryDiffusionCoefficient"); // Constructors //- Construct from name and coefficients binaryDiffusionCoefficient ( const word& name, const FixedPolynomial coeffs ); //- Construct from name and dictionary binaryDiffusionCoefficient ( const word& name, const unitSets& units, const dictionary& dict ); //- Construct and return a clone virtual tmp> clone() const { return tmp> ( new binaryDiffusionCoefficient(*this) ); } // Member Functions //- Binary diffusion coefficient function of pressure and temperature virtual scalar value(scalar p, scalar T) const { return T*sqrt(T)*coeffs_.value(log(T))/p; } //- Write the function coefficients virtual void write(Ostream& os, const unitSets& units) const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Function2s } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif // ************************************************************************* //