mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -222,6 +222,11 @@ castellatedMeshControls
|
||||
// are only on the boundary of corresponding cellZones or also allow
|
||||
// free-standing zone faces. Not used if there are no faceZones.
|
||||
allowFreeStandingZoneFaces true;
|
||||
|
||||
|
||||
// Optional: whether all baffles get eroded away. WIP. Used for
|
||||
// surface simplification.
|
||||
//allowFreeStandingBaffles false;
|
||||
}
|
||||
|
||||
// Settings for the snapping.
|
||||
|
||||
@ -852,7 +852,7 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
|
||||
if (allGeometry)
|
||||
{
|
||||
faceSet faces(mesh, "lowVolRatioFaces", mesh.nFaces()/100);
|
||||
if (mesh.checkVolRatio(true, 0.05, &faces))
|
||||
if (mesh.checkVolRatio(true, 0.01, &faces))
|
||||
{
|
||||
noFailedChecks++;
|
||||
|
||||
|
||||
@ -97,6 +97,23 @@ int main(int argc, char *argv[])
|
||||
|
||||
cci.write();
|
||||
}
|
||||
|
||||
volScalarField V
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"V",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh,
|
||||
|
||||
);
|
||||
mesh.V().setInstance(runTime.timeName());
|
||||
mesh.V().write();
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
@ -715,7 +715,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::nearestPoint
|
||||
|
||||
point nearestEdgePoint;
|
||||
point nearestLinePoint;
|
||||
label minEdgeIndex = 0;
|
||||
//label minEdgeIndex = 0;
|
||||
scalar minDist = ln.nearestDist
|
||||
(
|
||||
linePointRef(a_, b_),
|
||||
@ -737,7 +737,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::nearestPoint
|
||||
minDist = dist;
|
||||
nearestEdgePoint = triEdgePoint;
|
||||
nearestLinePoint = linePoint;
|
||||
minEdgeIndex = 1;
|
||||
//minEdgeIndex = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -755,7 +755,7 @@ inline Foam::pointHit Foam::triangle<Point, PointRef>::nearestPoint
|
||||
minDist = dist;
|
||||
nearestEdgePoint = triEdgePoint;
|
||||
nearestLinePoint = linePoint;
|
||||
minEdgeIndex = 2;
|
||||
//minEdgeIndex = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -363,7 +363,7 @@ Type Foam::TableBase<Type>::value(const scalar x) const
|
||||
}
|
||||
|
||||
// Use interpolator
|
||||
interpolator().valueWeights(x, currentIndices_, currentWeights_);
|
||||
interpolator().valueWeights(xDash, currentIndices_, currentWeights_);
|
||||
|
||||
Type t = currentWeights_[0]*table_[currentIndices_[0]].second();
|
||||
for (label i = 1; i < currentIndices_.size(); i++)
|
||||
|
||||
@ -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
|
||||
@ -81,7 +81,7 @@ bool Foam::SRF::SRFModel::read()
|
||||
if (regIOobject::read())
|
||||
{
|
||||
// Re-read axis
|
||||
SRFModelCoeffs_.lookup("axis") >> axis_;
|
||||
lookup("axis") >> axis_;
|
||||
axis_ /= mag(axis_);
|
||||
|
||||
// Re-read sub-model coeffs
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,7 +25,7 @@ Class
|
||||
Foam::fixedFluxPressureFvPatchScalarField
|
||||
|
||||
Group
|
||||
grpOutletBoundaryConditions
|
||||
grpInletBoundaryConditions grpWallBoundaryConditions
|
||||
|
||||
Description
|
||||
This boundary condition adjusts the pressure gradient such that the flux
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -75,7 +75,10 @@ void Foam::inverseVolumeDiffusivity::correct()
|
||||
(
|
||||
"V",
|
||||
mesh().time().timeName(),
|
||||
mesh()
|
||||
mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
mesh(),
|
||||
dimless,
|
||||
|
||||
@ -26,6 +26,7 @@ License
|
||||
#include "AMIMethod.H"
|
||||
#include "meshTools.H"
|
||||
#include "mapDistribute.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -262,6 +263,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
|
||||
) const
|
||||
{
|
||||
const labelList& nbrFaces = patch.faceFaces()[faceI];
|
||||
const pointField& tgtPoints = patch.points();
|
||||
|
||||
// filter out faces already visited from src face neighbours
|
||||
forAll(nbrFaces, i)
|
||||
@ -290,10 +292,20 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces
|
||||
}
|
||||
|
||||
if (valid)
|
||||
{
|
||||
const face& myn = patch[faceI];
|
||||
const face& nbrn = patch[nbrFaceI];
|
||||
const vector& nbrNormal = nbrn.normal(tgtPoints);
|
||||
const vector& mynNormal = myn.normal(tgtPoints);
|
||||
|
||||
scalar cosI = nbrNormal & mynNormal;
|
||||
|
||||
if (cosI > Foam::cos(degToRad(89.0)))
|
||||
{
|
||||
faceIDs.append(nbrFaceI);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace
|
||||
scalar area = interArea(srcFaceI, tgtFaceI);
|
||||
|
||||
// store when intersection area > 0
|
||||
if (area > 0)
|
||||
if (area/this->srcMagSf_[srcFaceI] > faceAreaIntersect::tolerance())
|
||||
{
|
||||
srcAddr[srcFaceI].append(tgtFaceI);
|
||||
srcWght[srcFaceI].append(area);
|
||||
@ -228,10 +228,10 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
||||
|
||||
// quick reject if either face has zero area
|
||||
// Note: do not used stored face areas for target patch
|
||||
const scalar tgtMag = tgt.mag(tgtPoints);
|
||||
if
|
||||
(
|
||||
(this->srcMagSf_[srcFaceI] < ROOTVSMALL)
|
||||
|| (tgt.mag(tgtPoints) < ROOTVSMALL)
|
||||
(this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL)
|
||||
)
|
||||
{
|
||||
return 0.0;
|
||||
@ -242,13 +242,14 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea
|
||||
|
||||
// crude resultant norm
|
||||
vector n(-src.normal(srcPoints));
|
||||
n /= mag(n);
|
||||
if (this->reverseTarget_)
|
||||
{
|
||||
n -= tgt.normal(tgtPoints);
|
||||
n -= tgt.normal(tgtPoints)/tgtMag;
|
||||
}
|
||||
else
|
||||
{
|
||||
n += tgt.normal(tgtPoints);
|
||||
n += tgt.normal(tgtPoints)/tgtMag;
|
||||
}
|
||||
n *= 0.5;
|
||||
|
||||
|
||||
@ -133,7 +133,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
|
||||
|
||||
scalar maxComp = -GREAT;
|
||||
label maxCells = 0;
|
||||
scalar maxVol = 0;
|
||||
//scalar maxVol = 0;
|
||||
scalar minComp = GREAT;
|
||||
{
|
||||
const boundBox& bb = mesh_.bounds();
|
||||
@ -158,7 +158,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
|
||||
|
||||
PackedBoolList maxSelected(mesh_.nCells());
|
||||
maxCells = selectCells(maxComp, maskSet, maxSelected);
|
||||
maxVol = volumeOfSet(maxSelected);
|
||||
//maxVol = volumeOfSet(maxSelected);
|
||||
|
||||
// Check that maxPoint indeed selects all cells
|
||||
if (maxCells != nTotCells)
|
||||
|
||||
@ -271,11 +271,6 @@ energyRegionCoupledFvPatchScalarField
|
||||
<< " in file " << dimensionedInternalField().objectPath()
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
if (dict.found("value"))
|
||||
{
|
||||
fvPatchScalarField::operator=(scalarField("value", dict, p.size()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -114,8 +114,17 @@ turbulentHeatFluxTemperatureFvPatchScalarField
|
||||
q_("q", dict, p.size()),
|
||||
QrName_(dict.lookupOrDefault<word>("Qr", "none"))
|
||||
{
|
||||
if (dict.found("value") && dict.found("gradient"))
|
||||
{
|
||||
fvPatchField<scalar>::operator=(Field<scalar>("value", dict, p.size()));
|
||||
gradient() = Field<scalar>("gradient", dict, p.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
// Still reading so cannot yet evaluate. Make up a value.
|
||||
fvPatchField<scalar>::operator=(patchInternalField());
|
||||
gradient() = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ stressAnalysis
|
||||
{
|
||||
nCorrectors 1;
|
||||
D 1e-10;
|
||||
accelerationFactor 2;
|
||||
accelerationFactor 2; // lower for other Poisson ratio (e.g. 0.1 for 0.3)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user