Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
commit
0b7e7d870d
@ -92,6 +92,13 @@
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Ensure that the flux at inflow BCs is preserved
|
||||||
|
alphaPhic1.boundaryField() = min
|
||||||
|
(
|
||||||
|
phi1.boundaryField()*alpha1.boundaryField(),
|
||||||
|
alphaPhic1.boundaryField()
|
||||||
|
);
|
||||||
|
|
||||||
MULES::explicitSolve
|
MULES::explicitSolve
|
||||||
(
|
(
|
||||||
geometricOneField(),
|
geometricOneField(),
|
||||||
|
@ -485,11 +485,12 @@ void Foam::MULES::limiter
|
|||||||
const labelList& pFaceCells =
|
const labelList& pFaceCells =
|
||||||
mesh.boundary()[patchi].faceCells();
|
mesh.boundary()[patchi].faceCells();
|
||||||
const scalarField& phiBDPf = phiBDBf[patchi];
|
const scalarField& phiBDPf = phiBDBf[patchi];
|
||||||
|
const scalarField& phiCorrPf = phiCorrBf[patchi];
|
||||||
|
|
||||||
forAll(lambdaPf, pFacei)
|
forAll(lambdaPf, pFacei)
|
||||||
{
|
{
|
||||||
// Limit outlet faces only
|
// Limit outlet faces only
|
||||||
if (phiBDPf[pFacei] > 0)
|
if ((phiBDPf[pFacei] + phiCorrPf[pFacei]) > SMALL*SMALL)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
@ -862,7 +863,7 @@ void Foam::MULES::limiterCorr
|
|||||||
forAll(lambdaPf, pFacei)
|
forAll(lambdaPf, pFacei)
|
||||||
{
|
{
|
||||||
// Limit outlet faces only
|
// Limit outlet faces only
|
||||||
if (phiCorrPf[pFacei] > 0)
|
if (phiCorrPf[pFacei] > SMALL*SMALL)
|
||||||
{
|
{
|
||||||
label pfCelli = pFaceCells[pFacei];
|
label pfCelli = pFaceCells[pFacei];
|
||||||
|
|
||||||
|
@ -197,7 +197,14 @@ updateCoeffs()
|
|||||||
|
|
||||||
const vector& myRayId = dom.IRay(rayId).d();
|
const vector& myRayId = dom.IRay(rayId).d();
|
||||||
|
|
||||||
const scalarField& Ir = dom.Qin().boundaryField()[patchI];
|
// Use updated Ir while iterating over rays
|
||||||
|
// avoids to used lagged Qin
|
||||||
|
scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI];
|
||||||
|
|
||||||
|
for (label rayI=1; rayI < dom.nRay(); rayI++)
|
||||||
|
{
|
||||||
|
Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
|
||||||
|
}
|
||||||
|
|
||||||
forAll(Iw, faceI)
|
forAll(Iw, faceI)
|
||||||
{
|
{
|
||||||
|
@ -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-2013 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -187,7 +187,9 @@ updateCoeffs()
|
|||||||
radiativeIntensityRay& ray =
|
radiativeIntensityRay& ray =
|
||||||
const_cast<radiativeIntensityRay&>(dom.IRay(rayId));
|
const_cast<radiativeIntensityRay&>(dom.IRay(rayId));
|
||||||
|
|
||||||
ray.Qr().boundaryField()[patchI] += Iw*(n & ray.dAve());
|
const scalarField nAve(n & ray.dAve());
|
||||||
|
|
||||||
|
ray.Qr().boundaryField()[patchI] += Iw*nAve;
|
||||||
|
|
||||||
const scalarField Eb
|
const scalarField Eb
|
||||||
(
|
(
|
||||||
@ -196,23 +198,20 @@ updateCoeffs()
|
|||||||
|
|
||||||
scalarField temissivity = emissivity();
|
scalarField temissivity = emissivity();
|
||||||
|
|
||||||
|
scalarField& Qem = ray.Qem().boundaryField()[patchI];
|
||||||
|
scalarField& Qin = ray.Qin().boundaryField()[patchI];
|
||||||
|
|
||||||
|
// Use updated Ir while iterating over rays
|
||||||
|
// avoids to used lagged Qin
|
||||||
|
scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI];
|
||||||
|
|
||||||
|
for (label rayI=1; rayI < dom.nRay(); rayI++)
|
||||||
|
{
|
||||||
|
Ir += dom.IRay(rayI).Qin().boundaryField()[patchI];
|
||||||
|
}
|
||||||
|
|
||||||
forAll(Iw, faceI)
|
forAll(Iw, faceI)
|
||||||
{
|
{
|
||||||
scalar Ir = 0.0;
|
|
||||||
for (label rayI=0; rayI < dom.nRay(); rayI++)
|
|
||||||
{
|
|
||||||
const vector& d = dom.IRay(rayI).d();
|
|
||||||
|
|
||||||
const scalarField& IFace =
|
|
||||||
dom.IRay(rayI).ILambda(lambdaId).boundaryField()[patchI];
|
|
||||||
|
|
||||||
if ((-n[faceI] & d) < 0.0) // qin into the wall
|
|
||||||
{
|
|
||||||
const vector& dAve = dom.IRay(rayI).dAve();
|
|
||||||
Ir = Ir + IFace[faceI]*mag(n[faceI] & dAve);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const vector& d = dom.IRay(rayId).d();
|
const vector& d = dom.IRay(rayId).d();
|
||||||
|
|
||||||
if ((-n[faceI] & d) > 0.0)
|
if ((-n[faceI] & d) > 0.0)
|
||||||
@ -222,9 +221,12 @@ updateCoeffs()
|
|||||||
valueFraction()[faceI] = 1.0;
|
valueFraction()[faceI] = 1.0;
|
||||||
refValue()[faceI] =
|
refValue()[faceI] =
|
||||||
(
|
(
|
||||||
Ir*(1.0 - temissivity[faceI])
|
Ir[faceI]*(1.0 - temissivity[faceI])
|
||||||
+ temissivity[faceI]*Eb[faceI]
|
+ temissivity[faceI]*Eb[faceI]
|
||||||
)/pi;
|
)/pi;
|
||||||
|
|
||||||
|
// Emmited heat flux from this ray direction
|
||||||
|
Qem[faceI] = refValue()[faceI]*nAve[faceI];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -232,6 +234,9 @@ updateCoeffs()
|
|||||||
valueFraction()[faceI] = 0.0;
|
valueFraction()[faceI] = 0.0;
|
||||||
refGrad()[faceI] = 0.0;
|
refGrad()[faceI] = 0.0;
|
||||||
refValue()[faceI] = 0.0; //not used
|
refValue()[faceI] = 0.0; //not used
|
||||||
|
|
||||||
|
// Incident heat flux on this ray direction
|
||||||
|
Qin[faceI] = Iw[faceI]*nAve[faceI];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
9710
tutorials/mesh/foamyHexMesh/flange/constant/triSurface/flange.obj
Normal file
9710
tutorials/mesh/foamyHexMesh/flange/constant/triSurface/flange.obj
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,9 +28,8 @@ boundaryField
|
|||||||
|
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type pressureInletOutletVelocity;
|
type fixedValue;
|
||||||
phi phi.particles;
|
value uniform (0 0 0);
|
||||||
value $internalField;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
|
@ -6027,8 +6027,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type zeroGradient;
|
||||||
value uniform 0;
|
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ solvers
|
|||||||
|
|
||||||
solver PCG;
|
solver PCG;
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-6;
|
tolerance 1e-9;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,9 +28,8 @@ boundaryField
|
|||||||
|
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
type pressureInletOutletVelocity;
|
type fixedValue;
|
||||||
phi phi.particles;
|
value uniform (0 0 0);
|
||||||
value $internalField;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
walls
|
walls
|
||||||
|
@ -6027,8 +6027,7 @@ boundaryField
|
|||||||
{
|
{
|
||||||
inlet
|
inlet
|
||||||
{
|
{
|
||||||
type fixedValue;
|
type zeroGradient;
|
||||||
value uniform 0;
|
|
||||||
}
|
}
|
||||||
outlet
|
outlet
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ solvers
|
|||||||
|
|
||||||
solver PCG;
|
solver PCG;
|
||||||
preconditioner DIC;
|
preconditioner DIC;
|
||||||
tolerance 1e-6;
|
tolerance 1e-9;
|
||||||
relTol 0;
|
relTol 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user