Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-03-22 16:23:47 +00:00
7 changed files with 73 additions and 15 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,6 +33,7 @@ Description
#include "fvCFD.H" #include "fvCFD.H"
#include "nearWallDist.H" #include "nearWallDist.H"
#include "wallFvPatch.H" #include "wallFvPatch.H"
#include "fixedValueFvsPatchFields.H"
#include "Switch.H" #include "Switch.H"
#include "IFstream.H" #include "IFstream.H"

View File

@ -77,4 +77,15 @@ volScalarField heatTransferCoeff
heatTransferCoeff *= alpha1Coeff; heatTransferCoeff *= alpha1Coeff;
liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U)); 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<fixedValueFvsPatchScalarField>(phi1.boundaryField()[patchi]))
{
dragCoeff.boundaryField()[patchi] = 0.0;
heatTransferCoeff.boundaryField()[patchi] = 0.0;
liftForce.boundaryField()[patchi] = vector::zero;
}
}
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -25,6 +25,7 @@ License
#include "multiphaseSystem.H" #include "multiphaseSystem.H"
#include "alphaContactAngleFvPatchScalarField.H" #include "alphaContactAngleFvPatchScalarField.H"
#include "fixedValueFvsPatchFields.H"
#include "Time.H" #include "Time.H"
#include "subCycle.H" #include "subCycle.H"
#include "MULES.H" #include "MULES.H"
@ -610,6 +611,21 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm
} }
} }
// Remove lift at fixed-flux boundaries
forAll(phase.phi().boundaryField(), patchi)
{
if
(
isA<fixedValueFvsPatchScalarField>
(
phase.phi().boundaryField()[patchi]
)
)
{
tSvm().boundaryField()[patchi] = vector::zero;
}
}
return tSvm; return tSvm;
} }
@ -623,9 +639,7 @@ Foam::multiphaseSystem::dragCoeffs() const
{ {
const dragModel& dm = *iter(); const dragModel& dm = *iter();
dragCoeffsPtr().insert volScalarField* Kptr =
(
iter.key(),
( (
max max
( (
@ -642,8 +656,24 @@ Foam::multiphaseSystem::dragCoeffs() const
dm.residualSlip() dm.residualSlip()
) )
) )
).ptr() ).ptr();
);
// Remove drag at fixed-flux boundaries
forAll(dm.phase1().phi().boundaryField(), patchi)
{
if
(
isA<fixedValueFvsPatchScalarField>
(
dm.phase1().phi().boundaryField()[patchi]
)
)
{
Kptr->boundaryField()[patchi] = 0.0;
}
}
dragCoeffsPtr().insert(iter.key(), Kptr);
} }
return dragCoeffsPtr; return dragCoeffsPtr;

View File

@ -19,3 +19,13 @@
( (
Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U)) Cl*(alpha2*rho2 + alpha1*rho1)*(Ur ^ fvc::curl(U))
); );
// Remove lift and drag at fixed-flux boundaries
forAll(phi1.boundaryField(), patchi)
{
if (isA<fixedValueFvsPatchScalarField>(phi1.boundaryField()[patchi]))
{
K.boundaryField()[patchi] = 0.0;
liftCoeff.boundaryField()[patchi] = vector::zero;
}
}

View File

@ -35,6 +35,7 @@ Description
#include "subCycle.H" #include "subCycle.H"
#include "nearWallDist.H" #include "nearWallDist.H"
#include "wallFvPatch.H" #include "wallFvPatch.H"
#include "fixedValueFvsPatchFields.H"
#include "Switch.H" #include "Switch.H"
#include "IFstream.H" #include "IFstream.H"

View File

@ -163,6 +163,7 @@ hexLabel {hexDigit}+
zeroLabel {digit}* zeroLabel {digit}*
signedInteger [-+]?{integer} signedInteger [-+]?{integer}
word ({alpha}|{digit}|{dotColonDash})* word ({alpha}|{digit}|{dotColonDash})*
wordBraces ({word}|{lbrac}|{rbrac})*
exponent_part [eE][-+]?{digit}+ exponent_part [eE][-+]?{digit}+
fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+".")|({digit})) fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+".")|({digit}))
@ -184,6 +185,7 @@ schemeSymbolList ({schemeSymbolListElement}+{space})
starStar ("**") starStar ("**")
text ({space}({word}*{space})*) text ({space}({word}*{space})*)
textBraces ({space}({wordBraces}*{space})*)
anythingInBlock ([^)]*) anythingInBlock ([^)]*)
dateDDMMYYYY ({digit}{digit}"/"{digit}{digit}"/"{digit}{digit}{digit}{digit}) dateDDMMYYYY ({digit}{digit}"/"{digit}{digit}"/"{digit}{digit}{digit}{digit})
@ -276,11 +278,10 @@ endOfSection {space}")"{space}
BEGIN(readHeader); BEGIN(readHeader);
} }
<readHeader>{anythingInBlock} { <readHeader>{quote}{textBraces}{quote} {
Info<< "Header: " << YYText() << endl; Info<< "Reading header: " << YYText() << endl;
} }
{dimension} { {dimension} {
BEGIN(readDimension); BEGIN(readDimension);
} }

View File

@ -74,16 +74,20 @@ void Foam::IDDESDelta::calcDelta()
{ {
scalar deltaMaxTmp = 0.0; scalar deltaMaxTmp = 0.0;
const labelList& cFaces = cells[cellI]; const labelList& cFaces = cells[cellI];
const point& faceCentre = faceCentres[cFaces[0]];
const vector nCell = n[cellI]; const vector nCell = n[cellI];
forAll(cFaces, cFaceI) forAll(cFaces, cFaceI)
{ {
label faceI = cFaces[cFaceI]; label faceI = cFaces[cFaceI];
const point& faceCentreTwo = faceCentres[faceI]; const point& faceCentreI = faceCentres[faceI];
scalar tmp = (faceCentre - faceCentreTwo) & nCell; forAll(cFaces, cFaceJ)
if (tmp > deltaMaxTmp)
{ {
deltaMaxTmp = tmp; label faceJ = cFaces[cFaceJ];
const point& faceCentreJ = faceCentres[faceJ];
scalar tmp = (faceCentreJ - faceCentreI) & nCell;
if (tmp > deltaMaxTmp)
{
deltaMaxTmp = tmp;
}
} }
} }
faceToFacenMax[cellI] = deltaMaxTmp; faceToFacenMax[cellI] = deltaMaxTmp;