From 6cf770cbee5c87ae6071f1c38a0c808a8c035482 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 18 Nov 2012 22:43:56 +0000 Subject: [PATCH 1/4] CrankNicholsonDdtScheme: renamed CrankNicolsonDdtScheme --- etc/controlDict | 2 +- src/finiteVolume/Make/files | 2 +- .../derived/advective/advectiveFvPatchField.C | 6 +-- .../derived/advective/advectiveFvPatchField.H | 2 +- .../waveSurfacePressureFvPatchScalarField.C | 6 +-- .../waveSurfacePressureFvPatchScalarField.H | 2 +- .../waveTransmissiveFvPatchField.C | 2 +- .../CrankNicolsonDdtScheme.C} | 54 +++++++++---------- .../CrankNicolsonDdtScheme.H} | 32 +++++------ .../CrankNicolsonDdtSchemes.C} | 4 +- src/finiteVolume/finiteVolume/fvm/fvm.H | 2 +- .../squareBump/constant/polyMesh/boundary | 1 + .../squareBump/system/fvSchemes | 2 +- 13 files changed, 59 insertions(+), 58 deletions(-) rename src/finiteVolume/finiteVolume/ddtSchemes/{CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C => CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C} (95%) rename src/finiteVolume/finiteVolume/ddtSchemes/{CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.H => CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H} (90%) rename src/finiteVolume/finiteVolume/ddtSchemes/{CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C => CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C} (94%) diff --git a/etc/controlDict b/etc/controlDict index d5c1fdb755..a34d4a1977 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -112,7 +112,7 @@ DebugSwitches ConeInjection 0; Constant 0; ConstantRateDevolatilisation 0; - CrankNicholson 0; + CrankNicolson 0; CrossPowerLaw 0; Cs 0; DIC 0; diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 0d510f9019..3428d62597 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -310,7 +310,7 @@ $(ddtSchemes)/localEulerDdtScheme/localEulerDdtSchemes.C $(ddtSchemes)/backwardDdtScheme/backwardDdtSchemes.C $(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtScheme.C $(ddtSchemes)/boundedBackwardDdtScheme/boundedBackwardDdtSchemes.C -$(ddtSchemes)/CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C +$(ddtSchemes)/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C $(ddtSchemes)/boundedDdtScheme/boundedDdtSchemes.C d2dt2Schemes = finiteVolume/d2dt2Schemes diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C index 5764676b2a..86c7aaa146 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C @@ -28,7 +28,7 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "EulerDdtScheme.H" -#include "CrankNicholsonDdtScheme.H" +#include "CrankNicolsonDdtScheme.H" #include "backwardDdtScheme.H" @@ -229,7 +229,7 @@ void Foam::advectiveFvPatchField::updateCoeffs() if ( ddtScheme == fv::EulerDdtScheme::typeName - || ddtScheme == fv::CrankNicholsonDdtScheme::typeName + || ddtScheme == fv::CrankNicolsonDdtScheme::typeName ) { this->refValue() = @@ -266,7 +266,7 @@ void Foam::advectiveFvPatchField::updateCoeffs() if ( ddtScheme == fv::EulerDdtScheme::typeName - || ddtScheme == fv::CrankNicholsonDdtScheme::typeName + || ddtScheme == fv::CrankNicolsonDdtScheme::typeName ) { this->refValue() = field.oldTime().boundaryField()[patchi]; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H index 5c62df1049..3b4e0f1b5c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H @@ -31,7 +31,7 @@ Description This boundary condition provides an advective outflow condition, based on solving DDt(psi, U) = 0 at the boundary. - The standard (Euler, backward, CrankNicholson) time schemes are + The standard (Euler, backward, CrankNicolson) time schemes are supported. Additionally an optional mechanism to relax the value at the boundary to a specified far-field value is provided which is switched on by specifying the relaxation length-scale \c lInf and the diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C index 8149855235..34d04b7d40 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C @@ -30,7 +30,7 @@ License #include "surfaceFields.H" #include "uniformDimensionedFields.H" #include "EulerDdtScheme.H" -#include "CrankNicholsonDdtScheme.H" +#include "CrankNicolsonDdtScheme.H" #include "backwardDdtScheme.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -45,7 +45,7 @@ namespace Foam >::names[] = { fv::EulerDdtScheme::typeName_(), - fv::CrankNicholsonDdtScheme::typeName_(), + fv::CrankNicolsonDdtScheme::typeName_(), fv::backwardDdtScheme::typeName_() }; } @@ -183,7 +183,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() switch (timeScheme) { case tsEuler: - case tsCrankNicholson: + case tsCrankNicolson: { zetap = zeta.oldTime().boundaryField()[patchI] + dZetap; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H index 3babe28eff..ad2820dd50 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H @@ -103,7 +103,7 @@ public: enum timeSchemeType { tsEuler, - tsCrankNicholson, + tsCrankNicolson, tsBackward }; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C index 00bd7e339f..ca19c5d8ab 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C @@ -28,7 +28,7 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "EulerDdtScheme.H" -#include "CrankNicholsonDdtScheme.H" +#include "CrankNicolsonDdtScheme.H" #include "backwardDdtScheme.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C similarity index 95% rename from src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C rename to src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C index dfd7c878ff..53d106a75d 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "CrankNicholsonDdtScheme.H" +#include "CrankNicolsonDdtScheme.H" #include "surfaceInterpolate.H" #include "fvcDiv.H" #include "fvMatrices.H" @@ -42,7 +42,7 @@ namespace fv template template -CrankNicholsonDdtScheme::DDt0Field::DDt0Field +CrankNicolsonDdtScheme::DDt0Field::DDt0Field ( const IOobject& io, const fvMesh& mesh @@ -60,7 +60,7 @@ CrankNicholsonDdtScheme::DDt0Field::DDt0Field template template -CrankNicholsonDdtScheme::DDt0Field::DDt0Field +CrankNicolsonDdtScheme::DDt0Field::DDt0Field ( const IOobject& io, const fvMesh& mesh, @@ -74,7 +74,7 @@ CrankNicholsonDdtScheme::DDt0Field::DDt0Field template template -label CrankNicholsonDdtScheme::DDt0Field:: +label CrankNicolsonDdtScheme::DDt0Field:: startTimeIndex() const { return startTimeIndex_; @@ -83,7 +83,7 @@ startTimeIndex() const template template -GeoField& CrankNicholsonDdtScheme::DDt0Field:: +GeoField& CrankNicolsonDdtScheme::DDt0Field:: operator()() { return *this; @@ -92,7 +92,7 @@ operator()() template template -void CrankNicholsonDdtScheme::DDt0Field:: +void CrankNicolsonDdtScheme::DDt0Field:: operator=(const GeoField& gf) { GeoField::operator=(gf); @@ -101,8 +101,8 @@ operator=(const GeoField& gf) template template -CrankNicholsonDdtScheme::DDt0Field& -CrankNicholsonDdtScheme::ddt0_ +CrankNicolsonDdtScheme::DDt0Field& +CrankNicolsonDdtScheme::ddt0_ ( const word& name, const dimensionSet& dims @@ -183,7 +183,7 @@ CrankNicholsonDdtScheme::ddt0_ template template -bool CrankNicholsonDdtScheme::evaluate +bool CrankNicolsonDdtScheme::evaluate ( const DDt0Field& ddt0 ) const @@ -193,7 +193,7 @@ bool CrankNicholsonDdtScheme::evaluate template template -scalar CrankNicholsonDdtScheme::coef_ +scalar CrankNicolsonDdtScheme::coef_ ( const DDt0Field& ddt0 ) const @@ -211,7 +211,7 @@ scalar CrankNicholsonDdtScheme::coef_ template template -scalar CrankNicholsonDdtScheme::coef0_ +scalar CrankNicolsonDdtScheme::coef0_ ( const DDt0Field& ddt0 ) const @@ -229,7 +229,7 @@ scalar CrankNicholsonDdtScheme::coef0_ template template -dimensionedScalar CrankNicholsonDdtScheme::rDtCoef_ +dimensionedScalar CrankNicolsonDdtScheme::rDtCoef_ ( const DDt0Field& ddt0 ) const @@ -240,7 +240,7 @@ dimensionedScalar CrankNicholsonDdtScheme::rDtCoef_ template template -dimensionedScalar CrankNicholsonDdtScheme::rDtCoef0_ +dimensionedScalar CrankNicolsonDdtScheme::rDtCoef0_ ( const DDt0Field& ddt0 ) const @@ -251,7 +251,7 @@ dimensionedScalar CrankNicholsonDdtScheme::rDtCoef0_ template template -tmp CrankNicholsonDdtScheme::offCentre_ +tmp CrankNicolsonDdtScheme::offCentre_ ( const GeoField& ddt0 ) const @@ -281,7 +281,7 @@ const FieldField& ff template tmp > -CrankNicholsonDdtScheme::fvcDdt +CrankNicolsonDdtScheme::fvcDdt ( const dimensioned& dt ) @@ -343,7 +343,7 @@ CrankNicholsonDdtScheme::fvcDdt template tmp > -CrankNicholsonDdtScheme::fvcDdt +CrankNicolsonDdtScheme::fvcDdt ( const GeometricField& vf ) @@ -432,7 +432,7 @@ CrankNicholsonDdtScheme::fvcDdt template tmp > -CrankNicholsonDdtScheme::fvcDdt +CrankNicolsonDdtScheme::fvcDdt ( const dimensionedScalar& rho, const GeometricField& vf @@ -522,7 +522,7 @@ CrankNicholsonDdtScheme::fvcDdt template tmp > -CrankNicholsonDdtScheme::fvcDdt +CrankNicolsonDdtScheme::fvcDdt ( const volScalarField& rho, const GeometricField& vf @@ -622,7 +622,7 @@ CrankNicholsonDdtScheme::fvcDdt template tmp > -CrankNicholsonDdtScheme::fvmDdt +CrankNicolsonDdtScheme::fvmDdt ( const GeometricField& vf ) @@ -705,7 +705,7 @@ CrankNicholsonDdtScheme::fvmDdt template tmp > -CrankNicholsonDdtScheme::fvmDdt +CrankNicolsonDdtScheme::fvmDdt ( const dimensionedScalar& rho, const GeometricField& vf @@ -787,7 +787,7 @@ CrankNicholsonDdtScheme::fvmDdt template tmp > -CrankNicholsonDdtScheme::fvmDdt +CrankNicolsonDdtScheme::fvmDdt ( const volScalarField& rho, const GeometricField& vf @@ -877,8 +877,8 @@ CrankNicholsonDdtScheme::fvmDdt template -tmp::fluxFieldType> -CrankNicholsonDdtScheme::fvcDdtPhiCorr +tmp::fluxFieldType> +CrankNicolsonDdtScheme::fvcDdtPhiCorr ( const volScalarField& rA, const GeometricField& U, @@ -964,8 +964,8 @@ CrankNicholsonDdtScheme::fvcDdtPhiCorr template -tmp::fluxFieldType> -CrankNicholsonDdtScheme::fvcDdtPhiCorr +tmp::fluxFieldType> +CrankNicolsonDdtScheme::fvcDdtPhiCorr ( const volScalarField& rA, const volScalarField& rho, @@ -1158,7 +1158,7 @@ CrankNicholsonDdtScheme::fvcDdtPhiCorr { FatalErrorIn ( - "CrankNicholsonDdtScheme::fvcDdtPhiCorr" + "CrankNicolsonDdtScheme::fvcDdtPhiCorr" ) << "dimensions of phi are not correct" << abort(FatalError); @@ -1169,7 +1169,7 @@ CrankNicholsonDdtScheme::fvcDdtPhiCorr template -tmp CrankNicholsonDdtScheme::meshPhi +tmp CrankNicolsonDdtScheme::meshPhi ( const GeometricField& vf ) diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.H b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H similarity index 90% rename from src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.H rename to src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H index 7c99436401..315072306c 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.H +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see . Class - Foam::fv::CrankNicholsonDdtScheme + Foam::fv::CrankNicolsonDdtScheme Description - Second-oder CrankNicholson implicit ddt using the current and + Second-oder CrankNicolson implicit ddt using the current and previous time-step fields as well as the previous time-step ddt. SourceFiles - CrankNicholsonDdtScheme.C + CrankNicolsonDdtScheme.C \*---------------------------------------------------------------------------*/ -#ifndef CrankNicholsonDdtScheme_H -#define CrankNicholsonDdtScheme_H +#ifndef CrankNicolsonDdtScheme_H +#define CrankNicolsonDdtScheme_H #include "ddtScheme.H" @@ -49,11 +49,11 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class CrankNicholsonDdtScheme Declaration + Class CrankNicolsonDdtScheme Declaration \*---------------------------------------------------------------------------*/ template -class CrankNicholsonDdtScheme +class CrankNicolsonDdtScheme : public fv::ddtScheme { @@ -105,10 +105,10 @@ class CrankNicholsonDdtScheme // Private Member Functions //- Disallow default bitwise copy construct - CrankNicholsonDdtScheme(const CrankNicholsonDdtScheme&); + CrankNicolsonDdtScheme(const CrankNicolsonDdtScheme&); //- Disallow default bitwise assignment - void operator=(const CrankNicholsonDdtScheme&); + void operator=(const CrankNicolsonDdtScheme&); template DDt0Field& ddt0_ @@ -149,20 +149,20 @@ class CrankNicholsonDdtScheme public: //- Runtime type information - TypeName("CrankNicholson"); + TypeName("CrankNicolson"); // Constructors //- Construct from mesh - CrankNicholsonDdtScheme(const fvMesh& mesh) + CrankNicolsonDdtScheme(const fvMesh& mesh) : ddtScheme(mesh), ocCoeff_(1.0) {} //- Construct from mesh and Istream - CrankNicholsonDdtScheme(const fvMesh& mesh, Istream& is) + CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is) : ddtScheme(mesh, is), ocCoeff_(readScalar(is)) @@ -171,7 +171,7 @@ public: { FatalIOErrorIn ( - "CrankNicholsonDdtScheme(const fvMesh& mesh, Istream& is)", + "CrankNicolsonDdtScheme(const fvMesh& mesh, Istream& is)", is ) << "coefficient = " << ocCoeff_ << " should be >= 0 and <= 1" @@ -253,7 +253,7 @@ public: template<> -tmp CrankNicholsonDdtScheme::fvcDdtPhiCorr +tmp CrankNicolsonDdtScheme::fvcDdtPhiCorr ( const volScalarField& rA, const volScalarField& U, @@ -262,7 +262,7 @@ tmp CrankNicholsonDdtScheme::fvcDdtPhiCorr template<> -tmp CrankNicholsonDdtScheme::fvcDdtPhiCorr +tmp CrankNicolsonDdtScheme::fvcDdtPhiCorr ( const volScalarField& rA, const volScalarField& rho, @@ -282,7 +282,7 @@ tmp CrankNicholsonDdtScheme::fvcDdtPhiCorr // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "CrankNicholsonDdtScheme.C" +# include "CrankNicolsonDdtScheme.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C similarity index 94% rename from src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C rename to src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C index 2b101831a3..3166243a9c 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtSchemes.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtSchemes.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "CrankNicholsonDdtScheme.H" +#include "CrankNicolsonDdtScheme.H" #include "fvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -32,7 +32,7 @@ namespace Foam { namespace fv { - makeFvDdtScheme(CrankNicholsonDdtScheme) + makeFvDdtScheme(CrankNicolsonDdtScheme) } } diff --git a/src/finiteVolume/finiteVolume/fvm/fvm.H b/src/finiteVolume/finiteVolume/fvm/fvm.H index 2f7ba08f03..b1363a11ae 100644 --- a/src/finiteVolume/finiteVolume/fvm/fvm.H +++ b/src/finiteVolume/finiteVolume/fvm/fvm.H @@ -29,7 +29,7 @@ Description matrix. Temporal derivatives are calculated using Euler-implicit, backward - differencing or Crank-Nicholson. Spatial derivatives are calculated + differencing or Crank-Nicolson. Spatial derivatives are calculated using Gauss' Theorem. diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/constant/polyMesh/boundary b/tutorials/incompressible/shallowWaterFoam/squareBump/constant/polyMesh/boundary index b96b8676fd..4778c6be3c 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/constant/polyMesh/boundary +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/constant/polyMesh/boundary @@ -38,6 +38,7 @@ FoamFile frontAndBack { type empty; + inGroups 1(empty); nFaces 800; startFace 840; } diff --git a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes index 7a0b99df5d..036a75cf3c 100644 --- a/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes +++ b/tutorials/incompressible/shallowWaterFoam/squareBump/system/fvSchemes @@ -16,7 +16,7 @@ FoamFile ddtSchemes { - default CrankNicholson 0.9; + default CrankNicolson 0.9; } gradSchemes From a9888b411fcad2219422a16be84023c778fde744 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 18 Nov 2012 22:44:42 +0000 Subject: [PATCH 2/4] applications/test/ThermoMixture: New test application --- applications/test/ThermoMixture/Make/files | 4 ++ applications/test/ThermoMixture/Make/options | 5 ++ .../test/ThermoMixture/ThermoMixture.C | 62 +++++++++++++++++++ applications/test/ThermoMixture/thermoDict | 41 ++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 applications/test/ThermoMixture/Make/files create mode 100644 applications/test/ThermoMixture/Make/options create mode 100644 applications/test/ThermoMixture/ThermoMixture.C create mode 100644 applications/test/ThermoMixture/thermoDict diff --git a/applications/test/ThermoMixture/Make/files b/applications/test/ThermoMixture/Make/files new file mode 100644 index 0000000000..8a122d0e0b --- /dev/null +++ b/applications/test/ThermoMixture/Make/files @@ -0,0 +1,4 @@ + +ThermoMixture.C + +EXE = $(FOAM_APPBIN)/ThermoMixture diff --git a/applications/test/ThermoMixture/Make/options b/applications/test/ThermoMixture/Make/options new file mode 100644 index 0000000000..98bf79aaa4 --- /dev/null +++ b/applications/test/ThermoMixture/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + +EXE_LIBS = \ + -lspecie diff --git a/applications/test/ThermoMixture/ThermoMixture.C b/applications/test/ThermoMixture/ThermoMixture.C new file mode 100644 index 0000000000..14c71e9b01 --- /dev/null +++ b/applications/test/ThermoMixture/ThermoMixture.C @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2012 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 . + +Application + ThermoMixture + +Description + +\*---------------------------------------------------------------------------*/ + +#include "dictionary.H" +#include "IFstream.H" +#include "constTransport.H" +#include "specieThermo.H" +#include "hConstThermo.H" +#include "perfectGas.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + typedef constTransport > > ThermoType; + + IFstream f("thermoDict"); + dictionary dict(f); + + ThermoType t1(dict.subDict("specie1")); + ThermoType t2(dict.subDict("specie2")); + + Info << "W= " << t1.W() << " " << t2.W() << " " << (t1+t2).W() << endl; + Info << "Cp= " << t1.cp(1) << " " << t2.cp(1) << " " << (t1+t2).cp(1) << endl; + + Info<< "\nEnd\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/test/ThermoMixture/thermoDict b/applications/test/ThermoMixture/thermoDict new file mode 100644 index 0000000000..9b439490df --- /dev/null +++ b/applications/test/ThermoMixture/thermoDict @@ -0,0 +1,41 @@ +specie1 +{ + specie + { + nMoles 1; + molWeight 1; + } + + thermodynamics + { + Cp 1; + Hf 0; + } + + transport + { + mu 1; + Pr 1; + } +} + +specie2 +{ + specie + { + nMoles 1; + molWeight 0.5; + } + + thermodynamics + { + Cp 2; + Hf 0; + } + + transport + { + mu 1; + Pr 1; + } +} From b0b9480573372d9d645c75a7ef820189b3da49c6 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 18 Nov 2012 22:47:58 +0000 Subject: [PATCH 3/4] Removed duplicate app --- applications/test/ThermoMixture/Make/files | 4 -- applications/test/ThermoMixture/Make/options | 5 -- .../test/ThermoMixture/ThermoMixture.C | 62 ------------------- applications/test/ThermoMixture/thermoDict | 41 ------------ 4 files changed, 112 deletions(-) delete mode 100644 applications/test/ThermoMixture/Make/files delete mode 100644 applications/test/ThermoMixture/Make/options delete mode 100644 applications/test/ThermoMixture/ThermoMixture.C delete mode 100644 applications/test/ThermoMixture/thermoDict diff --git a/applications/test/ThermoMixture/Make/files b/applications/test/ThermoMixture/Make/files deleted file mode 100644 index 8a122d0e0b..0000000000 --- a/applications/test/ThermoMixture/Make/files +++ /dev/null @@ -1,4 +0,0 @@ - -ThermoMixture.C - -EXE = $(FOAM_APPBIN)/ThermoMixture diff --git a/applications/test/ThermoMixture/Make/options b/applications/test/ThermoMixture/Make/options deleted file mode 100644 index 98bf79aaa4..0000000000 --- a/applications/test/ThermoMixture/Make/options +++ /dev/null @@ -1,5 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude - -EXE_LIBS = \ - -lspecie diff --git a/applications/test/ThermoMixture/ThermoMixture.C b/applications/test/ThermoMixture/ThermoMixture.C deleted file mode 100644 index 14c71e9b01..0000000000 --- a/applications/test/ThermoMixture/ThermoMixture.C +++ /dev/null @@ -1,62 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2012 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 . - -Application - ThermoMixture - -Description - -\*---------------------------------------------------------------------------*/ - -#include "dictionary.H" -#include "IFstream.H" -#include "constTransport.H" -#include "specieThermo.H" -#include "hConstThermo.H" -#include "perfectGas.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Main program: - -int main(int argc, char *argv[]) -{ - typedef constTransport > > ThermoType; - - IFstream f("thermoDict"); - dictionary dict(f); - - ThermoType t1(dict.subDict("specie1")); - ThermoType t2(dict.subDict("specie2")); - - Info << "W= " << t1.W() << " " << t2.W() << " " << (t1+t2).W() << endl; - Info << "Cp= " << t1.cp(1) << " " << t2.cp(1) << " " << (t1+t2).cp(1) << endl; - - Info<< "\nEnd\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/test/ThermoMixture/thermoDict b/applications/test/ThermoMixture/thermoDict deleted file mode 100644 index 9b439490df..0000000000 --- a/applications/test/ThermoMixture/thermoDict +++ /dev/null @@ -1,41 +0,0 @@ -specie1 -{ - specie - { - nMoles 1; - molWeight 1; - } - - thermodynamics - { - Cp 1; - Hf 0; - } - - transport - { - mu 1; - Pr 1; - } -} - -specie2 -{ - specie - { - nMoles 1; - molWeight 0.5; - } - - thermodynamics - { - Cp 2; - Hf 0; - } - - transport - { - mu 1; - Pr 1; - } -} From 53996d445d69fe8254403335dc1343e0785f13e1 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 18 Nov 2012 22:48:47 +0000 Subject: [PATCH 4/4] waveSurfacePressure/waveSurfacePressureFvPatchScalarField: Removed trailing whitespace --- .../waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C | 2 +- .../waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C index 34d04b7d40..59f859386e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C @@ -197,7 +197,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() scalar c00 = dt*dt/(dt0*(dt + dt0)); scalar c0 = c + c00; - zetap = + zetap = ( c0*zeta.oldTime().boundaryField()[patchI] - c00*zeta.oldTime().oldTime().boundaryField()[patchI] diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H index ad2820dd50..858c6f690c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.H @@ -45,7 +45,7 @@ Description local volumetric flux. \heading Patch usage - + \table Property | Description | Required | Default value phi | flux field name | no | phi