mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -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"
|
||||
|
||||
@ -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<fixedValueFvsPatchScalarField>(phi1.boundaryField()[patchi]))
|
||||
{
|
||||
dragCoeff.boundaryField()[patchi] = 0.0;
|
||||
heatTransferCoeff.boundaryField()[patchi] = 0.0;
|
||||
liftForce.boundaryField()[patchi] = vector::zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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::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;
|
||||
}
|
||||
|
||||
@ -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<fixedValueFvsPatchScalarField>
|
||||
(
|
||||
dm.phase1().phi().boundaryField()[patchi]
|
||||
)
|
||||
)
|
||||
{
|
||||
Kptr->boundaryField()[patchi] = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
dragCoeffsPtr().insert(iter.key(), Kptr);
|
||||
}
|
||||
|
||||
return dragCoeffsPtr;
|
||||
|
||||
@ -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<fixedValueFvsPatchScalarField>(phi1.boundaryField()[patchi]))
|
||||
{
|
||||
K.boundaryField()[patchi] = 0.0;
|
||||
liftCoeff.boundaryField()[patchi] = vector::zero;
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@ Description
|
||||
#include "subCycle.H"
|
||||
#include "nearWallDist.H"
|
||||
#include "wallFvPatch.H"
|
||||
#include "fixedValueFvsPatchFields.H"
|
||||
#include "Switch.H"
|
||||
|
||||
#include "IFstream.H"
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
<readHeader>{anythingInBlock} {
|
||||
Info<< "Header: " << YYText() << endl;
|
||||
<readHeader>{quote}{textBraces}{quote} {
|
||||
Info<< "Reading header: " << YYText() << endl;
|
||||
}
|
||||
|
||||
|
||||
{dimension} {
|
||||
BEGIN(readDimension);
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user