diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C index 54df8c5badfc1380255f2435c9869ac9db6f2600..b75588a0afce9d027f79f8cf280c9ddfd40f2d33 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,8 +52,8 @@ Foam::porosityModels::DarcyForchheimer::DarcyForchheimer ) : porosityModel(name, modelType, mesh, dict, cellZoneName), - dXYZ_(coeffs_.lookup("d")), - fXYZ_(coeffs_.lookup("f")), + dXYZ_("d", dimless/sqr(dimLength), coeffs_), + fXYZ_("f", dimless/dimLength, coeffs_), D_(cellZoneIDs_.size()), F_(cellZoneIDs_.size()), rhoName_(coeffs_.lookupOrDefault<word>("rho", "rho")), diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.H b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.H index 119cb9df684f0607208fda6eef997a9027b611cb..158f5a29830c0d3c5de31ef30974f7aa79daf734 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.H @@ -70,8 +70,6 @@ class DarcyForchheimer : public porosityModel { -private: - // Private data //- Darcy coeffient XYZ components (user-supplied) [1/m2] diff --git a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C index c858fc287fb0650c230bd10d1142876e8e79ddf2..79f6d3fbbbde742938bd3e33850519f532055100 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,8 +111,8 @@ Foam::porosityModels::fixedCoeff::fixedCoeff ) : porosityModel(name, modelType, mesh, dict, cellZoneName), - alphaXYZ_(coeffs_.lookup("alpha")), - betaXYZ_(coeffs_.lookup("beta")), + alphaXYZ_("alpha", dimless/dimTime, coeffs_), + betaXYZ_("beta", dimless/dimLength, coeffs_), alpha_(cellZoneIDs_.size()), beta_(cellZoneIDs_.size()) { diff --git a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.H b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.H index 7bb52032d76731a4decfb2a3f4b15c76a28c6914..ca957d9a863c9cb4107cbffbfd4c92efff847c30 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.H @@ -60,8 +60,6 @@ class fixedCoeff : public porosityModel { -private: - // Private data //- Alpha coefficient XYZ components (user-supplied) [1/s] diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H index 3a76645d998591699a54fc0f7ac1041cd2ac08bc..5cc90240cdfdfa3c93dbdfc207d575ea3f49ff52 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H @@ -57,8 +57,6 @@ class porosityModel : public regIOobject { -private: - // Private Member Functions //- Disallow default bitwise copy construct @@ -268,6 +266,7 @@ public: virtual bool read(const dictionary& dict); }; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.H b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.H index 72336933786f54ea0c4d14099c06740a7edb960a..c0e2e53c154b35c2ce2fd029ad1c177583966f54 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLaw.H @@ -64,8 +64,6 @@ class powerLaw : public porosityModel { -private: - // Private data //- C0 coefficient diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C index a2c2dc88874d506175d73718940bae46a17379b7..daa2d5694b037a1f46185f39fd31923e7c0fed37 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C @@ -30,6 +30,7 @@ License #include "EulerDdtScheme.H" #include "CrankNicolsonDdtScheme.H" #include "backwardDdtScheme.H" +#include "localEulerDdtScheme.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -189,10 +190,11 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs() return; } + const fvMesh& mesh = this->dimensionedInternalField().mesh(); + word ddtScheme ( - this->dimensionedInternalField().mesh() - .ddtScheme(this->dimensionedInternalField().name()) + mesh.ddtScheme(this->dimensionedInternalField().name()) ); scalar deltaT = this->db().time().deltaTValue(); @@ -243,6 +245,30 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs() this->valueFraction() = (1.5 + k)/(1.5 + alpha + k); } + else if + ( + ddtScheme == fv::localEulerDdtScheme<scalar>::typeName + ) + { + const volScalarField& rDeltaT = + fv::localEulerDdt::localRDeltaT(mesh); + + // Calculate the field wave coefficient alpha (See notes) + const scalarField alpha + ( + w*this->patch().deltaCoeffs()/rDeltaT.boundaryField()[patchi] + ); + + // Calculate the field relaxation coefficient k (See notes) + const scalarField k(w/(rDeltaT.boundaryField()[patchi]*lInf_)); + + this->refValue() = + ( + field.oldTime().boundaryField()[patchi] + k*fieldInf_ + )/(1.0 + k); + + this->valueFraction() = (1.0 + k)/(1.0 + alpha + k); + } else { FatalErrorInFunction @@ -275,6 +301,24 @@ void Foam::advectiveFvPatchField<Type>::updateCoeffs() this->valueFraction() = 1.5/(1.5 + alpha); } + else if + ( + ddtScheme == fv::localEulerDdtScheme<scalar>::typeName + ) + { + const volScalarField& rDeltaT = + fv::localEulerDdt::localRDeltaT(mesh); + + // Calculate the field wave coefficient alpha (See notes) + const scalarField alpha + ( + w*this->patch().deltaCoeffs()/rDeltaT.boundaryField()[patchi] + ); + + this->refValue() = field.oldTime().boundaryField()[patchi]; + + this->valueFraction() = 1.0/(1.0 + alpha); + } else { FatalErrorInFunction diff --git a/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.H index 3b4e0f1b5c2d8e686c2648d80450bdd2562ec3d2..ac551ef4198f3f9563fac54f409b8c450916d8c4 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, CrankNicolson) time schemes are + The standard (Euler, backward, CrankNicolson, localEuler) 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/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/fvOptions b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/fvOptions index 542638fca8a17360b9bf55d8b3392c23ad35e78c..8d380de4a6ee8d9fdd3f41e0f9621fbffe68a735 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/fvOptions +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuct/constant/fvOptions @@ -29,8 +29,8 @@ porosity1 DarcyForchheimerCoeffs { - d d [0 -2 0 0 0 0 0] (7e5 -1000 -1000); - f f [0 -1 0 0 0 0 0] (0 0 0); + d (7e5 -1000 -1000); + f (0 0 0); coordinateSystem { @@ -39,8 +39,8 @@ porosity1 coordinateRotation { type axesRotation; - e1 (0.70710678 0.70710678 0); - e3 (0 0 1); + e1 (0.70710678 0.70710678 0); + e3 (0 0 1); } } } diff --git a/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/constant/fvOptions b/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/constant/fvOptions index 73c8c8a72aef25dac51d9c1ea0f0c7570a447e7d..045b7a738509668b41210251c3cc4fef8c17c80a 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/constant/fvOptions +++ b/tutorials/compressible/rhoPimpleFoam/ras/angledDuctLTS/constant/fvOptions @@ -29,8 +29,8 @@ porosity1 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); + d (5e7 -1000 -1000); + f (0 0 0); coordinateSystem { diff --git a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/fvOptions b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/fvOptions index 56123402fa878744a987bc0a39f1225bf18eaeb6..446cbc45a9e7c32b350572be028ed78d9e61f31f 100644 --- a/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/fvOptions +++ b/tutorials/compressible/rhoPimpleFoam/ras/mixerVessel2D/constant/fvOptions @@ -29,8 +29,8 @@ porosity1 DarcyForchheimerCoeffs { - d d [0 -2 0 0 0 0 0] (1e5 -1000 -1000); - f f [0 -1 0 0 0 0 0] (0 0 0); + d (1e5 -1000 -1000); + f (0 0 0); coordinateSystem { diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porosityProperties b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porosityProperties index 9795d83b85c0524d4e1a2c92dc2b3235fa7ebdad..b08090fea79c88f4efb0e0a8a4a418c45ffe30e1 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porosityProperties +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuctImplicit/constant/porosityProperties @@ -23,8 +23,8 @@ porosity1 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); + d (5e7 -1000 -1000); + f (0 0 0); coordinateSystem { diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/fvOptions b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/fvOptions index fd223008c637c89fd35cd333391df307a02fad28..f9bc8b076bafce50be361a2bfb2366efe4124302 100644 --- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/fvOptions +++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/constant/fvOptions @@ -45,8 +45,8 @@ porosity1 fixedCoeffCoeffs { - alpha alpha [0 0 -1 0 0 0 0] (500 -1000 -1000); - beta beta [0 -1 0 0 0 0 0] (0 0 0); + alpha (500 -1000 -1000); + beta (0 0 0); rhoRef 1; coordinateSystem @@ -56,8 +56,8 @@ porosity1 coordinateRotation { type axesRotation; - e1 (0.70710678 0.70710678 0); - e2 (0 0 1); + e1 (0.70710678 0.70710678 0); + e2 (0 0 1); } } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/fvOptions b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/fvOptions index 9ed7edb4221601dd50ed08ae1bcab7745f73af01..d9188a1378ae097f08db0b1e34c82b340dd8a74f 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/fvOptions +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/constant/air/fvOptions @@ -46,8 +46,8 @@ porosityBlockage DarcyForchheimerCoeffs { - d d [0 -2 0 0 0] (-1000 -1000 1e4); - f f [0 -1 0 0 0] (0 0 0); + d (-1000 -1000 1e4); + f (0 0 0); coordinateSystem { diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/porosityProperties b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/porosityProperties index 80421b7786fe931d968685c97f6069ff94f228fc..a96f099ae0862f5c32b24111ef6db8eea6e54dae 100644 --- a/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/porosityProperties +++ b/tutorials/incompressible/porousSimpleFoam/angledDuctImplicit/constant/porosityProperties @@ -23,8 +23,8 @@ porosity1 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); + d (5e7 -1000 -1000); + f (0 0 0); coordinateSystem { diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/porosityProperties b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/porosityProperties index 4016a5404531cf4df1e3afaf81a700b25e8e5631..0e911d237808c86ddbdcf75ba6a9feadc0506d61 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/porosityProperties +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/constant/porosityProperties @@ -23,8 +23,8 @@ porosity1 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); + d (5e7 -1000 -1000); + f (0 0 0); coordinateSystem { diff --git a/tutorials/lagrangian/reactingParcelFoam/filter/constant/fvOptions b/tutorials/lagrangian/reactingParcelFoam/filter/constant/fvOptions index 01546fe13756b353a0c002bb64345dc0762c4636..0b6c185a6eb44f89a63cd7c2baf5a62b7cd50621 100644 --- a/tutorials/lagrangian/reactingParcelFoam/filter/constant/fvOptions +++ b/tutorials/lagrangian/reactingParcelFoam/filter/constant/fvOptions @@ -29,8 +29,8 @@ filter1 DarcyForchheimerCoeffs { - d d [0 -2 0 0 0 0 0] (500000 -1000 -1000); - f f [0 -1 0 0 0 0 0] (0 0 0); + d (500000 -1000 -1000); + f (0 0 0); coordinateSystem { diff --git a/tutorials/multiphase/interFoam/ras/angledDuct/constant/fvOptions b/tutorials/multiphase/interFoam/ras/angledDuct/constant/fvOptions index 5b222b6937b236add633dba5fce29f9798c34fa0..98110758855434b7455041b403f76a1562f0cc2a 100644 --- a/tutorials/multiphase/interFoam/ras/angledDuct/constant/fvOptions +++ b/tutorials/multiphase/interFoam/ras/angledDuct/constant/fvOptions @@ -29,8 +29,8 @@ porosity1 DarcyForchheimerCoeffs { - d d [0 -2 0 0 0 0 0] (2e8 -1000 -1000); - f f [0 -1 0 0 0 0 0] (0 0 0); + d (2e8 -1000 -1000); + f (0 0 0); coordinateSystem {