diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H index 35881bb544c8013cd3b2f314221a0ee602d20426..602a04a6e5711512f26630fc2527ea394dc6a750 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/UEqn.H @@ -4,7 +4,8 @@ fvm::ddt(rho, U) + fvm::div(phi, U) + turb.divDevRhoReff(U) - + fvOptions(rho, U) + == + fvOptions(rho, U) ); UEqn().relax(); diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 7bc4bacf700f26feac3301a4b306d55f139fb291..bf626a6aaf2f5f9e1cdc3ed6fe72a1a3519634f4 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -193,6 +193,7 @@ $(derivedFvPatchFields)/outletPhaseMeanVelocity/outletPhaseMeanVelocityFvPatchVe $(derivedFvPatchFields)/waveTransmissive/waveTransmissiveFvPatchFields.C $(derivedFvPatchFields)/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C $(derivedFvPatchFields)/interstitialInletVelocity/interstitialInletVelocityFvPatchVectorField.C +$(derivedFvPatchFields)/prghPressure/prghPressureFvPatchScalarField.C fvsPatchFields = fields/fvsPatchFields $(fvsPatchFields)/fvsPatchField/fvsPatchFields.C diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C index 799a901bae9ecebd023dd21ee5f37fe2891b9bab..29d72dd1125ce68c14284482cd510e4356a08c03 100644 --- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C @@ -173,10 +173,55 @@ void Foam::fv::interRegionExplicitPorositySource::addSup if (eqn.dimensions() == dimForce) { - const volScalarField& rhoNbr = - nbrMesh.lookupObject<volScalarField>(rhoName_); - const volScalarField& muNbr = - nbrMesh.lookupObject<volScalarField>(muName_); + volScalarField rhoNbr + ( + IOobject + ( + "rho:UNbr", + nbrMesh.time().timeName(), + nbrMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + nbrMesh, + dimensionedScalar("zero", dimDensity, 0.0) + ); + + volScalarField muNbr + ( + IOobject + ( + "mu:UNbr", + nbrMesh.time().timeName(), + nbrMesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + nbrMesh, + dimensionedScalar("zero", dimViscosity, 0.0) + ); + + const volScalarField& rho = + mesh_.lookupObject<volScalarField>(rhoName_); + + const volScalarField& mu = + mesh_.lookupObject<volScalarField>(muName_); + + // map local rho onto neighbour region + meshInterp().mapSrcToTgt + ( + rho.internalField(), + plusEqOp<scalar>(), + rhoNbr.internalField() + ); + + // map local mu onto neighbour region + meshInterp().mapSrcToTgt + ( + mu.internalField(), + plusEqOp<scalar>(), + muNbr.internalField() + ); porosityPtr_->addResistance(nbrEqn, rhoNbr, muNbr); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H index b29c0758ad6589663e4c3feab8a631a9b64128d0..210b9771b7b3959b4751998cd32ee8c0a09e0cfa 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.H +++ b/src/thermophysicalModels/reactionThermo/mixtures/reactingMixture/reactingMixture.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 @@ -96,6 +96,11 @@ public: { return PtrList<Reaction<ThermoType> >::operator[](i); } + + const Reaction<ThermoType>& operator [] (const label i) const + { + return PtrList<Reaction<ThermoType> >::operator[](i); + } }; diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index cfa20630aed40bb294fb050a4e4091bb61b41b39..9387769caeebe0e8ffa9023d0ca95041a886368a 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -112,7 +112,7 @@ void Foam::interfaceProperties::calculateK() const surfaceVectorField& Sf = mesh.Sf(); // Cell gradient of alpha - const volVectorField gradAlpha(fvc::grad(alpha1_)); + const volVectorField gradAlpha(fvc::grad(alpha1_, "nHat")); // Interpolated face-gradient of alpha surfaceVectorField gradAlphaf(fvc::interpolate(gradAlpha)); @@ -123,6 +123,11 @@ void Foam::interfaceProperties::calculateK() // Face unit interface normal surfaceVectorField nHatfv(gradAlphaf/(mag(gradAlphaf) + deltaN_)); + // surfaceVectorField nHatfv + // ( + // (gradAlphaf + deltaN_*vector(0, 0, 1) + // *sign(gradAlphaf.component(vector::Z)))/(mag(gradAlphaf) + deltaN_) + // ); correctContactAngle(nHatfv.boundaryField(), gradAlphaf.boundaryField()); // Face unit interface normal flux