diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C index 78d70a1537..c736f8194d 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/compressibleTwoPhaseEulerFoam.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-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,6 +33,7 @@ Description #include "fvCFD.H" #include "nearWallDist.H" #include "wallFvPatch.H" +#include "fixedValueFvsPatchFields.H" #include "Switch.H" #include "IFstream.H" diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H index 0f28f2330d..3b4d2be679 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/interfacialCoeffs.H @@ -77,4 +77,15 @@ volScalarField heatTransferCoeff heatTransferCoeff *= alpha1Coeff; liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U)); + + // Remove lift, drag and phase heat-transfer at fixed-flux boundaries + forAll(phi1.boundaryField(), patchi) + { + if (isA(phi1.boundaryField()[patchi])) + { + dragCoeff.boundaryField()[patchi] = 0.0; + heatTransferCoeff.boundaryField()[patchi] = 0.0; + liftForce.boundaryField()[patchi] = vector::zero; + } + } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 2224030613..620499a2e7 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.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-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,6 +25,7 @@ License #include "multiphaseSystem.H" #include "alphaContactAngleFvPatchScalarField.H" +#include "fixedValueFvsPatchFields.H" #include "Time.H" #include "subCycle.H" #include "MULES.H" @@ -610,6 +611,21 @@ Foam::tmp Foam::multiphaseSystem::Svm } } + // Remove lift at fixed-flux boundaries + forAll(phase.phi().boundaryField(), patchi) + { + if + ( + isA + ( + phase.phi().boundaryField()[patchi] + ) + ) + { + tSvm().boundaryField()[patchi] = vector::zero; + } + } + return tSvm; } @@ -623,9 +639,7 @@ Foam::multiphaseSystem::dragCoeffs() const { const dragModel& dm = *iter(); - dragCoeffsPtr().insert - ( - iter.key(), + volScalarField* Kptr = ( max ( @@ -642,8 +656,24 @@ Foam::multiphaseSystem::dragCoeffs() const dm.residualSlip() ) ) - ).ptr() - ); + ).ptr(); + + // Remove drag at fixed-flux boundaries + forAll(dm.phase1().phi().boundaryField(), patchi) + { + if + ( + isA + ( + dm.phase1().phi().boundaryField()[patchi] + ) + ) + { + Kptr->boundaryField()[patchi] = 0.0; + } + } + + dragCoeffsPtr().insert(iter.key(), Kptr); } return dragCoeffsPtr; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H b/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H index 097123378c..415afe9483 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/liftDragCoeffs.H @@ -19,3 +19,13 @@ ( Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U)) ); + + // Remove lift and drag at fixed-flux boundaries + forAll(phi1.boundaryField(), patchi) + { + if (isA(phi1.boundaryField()[patchi])) + { + K.boundaryField()[patchi] = 0.0; + liftCoeff.boundaryField()[patchi] = vector::zero; + } + } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C index d9da532aef..178032db6f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseEulerFoam.C @@ -35,6 +35,7 @@ Description #include "subCycle.H" #include "nearWallDist.H" #include "wallFvPatch.H" +#include "fixedValueFvsPatchFields.H" #include "Switch.H" #include "IFstream.H" diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 5f6a49ab3b..c67f5b289b 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -163,6 +163,7 @@ hexLabel {hexDigit}+ zeroLabel {digit}* signedInteger [-+]?{integer} word ({alpha}|{digit}|{dotColonDash})* +wordBraces ({word}|{lbrac}|{rbrac})* exponent_part [eE][-+]?{digit}+ fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+".")|({digit})) @@ -184,6 +185,7 @@ schemeSymbolList ({schemeSymbolListElement}+{space}) starStar ("**") text ({space}({word}*{space})*) +textBraces ({space}({wordBraces}*{space})*) anythingInBlock ([^)]*) dateDDMMYYYY ({digit}{digit}"/"{digit}{digit}"/"{digit}{digit}{digit}{digit}) @@ -276,11 +278,10 @@ endOfSection {space}")"{space} BEGIN(readHeader); } -{anythingInBlock} { - Info<< "Header: " << YYText() << endl; +{quote}{textBraces}{quote} { + Info<< "Reading header: " << YYText() << endl; } - {dimension} { BEGIN(readDimension); } diff --git a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C index 4cd85a7cf6..5a680bc56b 100644 --- a/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C +++ b/src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C @@ -74,16 +74,20 @@ void Foam::IDDESDelta::calcDelta() { scalar deltaMaxTmp = 0.0; const labelList& cFaces = cells[cellI]; - const point& faceCentre = faceCentres[cFaces[0]]; const vector nCell = n[cellI]; forAll(cFaces, cFaceI) { label faceI = cFaces[cFaceI]; - const point& faceCentreTwo = faceCentres[faceI]; - scalar tmp = (faceCentre - faceCentreTwo) & nCell; - if (tmp > deltaMaxTmp) + const point& faceCentreI = faceCentres[faceI]; + forAll(cFaces, cFaceJ) { - deltaMaxTmp = tmp; + label faceJ = cFaces[cFaceJ]; + const point& faceCentreJ = faceCentres[faceJ]; + scalar tmp = (faceCentreJ - faceCentreI) & nCell; + if (tmp > deltaMaxTmp) + { + deltaMaxTmp = tmp; + } } } faceToFacenMax[cellI] = deltaMaxTmp;