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/repositories/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-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -149,7 +149,7 @@ public:
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the fluctuation scale
|
||||
//- Return the uniform value
|
||||
const DataEntry<Type>& uniformValue() const
|
||||
{
|
||||
return uniformValue_;
|
||||
|
||||
@ -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-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -44,7 +44,7 @@ namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class nonuniformTransformCyclicPolyPatch Declaration
|
||||
Class nonuniformTransformCyclicPolyPatch Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class nonuniformTransformCyclicPolyPatch
|
||||
|
||||
@ -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-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,7 +85,7 @@ void Foam::duplicatePoints::setRefinement
|
||||
{
|
||||
duplicates_[localI][i] = meshMod.addPoint
|
||||
(
|
||||
mesh_.points()[pointI], // point
|
||||
mesh_.points()[pointI], // point
|
||||
pointI, // master point
|
||||
-1, // zone for point
|
||||
true // supports a cell
|
||||
|
||||
@ -30,7 +30,7 @@ meshMover = $(autoHexMesh)/externalDisplacementMeshMover
|
||||
$(meshMover)/displacementMeshMoverMotionSolver.C
|
||||
$(meshMover)/externalDisplacementMeshMover.C
|
||||
$(meshMover)/medialAxisMeshMover.C
|
||||
|
||||
$(meshMover)/zeroFixedValue/zeroFixedValuePointPatchFields.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libautoMesh
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@ Description
|
||||
#include "PatchTools.H"
|
||||
#include "slipPointPatchFields.H"
|
||||
#include "fixedValuePointPatchFields.H"
|
||||
#include "zeroFixedValuePointPatchFields.H"
|
||||
#include "calculatedPointPatchFields.H"
|
||||
#include "cyclicSlipPointPatchFields.H"
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
@ -826,7 +827,12 @@ Foam::autoLayerDriver::makeLayerDisplacementField
|
||||
{
|
||||
// 0 layers: do not allow slip so fixedValue 0
|
||||
// >0 layers: fixedValue which gets adapted
|
||||
if (numLayers[patchI] >= 0)
|
||||
if (numLayers[patchI] == 0)
|
||||
{
|
||||
patchFieldTypes[patchI] =
|
||||
zeroFixedValuePointPatchVectorField::typeName;
|
||||
}
|
||||
else if (numLayers[patchI] > 0)
|
||||
{
|
||||
patchFieldTypes[patchI] = fixedValuePointPatchVectorField::typeName;
|
||||
}
|
||||
@ -2457,8 +2463,8 @@ void Foam::autoLayerDriver::getLayerCellsFaces
|
||||
if (layer.size())
|
||||
{
|
||||
// Layer contains both original boundary face and new boundary
|
||||
// face so is nLayers+1
|
||||
forAll(layer, i)
|
||||
// face so is nLayers+1. Leave out old internal face.
|
||||
for (label i = 1; i < layer.size(); i++)
|
||||
{
|
||||
faceRealThickness[layer[i]] = realThickness;
|
||||
}
|
||||
@ -2602,7 +2608,7 @@ bool Foam::autoLayerDriver::writeLayerData
|
||||
}
|
||||
{
|
||||
label nAdded = 0;
|
||||
forAll(faceRealThickness, faceI)
|
||||
for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
|
||||
{
|
||||
if (faceRealThickness[faceI] > 0)
|
||||
{
|
||||
@ -2611,7 +2617,7 @@ bool Foam::autoLayerDriver::writeLayerData
|
||||
}
|
||||
|
||||
faceSet layerFacesSet(mesh, "layerFaces", nAdded);
|
||||
forAll(faceRealThickness, faceI)
|
||||
for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++)
|
||||
{
|
||||
if (faceRealThickness[faceI] > 0)
|
||||
{
|
||||
@ -3399,7 +3405,7 @@ void Foam::autoLayerDriver::addLayers
|
||||
addedCellSet.write();
|
||||
|
||||
faceSet layerFacesSet(newMesh, "layerFaces", newMesh.nFaces()/100);
|
||||
forAll(faceRealThickness, faceI)
|
||||
for (label faceI = 0; faceI < newMesh.nInternalFaces(); faceI++)
|
||||
{
|
||||
if (faceRealThickness[faceI] > 0)
|
||||
{
|
||||
|
||||
@ -33,6 +33,7 @@ License
|
||||
#include "PatchTools.H"
|
||||
#include "OBJstream.H"
|
||||
#include "pointData.H"
|
||||
#include "zeroFixedValuePointPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
@ -64,7 +65,15 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs
|
||||
|
||||
if (isA<valuePointPatchField<vector> >(patchFld))
|
||||
{
|
||||
adaptPatchIDs.append(patchI);
|
||||
if (isA<zeroFixedValuePointPatchField<vector> >(patchFld))
|
||||
{
|
||||
// Special condition of fixed boundary condition. Does not
|
||||
// get adapted
|
||||
}
|
||||
else
|
||||
{
|
||||
adaptPatchIDs.append(patchI);
|
||||
}
|
||||
}
|
||||
}
|
||||
return adaptPatchIDs;
|
||||
|
||||
@ -28,7 +28,10 @@ Description
|
||||
Mesh motion solver that uses a medial axis algorithm to work
|
||||
out a fraction between the (nearest point on a) moving surface
|
||||
and the (nearest point on a) fixed surface.
|
||||
This fraction is then used to scale the motion.
|
||||
This fraction is then used to scale the motion. Use
|
||||
- fixedValue on all moving patches
|
||||
- zeroFixedValue on stationary patches
|
||||
- slip on all slipping patches
|
||||
|
||||
SourceFiles
|
||||
medialAxisMeshMover.C
|
||||
|
||||
@ -0,0 +1,109 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "zeroFixedValuePointPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
zeroFixedValuePointPatchField<Type>::
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<Type, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<Type>(p, iF)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroFixedValuePointPatchField<Type>::
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<Type, pointMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<Type>(p, iF, dict, false)
|
||||
{
|
||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroFixedValuePointPatchField<Type>::
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const zeroFixedValuePointPatchField<Type>& ptf,
|
||||
const pointPatch& p,
|
||||
const DimensionedField<Type, pointMesh>& iF,
|
||||
const pointPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<Type>(ptf, p, iF, mapper)
|
||||
{
|
||||
// For safety re-evaluate
|
||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroFixedValuePointPatchField<Type>::
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const zeroFixedValuePointPatchField<Type>& ptf
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<Type>(ptf)
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
zeroFixedValuePointPatchField<Type>::
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const zeroFixedValuePointPatchField<Type>& ptf,
|
||||
const DimensionedField<Type, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<Type>(ptf, iF)
|
||||
{
|
||||
// For safety re-evaluate
|
||||
fixedValuePointPatchField<Type>::operator=(pTraits<Type>::zero);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,154 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::zeroFixedValuePointPatchField
|
||||
|
||||
Description
|
||||
Enables the specification of a zero fixed value boundary condition.
|
||||
|
||||
Example of the boundary condition specification:
|
||||
\verbatim
|
||||
inlet
|
||||
{
|
||||
type zeroFixedValue;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
SourceFiles
|
||||
zeroFixedValuePointPatchField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef zeroFixedValuePointPatchField_H
|
||||
#define zeroFixedValuePointPatchField_H
|
||||
|
||||
#include "fixedValuePointPatchField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class zeroFixedValuePointPatchField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
template<class Type>
|
||||
class zeroFixedValuePointPatchField
|
||||
:
|
||||
public fixedValuePointPatchField<Type>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("zeroFixedValue");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<Type, pointMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<Type, pointMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given patchField<Type> onto a new patch
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const zeroFixedValuePointPatchField<Type>&,
|
||||
const pointPatch&,
|
||||
const DimensionedField<Type, pointMesh>&,
|
||||
const pointPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const zeroFixedValuePointPatchField<Type>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr<pointPatchField<Type> > clone() const
|
||||
{
|
||||
return autoPtr<pointPatchField<Type> >
|
||||
(
|
||||
new zeroFixedValuePointPatchField<Type>
|
||||
(
|
||||
*this
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
zeroFixedValuePointPatchField
|
||||
(
|
||||
const zeroFixedValuePointPatchField<Type>&,
|
||||
const DimensionedField<Type, pointMesh>&
|
||||
);
|
||||
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual autoPtr<pointPatchField<Type> > clone
|
||||
(
|
||||
const DimensionedField<Type, pointMesh>& iF
|
||||
) const
|
||||
{
|
||||
return autoPtr<pointPatchField<Type> >
|
||||
(
|
||||
new zeroFixedValuePointPatchField<Type>
|
||||
(
|
||||
*this,
|
||||
iF
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#ifdef NoRepository
|
||||
# include "zeroFixedValuePointPatchField.C"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,43 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "zeroFixedValuePointPatchFields.H"
|
||||
#include "pointPatchFields.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makePointPatchFields(zeroFixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,57 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
|
||||
OpenFOAM is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
InClass
|
||||
Foam::zeroFixedValuePointPatchFields
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
zeroFixedValuePointPatchFields.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef zeroFixedValuePointPatchFields_H
|
||||
#define zeroFixedValuePointPatchFields_H
|
||||
|
||||
#include "zeroFixedValuePointPatchField.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makePointPatchFieldTypedefs(zeroFixedValue);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1972,7 +1972,7 @@ void Foam::meshRefinement::calculateEdgeWeights
|
||||
const edge& e = edges[edgeI];
|
||||
scalar eMag = max
|
||||
(
|
||||
VSMALL,
|
||||
SMALL,
|
||||
mag
|
||||
(
|
||||
pts[meshPoints[e[1]]]
|
||||
|
||||
Reference in New Issue
Block a user