diff --git a/README.html b/README.html index 1e96c05e6a5d50dbca0e3e6d557f16f65f3667c9..18c3e0747e22c2731a6d1cf5a45fe35bd330f0e6 100644 --- a/README.html +++ b/README.html @@ -102,7 +102,7 @@ lang="en" xml:lang="en"> <h2 id="sec-1"><span class="section-number-2">1</span> About OpenFOAM </h2> <div class="outline-text-2" id="text-1"> -<p> OpenFOAM is a free, open source computational fluid dynamcis (CFD) software +<p> 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 diff --git a/README.org b/README.org index c107d878700b12fd945892107a4279039581b1a6..84fd18c0cf4abb20bbd493bcd65765d057233e95 100644 --- a/README.org +++ b/README.org @@ -8,7 +8,7 @@ # Copyright (c) 2011 OpenFOAM Foundation. * About OpenFOAM - OpenFOAM is a free, open source computational fluid dynamcis (CFD) software + 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 diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H index b9a47a917d36b8e8a51509d7a168664e134c2a4b..1f12fc9a121bcdafe7f9ea906210bbd83d6c140c 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H @@ -27,7 +27,7 @@ - (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1 + ( - he1.name() == "e" + he1.name() == thermo1.phasePropertyName("e") ? fvc::div(alphaPhi1, p) : -dalpha1pdt )/rho1 @@ -49,7 +49,7 @@ - (fvc::ddt(alpha2) + fvc::div(alphaPhi2))*K2 + ( - he2.name() == "e" + he2.name() == thermo2.phasePropertyName("e") ? fvc::div(alphaPhi2, p) : -dalpha2pdt )/rho2 diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H index a20f53e014692a610610356ab2441b092ac885de..601ff0e919a5b3537f01799ae3a425ede07dae43 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/alphaEqn.H @@ -104,6 +104,35 @@ surfaceScalarField alphaPhi2("alphaPhi" + phase2Name, phi2); { alphaPhi1 = alphaPhic1; } + + /* + // Legacy semi-implicit and potentially unbounded form + fvScalarMatrix alpha1Eqn + ( + fvm::ddt(alpha1) + + fvm::div(phic, alpha1, alphaScheme) + + fvm::div + ( + -fvc::flux(-phir, alpha2, alpharScheme), + alpha1, + alpharScheme + ) + == + fvm::Sp(Sp, alpha1) + Su + ); + + alpha1Eqn.relax(); + alpha1Eqn.solve(); + + if (nAlphaSubCycles > 1) + { + alphaPhi1 += (runTime.deltaT()/totalDeltaT)*alpha1Eqn.flux(); + } + else + { + alphaPhi1 = alpha1Eqn.flux(); + } + */ } if (g0.value() > 0.0) diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index 5dff309b57c1f4d17df847dc175e7305f04376d9..112a30218896b55c184c7d8740956f602a8b9474 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -26,6 +26,7 @@ License #include "phaseModel.H" #include "diameterModel.H" #include "fixedValueFvPatchFields.H" +#include "slipFvPatchFields.H" #include "surfaceInterpolate.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -118,7 +119,11 @@ Foam::phaseModel::phaseModel forAll(U_.boundaryField(), i) { - if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])) + if + ( + isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]) + || isA<slipFvPatchVectorField>(U_.boundaryField()[i]) + ) { phiTypes[i] = fixedValueFvPatchScalarField::typeName; } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C index 543927e29b59a54e9e8025d20b35d52175bd7641..f74ef12513cd362a9d7971c5c8e44b693fe72b92 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,6 +26,7 @@ License #include "phaseModel.H" #include "diameterModel.H" #include "fixedValueFvPatchFields.H" +#include "slipFvPatchFields.H" #include "surfaceInterpolate.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -152,7 +153,11 @@ Foam::phaseModel::phaseModel forAll(U_.boundaryField(), i) { - if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])) + if + ( + isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]) + || isA<slipFvPatchVectorField>(U_.boundaryField()[i]) + ) { phiTypes[i] = fixedValueFvPatchScalarField::typeName; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index aebc7ba6cb01645ed9f638c4cb80501bfe8b0f3b..85ee12b3164f08028dc53ea236b4c0b0dc9f0fac 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,6 +25,7 @@ License #include "phaseModel.H" #include "fixedValueFvPatchFields.H" +#include "slipFvPatchFields.H" #include "surfaceInterpolate.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -114,7 +115,11 @@ Foam::phaseModel::phaseModel forAll(U_.boundaryField(), i) { - if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])) + if + ( + isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i]) + || isA<slipFvPatchVectorField>(U_.boundaryField()[i]) + ) { phiTypes[i] = fixedValueFvPatchScalarField::typeName; } diff --git a/applications/test/Matrix/Test-Matrix.C b/applications/test/Matrix/Test-Matrix.C index 600d0ad60f5e54a88acddcd32ca4e67dd2a73b7f..40e79d15e980ea12187f10cee7809723a3ad5a32 100644 --- a/applications/test/Matrix/Test-Matrix.C +++ b/applications/test/Matrix/Test-Matrix.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "SquareMatrix.H" +#include "scalarMatrices.H" #include "vector.H" using namespace Foam; @@ -49,15 +49,15 @@ int main(int argc, char *argv[]) Info<< max(hmm) << endl; Info<< min(hmm) << endl; - SquareMatrix<scalar> hmm2(3, 1.0); + SquareMatrix<scalar> hmm2(3, 3, 1.0); hmm = hmm2; Info<< hmm << endl; - SquareMatrix<scalar> hmm3(Sin); + //SquareMatrix<scalar> hmm3(Sin); - Info<< hmm3 << endl; + //Info<< hmm3 << endl; SquareMatrix<scalar> hmm4; @@ -70,7 +70,65 @@ int main(int argc, char *argv[]) hmm4 = hmm5; Info<< hmm5 << endl; - Info<< "End\n" << endl; + { + scalarSymmetricSquareMatrix symmMatrix(3, 3, 0); + + symmMatrix(0, 0) = 4; + symmMatrix(1, 0) = 12; + symmMatrix(1, 1) = 37; + symmMatrix(2, 0) = -16; + symmMatrix(2, 1) = -43; + symmMatrix(2, 2) = 98; + + Info<< "Symmetric Square Matrix = " << symmMatrix << endl; + + Info<< "Inverse = " << inv(symmMatrix) << endl; + Info<< "Determinant = " << det(symmMatrix) << endl; + + scalarSymmetricSquareMatrix symmMatrix2(symmMatrix); + LUDecompose(symmMatrix2); + + Info<< "Inverse = " << invDecomposed(symmMatrix2) << endl; + Info<< "Determinant = " << detDecomposed(symmMatrix2) << endl; + + scalarDiagonalMatrix rhs(3, 0); + rhs[0] = 1; + rhs[1] = 2; + rhs[2] = 3; + + LUsolve(symmMatrix, rhs); + + Info<< "Decomposition = " << symmMatrix << endl; + Info<< "Solution = " << rhs << endl; + } + + { + scalarSquareMatrix squareMatrix(3, 3, 0); + + squareMatrix[0][0] = 4; + squareMatrix[0][1] = 12; + squareMatrix[0][2] = -16; + squareMatrix[1][0] = 12; + squareMatrix[1][1] = 37; + squareMatrix[1][2] = -43; + squareMatrix[2][0] = -16; + squareMatrix[2][1] = -43; + squareMatrix[2][2] = 98; + + Info<< nl << "Square Matrix = " << squareMatrix << endl; + + scalarDiagonalMatrix rhs(3, 0); + rhs[0] = 1; + rhs[1] = 2; + rhs[2] = 3; + + LUsolve(squareMatrix, rhs); + + Info<< "Decomposition = " << squareMatrix << endl; + Info<< "Solution = " << rhs << endl; + } + + Info<< "\nEnd\n" << endl; return 0; } diff --git a/etc/config/settings.csh b/etc/config/settings.csh index be510764fd5cade17fdfbe5f81a27020790a24a5..2264c4ee03850cf37610384befd7b4238ba99bd2 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -226,7 +226,7 @@ case ThirdParty: breaksw case Gcc47: case Gcc47++0x: - set gcc_version=gcc-4.7.0 + set gcc_version=gcc-4.7.2 set gmp_version=gmp-5.0.4 set mpfr_version=mpfr-3.1.0 set mpc_version=mpc-0.9 diff --git a/etc/config/settings.sh b/etc/config/settings.sh index 12d6f4b9004d13dbe48f3636234b14eef19b6cb0..5a77479b568f7e653a9fb4b0e81293f1357d6748 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -247,7 +247,7 @@ OpenFOAM | ThirdParty) mpc_version=mpc-0.9 ;; Gcc47 | Gcc47++0x) - gcc_version=gcc-4.7.0 + gcc_version=gcc-4.7.2 gmp_version=gmp-5.0.4 mpfr_version=mpfr-3.1.0 mpc_version=mpc-0.9 diff --git a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H index 031320a457962367c1882c87cf4a26cd4d85653a..a065b3aec3b2f5f0b6f970eed9363429e513f8bb 100644 --- a/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H +++ b/src/OpenFOAM/matrices/DiagonalMatrix/DiagonalMatrix.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,7 +76,7 @@ public: // Member functions - //- Invert the diaganol matrix and return itself + //- Invert the diagonal matrix and return itself DiagonalMatrix<Type>& invert(); }; diff --git a/src/OpenFOAM/matrices/Matrix/Matrix.H b/src/OpenFOAM/matrices/Matrix/Matrix.H index dd55db770cb1abc5d79b7154e88f185495171f5f..005982d9e0052f6a3056631cda362523b15c80b9 100644 --- a/src/OpenFOAM/matrices/Matrix/Matrix.H +++ b/src/OpenFOAM/matrices/Matrix/Matrix.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -221,7 +221,6 @@ template<class Form, class Type> Form operator* const Matrix<Form, Type>& ); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C new file mode 100644 index 0000000000000000000000000000000000000000..bb6bea65c7a3a0cb0712752dca88ca0201b99af1 --- /dev/null +++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.C @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2013 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "SymmetricSquareMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +Foam::SymmetricSquareMatrix<Type> Foam::invDecomposed +( + const SymmetricSquareMatrix<Type>& matrix +) +{ + SymmetricSquareMatrix<Type> inv(matrix.n(), matrix.n(), 0.0); + + for (label i = 0; i < matrix.n(); ++i) + { + inv[i][i] = 1.0/matrix[i][i]; + + for (label j = 0; j < i; ++j) + { + scalar sum = 0.0; + + for (label k = j; k < i; k++) + { + sum -= matrix[i][k]*inv[k][j]; + } + + inv[i][j] = sum/matrix[i][i]; + } + } + + return inv.T()*inv; +} + + +template<class Type> +Foam::SymmetricSquareMatrix<Type> Foam::inv +( + const SymmetricSquareMatrix<Type>& matrix +) +{ + SymmetricSquareMatrix<Type> matrixTmp(matrix); + + LUDecompose(matrixTmp); + + return invDecomposed(matrixTmp); +} + + +template<class Type> +Foam::scalar Foam::detDecomposed(const SymmetricSquareMatrix<Type>& matrix) +{ + scalar diagProduct = 1.0; + + for (label i = 0; i < matrix.n(); ++i) + { + diagProduct *= matrix[i][i]; + } + + return sqr(diagProduct); +} + + +template<class Type> +Foam::scalar Foam::det(const SymmetricSquareMatrix<Type>& matrix) +{ + SymmetricSquareMatrix<Type> matrixTmp = matrix; + + LUDecompose(matrixTmp); + + return detDecomposed(matrixTmp); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H new file mode 100644 index 0000000000000000000000000000000000000000..69832500784a49cf54cbe845de2227025e62a14c --- /dev/null +++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrix.H @@ -0,0 +1,126 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2013 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 <http://www.gnu.org/licenses/>. + +Class + Foam::SymmetricSquareMatrix + +Description + A templated 2D square symmetric matrix of objects of \<T\>, where the + n x n matrix dimension is known and used for subscript bounds checking, etc. + +SourceFiles + SymmetricSquareMatrixI.H + SymmetricSquareMatrix.C + +\*---------------------------------------------------------------------------*/ + +#ifndef SymmetricSquareMatrix_H +#define SymmetricSquareMatrix_H + +#include "SquareMatrix.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class SymmetricSquareMatrix Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class SymmetricSquareMatrix +: + public Matrix<SymmetricSquareMatrix<Type>, Type> +{ + +public: + + // Constructors + + //- Null constructor. + inline SymmetricSquareMatrix(); + + //- Construct given number of rows/columns. + inline SymmetricSquareMatrix(const label n); + + //- Construct with given number of rows/columns + inline SymmetricSquareMatrix(const label m, const label n); + + //- Construct with given number of rows/columns + // and value for all elements. + inline SymmetricSquareMatrix(const label m, const label n, const Type&); + + //- Construct from Istream. + inline SymmetricSquareMatrix(Istream&); + + //- Clone + inline autoPtr<SymmetricSquareMatrix<Type> > clone() const; + + + //- Return subscript-checked row of Matrix. + inline Type& operator()(const label r, const label c); + + //- Return subscript-checked row of constant Matrix. + inline const Type& operator()(const label r, const label c) const; +}; + + +// Global functions + +//- Return the LU decomposed SymmetricSquareMatrix inverse +template<class Type> +SymmetricSquareMatrix<Type> invDecomposed(const SymmetricSquareMatrix<Type>&); + +//- Return the SymmetricSquareMatrix inverse +template<class Type> +SymmetricSquareMatrix<Type> inv(const SymmetricSquareMatrix<Type>&); + +//- Return the LU decomposed SymmetricSquareMatrix det +template<class Type> +scalar detDecomposed(const SymmetricSquareMatrix<Type>&); + +//- Return the SymmetricSquareMatrix det +template<class Type> +scalar det(const SymmetricSquareMatrix<Type>&); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +# include "SymmetricSquareMatrixI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "SymmetricSquareMatrix.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H new file mode 100644 index 0000000000000000000000000000000000000000..1dee0ab9d088fefed07122e722f59502a8ff70e2 --- /dev/null +++ b/src/OpenFOAM/matrices/SymmetricSquareMatrix/SymmetricSquareMatrixI.H @@ -0,0 +1,139 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2013 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix() +: + Matrix<SymmetricSquareMatrix<Type>, Type>() +{} + + +template<class Type> +inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix(const label n) +: + Matrix<SymmetricSquareMatrix<Type>, Type>(n, n) +{} + + +template<class Type> +inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix +( + const label m, + const label n +) +: + Matrix<SymmetricSquareMatrix<Type>, Type>(m, n) +{ + if (m != n) + { + FatalErrorIn + ( + "SymmetricSquareMatrix<Type>::SymmetricSquareMatrix" + "(const label m, const label n)" + ) << "m != n for constructing a symmetric square matrix" + << exit(FatalError); + } +} + + +template<class Type> +inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix +( + const label m, + const label n, + const Type& t +) +: + Matrix<SymmetricSquareMatrix<Type>, Type>(m, n, t) +{ + if (m != n) + { + FatalErrorIn + ( + "SymmetricSquareMatrix<Type>::SymmetricSquareMatrix" + "(const label m, const label n, const Type&)" + ) << "m != n for constructing a symmetric square matrix" + << exit(FatalError); + } +} + + +template<class Type> +inline Foam::SymmetricSquareMatrix<Type>::SymmetricSquareMatrix(Istream& is) +: + Matrix<SymmetricSquareMatrix<Type>, Type>(is) +{} + + +template<class Type> +inline Foam::autoPtr<Foam::SymmetricSquareMatrix<Type> > +Foam::SymmetricSquareMatrix<Type>::clone() const +{ + return autoPtr<SymmetricSquareMatrix<Type> > + ( + new SymmetricSquareMatrix<Type>(*this) + ); +} + + +template<class Type> +inline Type& Foam::SymmetricSquareMatrix<Type>::operator() +( + const label r, + const label c +) +{ + if (r > c) + { + return this->operator[](r)[c]; + } + else + { + return this->operator[](c)[r]; + } +} + + +template<class Type> +inline const Type& Foam::SymmetricSquareMatrix<Type>::operator() +( + const label r, + const label c +) const +{ + if (r > c) + { + return this->operator[](r)[c]; + } + else + { + return this->operator[](c)[r]; + } +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 8be08c4f1587fcb6733b73cc6bf89252373243e2..aacea11eaf3ae43b9323c464e3ad27601562354a 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -70,7 +70,7 @@ Foam::GAMGAgglomeration::GAMGAgglomeration const dictionary& controlDict ) : - MeshObject<lduMesh, Foam::TopologicalMeshObject, GAMGAgglomeration>(mesh), + MeshObject<lduMesh, Foam::GeometricMeshObject, GAMGAgglomeration>(mesh), maxLevels_(50), diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H index b85704ee3e802bc48b1f13a3127b60a8ce3c049c..c6ad6d2c5c1d6dd51ded14639ab60282f4ef8911 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H @@ -58,7 +58,7 @@ class lduMatrix; class GAMGAgglomeration : - public MeshObject<lduMesh, TopologicalMeshObject, GAMGAgglomeration> + public MeshObject<lduMesh, GeometricMeshObject, GAMGAgglomeration> { protected: diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C index 58b196da091399339655c4e1b20b26a99420a833..68a6955d71fa5a182d845096210f088294679672 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,56 @@ void Foam::LUDecompose } +void Foam::LUDecompose(scalarSymmetricSquareMatrix& matrix) +{ + // Store result in upper triangular part of matrix + label size = matrix.n(); + + // Set upper triangular parts to zero. + for (label j = 0; j < size; j++) + { + for (label k = j + 1; k < size; k++) + { + matrix[j][k] = 0.0; + } + } + + for (label j = 0; j < size; j++) + { + scalar d = 0.0; + + for (label k = 0; k < j; k++) + { + scalar s = 0.0; + + for (label i = 0; i < k; i++) + { + s += matrix[i][k]*matrix[i][j]; + } + + s = (matrix[j][k] - s)/matrix[k][k]; + + matrix[k][j] = s; + matrix[j][k] = s; + + d += sqr(s); + } + + d = matrix[j][j] - d; + + if (d < 0.0) + { + FatalErrorIn("Foam::LUDecompose(scalarSymmetricSquareMatrix&)") + << "Matrix is not symmetric positive-definite. Unable to " + << "decompose." + << abort(FatalError); + } + + matrix[j][j] = sqrt(d); + } +} + + // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // void Foam::multiply diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H index 0830b33ae67f49ff0b44d587db8cb66daa4f7061..3eecda8ebf582d8d19c22686921be2d55a82c5eb 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,10 @@ Class Description Scalar matrices + LUDecompose for scalarSymmetricSquareMatrix implements the Cholesky + decomposition method from JAMA, a public-domain library developed at NIST, + available at http://math.nist.gov/tnt/index.html + SourceFiles scalarMatrices.C scalarMatricesTemplates.C @@ -38,6 +42,7 @@ SourceFiles #include "RectangularMatrix.H" #include "SquareMatrix.H" +#include "SymmetricSquareMatrix.H" #include "DiagonalMatrix.H" #include "scalarField.H" #include "labelList.H" @@ -49,21 +54,22 @@ namespace Foam typedef RectangularMatrix<scalar> scalarRectangularMatrix; typedef SquareMatrix<scalar> scalarSquareMatrix; +typedef SymmetricSquareMatrix<scalar> scalarSymmetricSquareMatrix; typedef DiagonalMatrix<scalar> scalarDiagonalMatrix; //- Solve the matrix using Gaussian elimination with pivoting, // returning the solution in the source template<class Type> -void solve(scalarSquareMatrix& matrix, Field<Type>& source); +void solve(scalarSquareMatrix& matrix, List<Type>& source); //- Solve the matrix using Gaussian elimination with pivoting // and return the solution template<class Type> void solve ( - Field<Type>& psi, + List<Type>& psi, const scalarSquareMatrix& matrix, - const Field<Type>& source + const List<Type>& source ); //- LU decompose the matrix with pivoting @@ -73,6 +79,9 @@ void LUDecompose labelList& pivotIndices ); +//- LU decompose the matrix into a lower (L) and upper (U) part. U = L.T() +void LUDecompose(scalarSymmetricSquareMatrix& matrix); + //- LU back-substitution with given source, returning the solution // in the source template<class Type> @@ -80,13 +89,28 @@ void LUBacksubstitute ( const scalarSquareMatrix& luMmatrix, const labelList& pivotIndices, - Field<Type>& source + List<Type>& source +); + +//- LU back-substitution with given source, returning the solution +// in the source. Specialised for symmetric square matrices that have been +// decomposed into LU where U = L.T() as pivoting is not required +template<class Type> +void LUBacksubstitute +( + const scalarSymmetricSquareMatrix& luMmatrix, + List<Type>& source ); //- Solve the matrix using LU decomposition with pivoting // returning the LU form of the matrix and the solution in the source template<class Type> -void LUsolve(scalarSquareMatrix& matrix, Field<Type>& source); +void LUsolve(scalarSquareMatrix& matrix, List<Type>& source); + +//- Solve the matrix using LU decomposition returning the LU form of the matrix +// and the solution in the source, where U = L.T() +template<class Type> +void LUsolve(scalarSymmetricSquareMatrix& matrix, List<Type>& source); template<class Form, class Type> void multiply diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C index 0489ed012d00f3dce16f9378e98209e4d6e98657..7aaaabb695e920b9fddab782785c9e8f74cfed9f 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatricesTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,6 +25,7 @@ License #include "scalarMatrices.H" #include "Swap.H" +#include "ListOps.H" // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -32,7 +33,7 @@ template<class Type> void Foam::solve ( scalarSquareMatrix& tmpMatrix, - Field<Type>& sourceSol + List<Type>& sourceSol ) { label n = tmpMatrix.n(); @@ -103,9 +104,9 @@ void Foam::solve template<class Type> void Foam::solve ( - Field<Type>& psi, + List<Type>& psi, const scalarSquareMatrix& matrix, - const Field<Type>& source + const List<Type>& source ) { scalarSquareMatrix tmpMatrix = matrix; @@ -119,7 +120,7 @@ void Foam::LUBacksubstitute ( const scalarSquareMatrix& luMatrix, const labelList& pivotIndices, - Field<Type>& sourceSol + List<Type>& sourceSol ) { label n = luMatrix.n(); @@ -163,11 +164,57 @@ void Foam::LUBacksubstitute } +template<class Type> +void Foam::LUBacksubstitute +( + const scalarSymmetricSquareMatrix& luMatrix, + List<Type>& sourceSol +) +{ + label n = luMatrix.n(); + + label ii = 0; + + for (register label i=0; i<n; i++) + { + Type sum = sourceSol[i]; + const scalar* __restrict__ luMatrixi = luMatrix[i]; + + if (ii != 0) + { + for (label j=ii-1; j<i; j++) + { + sum -= luMatrixi[j]*sourceSol[j]; + } + } + else if (sum != pTraits<Type>::zero) + { + ii = i+1; + } + + sourceSol[i] = sum/luMatrixi[i]; + } + + for (register label i=n-1; i>=0; i--) + { + Type sum = sourceSol[i]; + const scalar* __restrict__ luMatrixi = luMatrix[i]; + + for (register label j=i+1; j<n; j++) + { + sum -= luMatrixi[j]*sourceSol[j]; + } + + sourceSol[i] = sum/luMatrixi[i]; + } +} + + template<class Type> void Foam::LUsolve ( scalarSquareMatrix& matrix, - Field<Type>& sourceSol + List<Type>& sourceSol ) { labelList pivotIndices(matrix.n()); @@ -176,6 +223,18 @@ void Foam::LUsolve } +template<class Type> +void Foam::LUsolve +( + scalarSymmetricSquareMatrix& matrix, + List<Type>& sourceSol +) +{ + LUDecompose(matrix); + LUBacksubstitute(matrix, sourceSol); +} + + template<class Form, class Type> void Foam::multiply ( diff --git a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C b/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C index b5e74a78c0bdcedcaa283210ab2c909ce7dfafb8..e46962bd3137506d8afb671c92f6899ac0850c72 100644 --- a/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C +++ b/src/OpenFOAM/primitives/functions/TimeDataEntry/TimeDataEntry/TimeDataEntry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -60,8 +60,13 @@ Foam::TimeDataEntry<Type>::TimeDataEntry : time_(tde.time_), name_(tde.name_), - entry_(tde.entry_->clone().ptr()) -{} + entry_() +{ + if (tde.entry_.valid()) + { + entry_.reset(tde.entry_->clone().ptr()); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.C b/src/dynamicMesh/motionSmoother/motionSmoother.C index a89d1cf60fd1fa503884def286feb4463dcbc258..c7d5d28e765ada2e25f0562519b16b5b5c7c4d7d 100644 --- a/src/dynamicMesh/motionSmoother/motionSmoother.C +++ b/src/dynamicMesh/motionSmoother/motionSmoother.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,7 +37,7 @@ License namespace Foam { -defineTypeNameAndDebug(motionSmoother, 0); + defineTypeNameAndDebug(motionSmoother, 0); } @@ -65,7 +65,11 @@ void Foam::motionSmoother::testSyncPositions { FatalErrorIn ( - "motionSmoother::testSyncPositions(const pointField&)" + "motionSmoother::testSyncPositions" + "(" + "const pointField&, " + "const scalar" + ")" ) << "On point " << i << " point:" << fld[i] << " synchronised point:" << syncedFld[i] << abort(FatalError); @@ -245,7 +249,7 @@ void Foam::motionSmoother::checkFld(const pointScalarField& fld) {} else { - FatalErrorIn("motionSmoother::checkFld") + FatalErrorIn("motionSmoother::checkFld(const pointScalarField&)") << "Problem : point:" << pointI << " value:" << val << abort(FatalError); } @@ -870,7 +874,7 @@ Foam::tmp<Foam::scalarField> Foam::motionSmoother::movePoints if (mesh_.globalData().parallel()) { - WarningIn("motionSmoother::movePoints(pointField& newPoints)") + WarningIn("motionSmoother::movePoints(pointField&)") << "2D mesh-motion probably not correct in parallel" << endl; } @@ -981,7 +985,18 @@ bool Foam::motionSmoother::scaleMesh { if (!smoothMesh && adaptPatchIDs_.empty()) { - FatalErrorIn("motionSmoother::scaleMesh(const bool") + FatalErrorIn + ( + "motionSmoother::scaleMesh" + "(" + "labelList&, " + "const List<labelPair>&, " + "const dictionary&, " + "const dictionary&, " + "const bool, " + "const label" + ")" + ) << "You specified both no movement on the internal mesh points" << " (smoothMesh = false)" << nl << "and no movement on the patch (adaptPatchIDs is empty)" << nl @@ -1062,7 +1077,7 @@ bool Foam::motionSmoother::scaleMesh newPoints = oldPoints_ + totalDisplacement.internalField(); } - Info<< "Moving mesh using diplacement scaling :" + Info<< "Moving mesh using displacement scaling :" << " min:" << gMin(scale_.internalField()) << " max:" << gMax(scale_.internalField()) << endl; @@ -1225,7 +1240,7 @@ void Foam::motionSmoother::updateMesh() { FatalErrorIn ( - "motionSmoother::motionSmoother" + "motionSmoother::updateMesh" ) << "Patch " << patches[patchI].name() << " has wrong boundary condition " << displacement_.boundaryField()[patchI].type() diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index c9dd621d3e2dc711a3daa7aa85611fd90b01faec..d45cc25f2981635ba95b50ba0a862a9c21636bdd 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -601,12 +601,13 @@ void Foam::MULES::limiter { fvsPatchScalarField& lambdaPf = lambdaBf[patchi]; const scalarField& phiCorrfPf = phiCorrBf[patchi]; + const fvPatchScalarField& psiPf = psiBf[patchi]; if (isA<wedgeFvPatch>(mesh.boundary()[patchi])) { lambdaPf = 0; } - else + else if (psiPf.coupled()) { const labelList& pFaceCells = mesh.boundary()[patchi].faceCells(); @@ -627,6 +628,32 @@ void Foam::MULES::limiter } } } + else + { + const labelList& pFaceCells = + mesh.boundary()[patchi].faceCells(); + const scalarField& phiBDPf = phiBDBf[patchi]; + + forAll(lambdaPf, pFacei) + { + // Limit outlet faces only + if (phiBDPf[pFacei] > 0) + { + label pfCelli = pFaceCells[pFacei]; + + if (phiCorrfPf[pFacei] > 0.0) + { + lambdaPf[pFacei] = + min(lambdaPf[pFacei], lambdap[pfCelli]); + } + else + { + lambdaPf[pFacei] = + min(lambdaPf[pFacei], lambdam[pfCelli]); + } + } + } + } } syncTools::syncFaceList(mesh, allLambda, minEqOp<scalar>()); diff --git a/src/fvOptions/sources/derived/MRFSource/MRFSource.H b/src/fvOptions/sources/derived/MRFSource/MRFSource.H index f2a84dee302657c3838064a3a2b8db76511b5781..7dccdf8c7cd77feda190ee5ec8a239b453503f6f 100644 --- a/src/fvOptions/sources/derived/MRFSource/MRFSource.H +++ b/src/fvOptions/sources/derived/MRFSource/MRFSource.H @@ -8,10 +8,10 @@ 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 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::fv::MRFSource @@ -28,14 +27,18 @@ Class Description Multiple Reference Frame (MRF) source + \heading Source usage + Example usage: + \verbatim + MRFSourceCoeffs + { + origin (0 0 0); + axis (0 0 1); + omega 104.72; + } + \endverbatim - MRFSourceCoeffs - { - origin (0 0 0); - axis (0 0 1); - omega 104.72; - } SourceFiles MRFSource.C diff --git a/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H b/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H index ca6734402db4e2f6d46f5d9548883aded4054587..3d95d8f70fdc6549d25afe0a58ee619bd4f58512 100644 --- a/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H +++ b/src/fvOptions/sources/derived/actuationDiskSource/actuationDiskSource.H @@ -8,10 +8,10 @@ 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 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::fv::actuationDiskSource @@ -29,27 +28,36 @@ Description Actuation disk source Constant values for momentum source for actuation disk - - T = 2*rho*A*sqr(Uo)*a*(1-a) - U1 = (1 -a)Uo + \f[ + T = 2 \rho A U_{o}^2 a (1-a) + \f] + and + \f[ + U_1 = (1 - a)U_{o} + \f] where: - A: disk area - Uo: upstream velocity - a: 1 - Cp/Ct - U1: velocity at the disk - - Sources described by: - - actuationDiskSourceCoeffs - { - fieldNames (U); // names of fields to apply source - diskDir (-1 0 0); // disk direction - Cp 0.1; // power coefficient - Ct 0.5; // thrust coefficient - diskArea 5.0; // disk area - upstreamPoint (0 0 0); // upstream point - } + \vartable + A | disk area + U_o | upstream velocity + a | 1 - Cp/Ct + U_1 | velocity at the disk + \endvartable + + \heading Source usage + + Example usage: + \verbatim + actuationDiskSourceCoeffs + { + fieldNames (U); // names of fields to apply source + diskDir (-1 0 0); // disk direction + Cp 0.1; // power coefficient + Ct 0.5; // thrust coefficient + diskArea 5.0; // disk area + upstreamPoint (0 0 0); // upstream point + } + \endverbatim SourceFiles diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C index bf80820439f7cb7191a5d08825980b44cb1c84eb..7b98263f57ebab6c5e0c6cfca364b66a396a5cd4 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C @@ -51,7 +51,7 @@ namespace fv // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::fv::effectivenessHeatExchangerSource::init() +void Foam::fv::effectivenessHeatExchangerSource::initialise() { const faceZone& fZone = mesh_.faceZones()[zoneID_]; @@ -186,20 +186,23 @@ Foam::fv::effectivenessHeatExchangerSource::effectivenessHeatExchangerSource << nl << exit(FatalError); } - coeffs_.lookup("fieldNames") >> fieldNames_; - applied_.setSize(fieldNames_.size(), false); + fieldNames_.setSize(1, "energy"); + applied_.setSize(1, false); eTable_.reset(new interpolation2DTable<scalar>(coeffs_)); - init(); - - Info<< " - creating effectivenessHeatExchangerSource: " - << this->name() << endl; + initialise(); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +bool Foam::fv::effectivenessHeatExchangerSource::alwaysApply() const +{ + return true; +} + + void Foam::fv::effectivenessHeatExchangerSource::addSup ( fvMatrix<scalar>& eqn, @@ -209,6 +212,11 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup const basicThermo& thermo = mesh_.lookupObject<basicThermo>("thermophysicalProperties"); + if (eqn.psi().name() != thermo.he().name()) + { + return; + } + const surfaceScalarField Cpf(fvc::interpolate(thermo.Cp())); const surfaceScalarField& phi = diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H index 5ca26fbdbe0de05948a4e5e2073ad20b99ee9bbe..d5ee68b61ff60d6f98c652573b4eae3bae47c390 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.H @@ -8,10 +8,10 @@ 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 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 @@ -19,38 +19,50 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::fv::effectivenessHeatExchangerSource Description - Heat exchanger source model. - The total heat exchange is given by: + Heat exchanger source model, in which the heat exchanger is defined as a + selection of cells. - Qt = e(phi, secondaryMassFlowRate) - * (secondaryInletT - primaryInletT) - * phi*Cp; + The total heat exchange source is given by: + \f[ + Q_t = e(\phi, \dot{m}_2) (T_2 - T_1) \phi c_p + \f] where: - e(phi, secondaryMassFlowRate) is a effectivenes table in function of - mass net flux coming imto the heat exchanger (phi) and - secondaryMassFlowRate - - Then the distribution inside the hear exchanger is given by: - - Qcell = Vcell*|Ucell|*(Tcell - Tref)/sum(Vcell*|Ucell|*(Tcell - Tref)); + \vartable + Q_t | total heat source + e(\phi,\dot{m}_2) | effectivenes table + \phi | net mass flux entering heat exchanger [kg/s] + \dot{m}_2 | secondary mass flow rate [kg/s] + T_1 | primary inlet temperature [K] + T_2 | secondary inlet temperature [K] + c_p | specific heat capacity [J/kg/K] + \endvartable + + + The distribution inside the hear exchanger is given by: + \f[ + Q_c = \frac{V_c |U_c| (T_c - T_{ref})}{\sum(V_c |U_c| (T_c - T_{ref}))} + \f] where: - Qcell is the source for cell - Vcell is the volume of the cell - Ucell is the local cell velocity - Tcell is the local call temperature - Tref : min(T) or max(T) in the cell zone depending on the sign of Qt - - Example : - + \vartable + Q_c | source for cell + V_c | volume of the cell [m3] + U_c | local cell velocity [m/s] + T_c | local call temperature [K] + T_{ref} | min or max(T) in cell zone depending on the sign of Q_t [K] + \endvartable + + \heading Source usage + + Example usage: + \verbatim effectivenessHeatExchangerSource1 { type effectivenessHeatExchangerSource; @@ -60,7 +72,6 @@ Description effectivenessHeatExchangerSourceCoeffs { - fieldNames (e); secondaryMassFlowRate 1.0; secondaryInletT 336; primaryInletT 293; @@ -69,13 +80,14 @@ Description fileName "effTable"; } } + \endverbatim - Note: - the table with name "fileName" should have the same units as - secondaryMassFlowRate and kg/s for phi - faceZone is the faces at the inlet of the cellzone, it needs to be - created with flip map flags. It is used to integrate the net mass flow - rate into the heat exchanger +Note +- the table with name "fileName" should have the same units as the + secondary mass flow rate and kg/s for phi +- faceZone is the faces at the inlet of the cellzone, it needs to be + created with flip map flags. It is used to integrate the net mass flow + rate into the heat exchanger SourceFiles @@ -98,7 +110,7 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class effectivenessHeatExchangerSource Declaration + Class effectivenessHeatExchangerSource Declaration \*---------------------------------------------------------------------------*/ class effectivenessHeatExchangerSource @@ -110,7 +122,7 @@ protected: // Protected data - //- Secondary flow mass rate [Kg/s] + //- Secondary flow mass rate [kg/s] scalar secondaryMassFlowRate_; //- Inlet secondary temperature [K] @@ -119,8 +131,8 @@ protected: //- Primary air temperature at the heat exchanger inlet [K] scalar primaryInletT_; - //- 2D look up table efficiency = F(total primary mass flow rate [Kg/s] - //, secondary mass flow rate [Kg/s]) + //- 2D look up table efficiency = function of primary and secondary + // mass flow rates [kg/s] autoPtr<interpolation2DTable<scalar> > eTable_; //- Name of velocity field; default = U @@ -144,8 +156,7 @@ protected: //- Local list of patch ID per face labelList facePatchId_; - //- List of +1/-1 representing face flip map - // (1 use as is, -1 negate) + //- List of +1/-1 representing face flip map (1 use as is, -1 negate) labelList faceSign_; //- Area of the face zone @@ -166,10 +177,10 @@ private: //- Disallow default bitwise assignment void operator=(const effectivenessHeatExchangerSource&); - //- Init heat exchanger source model - void init(); + //- Initialise heat exchanger source model + void initialise(); - //- Calculate total area of faceZone accross procesors + //- Calculate total area of faceZone accross processors void calculateTotalArea(scalar& area); @@ -198,6 +209,8 @@ public: // Member Functions + virtual bool alwaysApply() const; + // Public Functions diff --git a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.H b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.H index 2bd602ac1f4b41205ad964cefe23df6082c02cf4..a89503ecf7fac326fa00cc1d430d03bfb31afafa 100644 --- a/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.H +++ b/src/fvOptions/sources/derived/explicitPorositySource/explicitPorositySource.H @@ -8,10 +8,10 @@ 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 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 @@ -19,8 +19,7 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::fv::explicitPorositySource @@ -28,23 +27,26 @@ Class Description Explicit porosity source - Sources described by, for example using the DarcyForchheimer model: + \heading Source usage - explicitPorositySourceCoeffs + Example usage, here employing the Darcy-Forchheimer model: + \verbatim + explicitPorositySourceCoeffs + { + type DarcyForchheimer; + DarcyForchheimerCoeffs { - type DarcyForchheimer; - DarcyForchheimerCoeffs + d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); + f f [0 -1 0 0 0 0 0] (0 0 0); + + coordinateSystem { - d d [0 -2 0 0 0 0 0] (5e7 -1000 -1000); - f f [0 -1 0 0 0 0 0] (0 0 0); - - coordinateSystem - { - e1 (0.70710678 0.70710678 0); - e2 (0 0 1); - } + e1 (0.70710678 0.70710678 0); + e2 (0 0 1); } } + } + \endverbatim Note: The porous region must be selected as a cellZone. diff --git a/src/fvOptions/sources/derived/pressureGradientExplicitSource/pressureGradientExplicitSource.H b/src/fvOptions/sources/derived/pressureGradientExplicitSource/pressureGradientExplicitSource.H index 47a48a24c04a8a810645e01104f6256525af8361..0b8390f9f900f58d564baf8f6e1bbc6507bf1f97 100644 --- a/src/fvOptions/sources/derived/pressureGradientExplicitSource/pressureGradientExplicitSource.H +++ b/src/fvOptions/sources/derived/pressureGradientExplicitSource/pressureGradientExplicitSource.H @@ -29,15 +29,17 @@ Description Note: Currently only handles kinematic pressure - Sources described by: - - pressureGradientExplicitSourceCoeffs - { - fieldNames (U); // name of velocity field - Ubar (10.0 0 0); // desired average velocity - gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient - flowDir (1 0 0); // flow direction - } + \heading Source usage + Example usage: + \verbatim + pressureGradientExplicitSourceCoeffs + { + fieldNames (U); // name of velocity field + Ubar (10.0 0 0); // desired average velocity + gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient + flowDir (1 0 0); // flow direction + } + \endverbatim SourceFiles diff --git a/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H b/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H index 02a2970e8c812cb806c11bec24719c172ccbc317..3fb20e45d555341b35eaee16709ea424fef87b43 100644 --- a/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H +++ b/src/fvOptions/sources/derived/radialActuationDiskSource/radialActuationDiskSource.H @@ -8,10 +8,10 @@ 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 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 @@ -19,42 +19,52 @@ License for more details. You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class Foam::fv::radialActuationDiskSource Description - Actuation disk zone definition. - Constant values for momentum source for actuation disk + Actuation disk source including radial thrust - T = 2*rho*A*sqr(Uo)*a*(1-a) - U1 = (1 -a)Uo + Constant values for momentum source for actuation disk + \f[ + T = 2 \rho A U_{o}^2 a (1-a) + \f] + and + \f[ + U_1 = (1 - a)U_{o} + \f] where: - A: disk area - Uo: upstream velocity - a: 1 - Cp/Ct - U1: velocity at the disk + \vartable + A | disk area + U_o | upstream velocity + a | 1 - Cp/Ct + U_1 | velocity at the disk + \endvartable The thrust is distributed by a radial function: - - thrust(r) = T*(C0 + C1*r^2 + C2*r^4) - - Sources described by: - - actuationDiskSourceCoeffs - { - fieldName U; // name of field to apply source - diskDir (-1 0 0); // disk direction - Cp 0.1; // power coefficient - Ct 0.5; // thrust coefficient - diskArea 5.0; // disk area - coeffs (0.1 0.5 0.01); // radial distribution coefficients - upstreamPoint (0 0 0); // upstream point - } + \f[ + thrust(r) = T (C_0 + C_1 r^2 + C_2 r^4) + \f] + + \heading Source usage + + Example usage: + \verbatim + actuationDiskSourceCoeffs + { + fieldName U; // name of field to apply source + diskDir (-1 0 0); // disk direction + Cp 0.1; // power coefficient + Ct 0.5; // thrust coefficient + diskArea 5.0; // disk area + coeffs (0.1 0.5 0.01); // radial distribution coefficients + upstreamPoint (0 0 0); // upstream point + } + \endverbatim SourceFiles diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C index 7896ae5dda5d69fe7467cf5d4388d82e19c51427..9ce537b7663b9ca23a1f4ea8df812655672966cf 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C @@ -203,7 +203,7 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) { const label faceI = pp.start() + j; const label own = cellAddr[mesh_.faceOwner()[faceI]]; - const bool nbr = nbrFaceCellAddr[faceI - nInternalFaces]; + const label nbr = nbrFaceCellAddr[faceI - nInternalFaces]; const vector nf = Sfp[j]/magSfp[j]; if ((own != -1) && (nbr == -1) && ((nf & axis) > tol)) diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.H b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.H index 70775644dbd0a092165d1cf5f93e586f3033504f..1ac30fcfb8a434ee3bf0621cd7fc88b673c16e49 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.H +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.H @@ -30,52 +30,54 @@ Description Source approximates the mean effects of rotor forces on a cylindrical region within the domain - Sources described by: + \heading Source usage - rotorDiskSourceCoeffs - { - fieldNames (U); // names of fields on which to apply source - rhoName rho; // density field if compressible case - nBlades 3; // number of blades - tipEffect 0.96; // normalised radius above which lift = 0 + Example usage: + \verbatim + rotorDiskSourceCoeffs + { + fieldNames (U); // names of fields on which to apply source + rhoName rho; // density field if compressible case + nBlades 3; // number of blades + tipEffect 0.96; // normalised radius above which lift = 0 - inletFlowType local; // inlet flow type specification + inletFlowType local; // inlet flow type specification - geometryMode auto; // geometry specification + geometryMode auto; // geometry specification - refDirection (-1 0 0); // reference direction - // - used as reference for psi angle + refDirection (-1 0 0); // reference direction + // - used as reference for psi angle - trimModel fixed; // fixed || targetForce + trimModel fixed; // fixed || targetForce - flapCoeffs - { - beta0 0; // coning angle [deg] - beta1c 0; // lateral flapping coeff (cos coeff) - beta2s 0; // longitudinal flapping coeff (sin coeff) - } + flapCoeffs + { + beta0 0; // coning angle [deg] + beta1c 0; // lateral flapping coeff (cos coeff) + beta2s 0; // longitudinal flapping coeff (sin coeff) + } - blade - { - ... - } + blade + { + ... + } - profiles - { - ... - } + profiles + { + ... } + } + \endverbatim Where: - - geometryMode = - auto : determine rototor co-ord system from cells - specified : specified co-ord system - - inletFlowType = - fixed : specified velocity - surfaceNormal : specified normal velocity (positive towards rotor) - local : use local flow conditions + Valid options for the \c geometryMode entry include: + - auto : determine rototor co-ord system from cells + - specified : specified co-ord system + + Valid options for the \c inletFlowType entry include: + - fixed : specified velocity + - local : use local flow conditions + - surfaceNormal : specified normal velocity (positive towards rotor) SourceFiles diff --git a/src/fvOptions/sources/general/codedSource/CodedSource.H b/src/fvOptions/sources/general/codedSource/CodedSource.H index bbc93e5aec12e250703111d58fb8a24e340bc767..e414bc1e02c3289bb05187d025fdf97e0386e02a 100644 --- a/src/fvOptions/sources/general/codedSource/CodedSource.H +++ b/src/fvOptions/sources/general/codedSource/CodedSource.H @@ -25,52 +25,46 @@ Class Foam::fv::codedSource Description - Constructs on-the-fly a new fvOption. + Constructs on-the-fly source - E.g. in system/fvOptions + \heading Source usage - momentumSource + Example usage: + \verbatim + vectorCodedSourceCoeffs { - type vectorCodedSource; - active on; //on/off switch - timeStart 0.0; //start time - duration 1000000.0; //duration - selectionMode all; //cellSet // points //cellZone - - vectorCodedSourceCoeffs - { - fieldNames (U); - redirectType ramp; - - codeCorrect - #{ - Pout<< "**codeCorrect**" << endl; - #}; - - codeAddSup - #{ - Pout<< "**codeAddSup**" << endl; - #}; - - codeSetValue - #{ - Pout<< "**codeSetValue**" << endl; - #}; - - // Dummy entry. Make dependent on above to trigger recompilation - code - #{ - $codeCorrect - $codeAddSup - $codeSetValue - #}; - } - - // Dummy entry - rampCoeffs - {} + fieldNames (U); + redirectType ramp; + + codeCorrect + #{ + Pout<< "**codeCorrect**" << endl; + #}; + + codeAddSup + #{ + Pout<< "**codeAddSup**" << endl; + #}; + + codeSetValue + #{ + Pout<< "**codeSetValue**" << endl; + #}; + + // Dummy entry. Make dependent on above to trigger recompilation + code + #{ + $codeCorrect + $codeAddSup + $codeSetValue + #}; } + // Dummy entry + rampCoeffs + {} + \endverbatim + SourceFiles codedSource.C diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H index 0a806fcdf920abccc3a2e07c53afb8764c9c7314..f956b8fb3e15ccecc5f87f9bbc45fc0e295a8c7f 100644 --- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H +++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.H @@ -51,7 +51,7 @@ Description epsilon (1.5 0); } } - \verbatim + \endverbatim Valid options for the \c volumeMode entry include: - absolute: values are given as \<quantity\> diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index 9e0539c615b9545f5bcc60cd7d2329c07b432ea2..0e0c93ed1b3ceda489c9fe3cdd842adc553c3acf 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -27,6 +27,7 @@ License #include "ListOps.H" #include "Time.H" #include "volFields.H" +#include "surfaceFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -160,7 +161,7 @@ void Foam::fieldValues::fieldValueDelta::write() if (log_) { - Info<< type() << " output:" << endl; + Info<< type() << " " << name_ << " output:" << endl; } bool found = false; diff --git a/src/postProcessing/functionObjects/fvTools/doc/fvToolsFunctionObjectsDoc.H b/src/postProcessing/functionObjects/fvTools/doc/fvToolsFunctionObjectsDoc.H new file mode 100644 index 0000000000000000000000000000000000000000..8d403604a5df338dce3bc44e8dd230c865599a39 --- /dev/null +++ b/src/postProcessing/functionObjects/fvTools/doc/fvToolsFunctionObjectsDoc.H @@ -0,0 +1,30 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 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 <http://www.gnu.org/licenses/>. + +\defgroup grpFVFunctionObjects Finite volume tools function objects +@{ + \ingroup grpFunctionObjects + This group contains finite-volume tools-based function objects +@} + +\*---------------------------------------------------------------------------*/ diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H index 2c59b705bc88a33ffda54d0d2a415990041c9655..a2263c83c1815ffccd2d8320674e941a757c9be2 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/doc/thermalBaffleBoundaryConditionsDoc.H @@ -23,9 +23,9 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -\defgroup grpThermoBoundaryConditions Thermo baffle boundary conditions +\defgroup grpThermoBaffleBoundaryConditions Thermo baffle boundary conditions @{ - \ingroup grpRegionBoundaryConditions + \ingroup grpThermoBoundaryConditions This group contains thermo baffle model boundary conditions @} diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H index f5bfc1394244f414b03fd458f778bb3c5037aefb..3f24e11e4a9cb4f8622dfb687c1e6eee6a50d840 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H @@ -47,8 +47,8 @@ namespace Foam defineTemplateTypeNameAndDebugWithName \ ( \ SS##Schem##Comp##SThermo##GThermo, \ - (#SS"<" + word(Schem::typeName_()) \ - + "," + SThermo::typeName() + "," + GThermo::typeName() + ">").c_str(), \ + (#SS"<"#Schem"<"#Comp"," + SThermo::typeName() + "," \ + + GThermo::typeName() + ">>").c_str(), \ 0 \ ); \ \