mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Resolved merge conflict
This commit is contained in:
@ -14,6 +14,7 @@ heatTransferModels/RanzMarshall/RanzMarshall.C
|
||||
|
||||
liftModels/liftModel/liftModel.C
|
||||
liftModels/liftModel/newLiftModel.C
|
||||
liftModels/noLift/noLift.C
|
||||
liftModels/constantCoefficient/constantCoefficient.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libcompressibleEulerianInterfacialModels
|
||||
|
||||
@ -56,7 +56,8 @@ Foam::liftModels::constantCoefficient::constantCoefficient
|
||||
)
|
||||
:
|
||||
liftModel(dict, alpha1, phase1, phase2),
|
||||
Cl_("Cl", dimless, dict.lookup("Cl"))
|
||||
coeffDict_(dict.subDict(typeName + "Coeffs")),
|
||||
Cl_("Cl", dimless, coeffDict_.lookup("Cl"))
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -53,6 +53,9 @@ class constantCoefficient
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Coefficient dictionary
|
||||
const dictionary& coeffDict_;
|
||||
|
||||
//- Constant lift coefficient
|
||||
dimensionedScalar Cl_;
|
||||
|
||||
|
||||
@ -85,6 +85,10 @@ public:
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct null
|
||||
liftModel();
|
||||
|
||||
//- Construct from components
|
||||
liftModel
|
||||
(
|
||||
const dictionary& dict,
|
||||
|
||||
@ -61,7 +61,7 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
|
||||
return
|
||||
cstrIter()
|
||||
(
|
||||
dict.subDict(phase1.name()).subDict(liftModelType + "Coeffs"),
|
||||
dict.subDict(phase1.name()),
|
||||
alpha1,
|
||||
phase1,
|
||||
phase2
|
||||
|
||||
@ -0,0 +1,97 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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 "noLift.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace liftModels
|
||||
{
|
||||
defineTypeNameAndDebug(noLift, 0);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
liftModel,
|
||||
noLift,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::liftModels::noLift::noLift
|
||||
(
|
||||
const dictionary& dict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
)
|
||||
:
|
||||
liftModel(dict, alpha1, phase1, phase2)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::liftModels::noLift::~noLift()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F
|
||||
(
|
||||
const volVectorField& U
|
||||
) const
|
||||
{
|
||||
return
|
||||
tmp<volVectorField>
|
||||
(
|
||||
new volVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"zero",
|
||||
U.time().timeName(),
|
||||
U.mesh()
|
||||
),
|
||||
U.mesh(),
|
||||
dimensionedVector
|
||||
(
|
||||
"zero",
|
||||
dimensionSet(1, -2, -2, 0, 0, 0, 0),
|
||||
vector::zero
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,98 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / 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::liftModels::noLift
|
||||
|
||||
Description
|
||||
|
||||
SourceFiles
|
||||
noLift.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef noLift_H
|
||||
#define noLift_H
|
||||
|
||||
#include "liftModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
namespace liftModels
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class noLift Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class noLift
|
||||
:
|
||||
public liftModel
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Constant lift coefficient
|
||||
dimensionedScalar Cl_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("none");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from components
|
||||
noLift
|
||||
(
|
||||
const dictionary& dict,
|
||||
const volScalarField& alpha1,
|
||||
const phaseModel& phase1,
|
||||
const phaseModel& phase2
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~noLift();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Lift force
|
||||
tmp<volVectorField> F(const volVectorField& U) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace liftModels
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -55,8 +55,6 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel
|
||||
|
||||
phase_(phase),
|
||||
|
||||
draga_(phase.fluid().drag1()),
|
||||
|
||||
viscosityModel_
|
||||
(
|
||||
kineticTheoryModels::viscosityModel::New
|
||||
@ -401,7 +399,11 @@ void Foam::RASModels::kineticTheoryModel::correct()
|
||||
(
|
||||
alpha*(1.0 - alpha),
|
||||
phase_.fluid().residualPhaseFraction()
|
||||
)*draga_.K(magUr + phase_.fluid().residualSlip())/rho
|
||||
)
|
||||
*phase_.fluid().drag(phase_).K
|
||||
(
|
||||
magUr + phase_.fluid().residualSlip()
|
||||
)/rho
|
||||
);
|
||||
|
||||
// Eq. 3.25, p. 50 Js = J1 - J2
|
||||
|
||||
@ -82,8 +82,8 @@ class kineticTheoryModel
|
||||
const phaseModel& phase_;
|
||||
|
||||
|
||||
//- Drag model
|
||||
const dragModel& draga_;
|
||||
////- Drag model
|
||||
//const dragModel& draga_;
|
||||
|
||||
// Sub-models
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ class twoPhaseSystem
|
||||
//- Total volumetric flux
|
||||
surfaceScalarField phi_;
|
||||
|
||||
//-
|
||||
//- Dilatation term
|
||||
volScalarField dgdt_;
|
||||
|
||||
//- Surface tension coefficient
|
||||
@ -224,7 +224,7 @@ public:
|
||||
return phi_;
|
||||
}
|
||||
|
||||
//- Return
|
||||
//- Return the dilatation term
|
||||
const volScalarField& dgdt() const
|
||||
{
|
||||
return dgdt_;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -475,7 +475,11 @@ int main(int argc, char *argv[])
|
||||
word regionName = polyMesh::defaultRegion;
|
||||
word regionDir = word::null;
|
||||
|
||||
if (args.optionReadIfPresent("region", regionName))
|
||||
if
|
||||
(
|
||||
args.optionReadIfPresent("region", regionName)
|
||||
&& regionName != polyMesh::defaultRegion
|
||||
)
|
||||
{
|
||||
regionDir = regionName;
|
||||
Info<< "Operating on region " << regionName << nl << endl;
|
||||
@ -578,7 +582,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
// Loop over all times
|
||||
forAll(Times, timeI)
|
||||
for (label timeI = startTime; timeI < endTime; timeI++)
|
||||
{
|
||||
// Set time for global database
|
||||
runTime.setTime(Times[timeI], timeI);
|
||||
@ -591,6 +595,19 @@ int main(int argc, char *argv[])
|
||||
databases[procI].setTime(Times[timeI], timeI);
|
||||
}
|
||||
|
||||
const fileName meshPath =
|
||||
databases[0].path()
|
||||
/databases[0].timeName()
|
||||
/regionDir
|
||||
/polyMesh::meshSubDir;
|
||||
|
||||
if (!isFile(meshPath/"faces"))
|
||||
{
|
||||
Info<< "No mesh." << nl << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
// Read point on individual processors to determine merge tolerance
|
||||
// (otherwise single cell domains might give problems)
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -458,6 +458,8 @@ int main(int argc, char *argv[])
|
||||
regIOobject::fileModificationChecking = regIOobject::timeStamp;
|
||||
# include "createTime.H"
|
||||
|
||||
runTime.functionObjects().off();
|
||||
|
||||
word regionName = polyMesh::defaultRegion;
|
||||
fileName meshSubDir;
|
||||
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/surfMesh/lnInclude \
|
||||
-I$(LIB_SRC)/triSurface/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lsampling \
|
||||
-ltriSurface \
|
||||
-lsurfMesh \
|
||||
-lmeshTools
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,6 +39,7 @@ Description
|
||||
#include "surfaceIntersection.H"
|
||||
#include "SortableList.H"
|
||||
#include "PatchTools.H"
|
||||
#include "vtkSurfaceWriter.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -183,6 +184,12 @@ int main(int argc, char *argv[])
|
||||
"also check for self-intersection"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"splitNonManifold",
|
||||
"split surface along non-manifold edges"
|
||||
" (default split is fully disconnected)"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"verbose",
|
||||
"verbose operation"
|
||||
@ -198,6 +205,7 @@ int main(int argc, char *argv[])
|
||||
const fileName surfFileName = args[1];
|
||||
const bool checkSelfIntersect = args.optionFound("checkSelfIntersection");
|
||||
const bool verbose = args.optionFound("verbose");
|
||||
const bool splitNonManifold = args.optionFound("splitNonManifold");
|
||||
|
||||
Info<< "Reading surface from " << surfFileName << " ..." << nl << endl;
|
||||
|
||||
@ -565,56 +573,108 @@ int main(int argc, char *argv[])
|
||||
// Check singly connected domain
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
labelList faceZone;
|
||||
label numZones = surf.markZones(boolList(surf.nEdges(), false), faceZone);
|
||||
|
||||
Info<< "Number of unconnected parts : " << numZones << endl;
|
||||
|
||||
if (numZones > 1)
|
||||
{
|
||||
Info<< "Splitting surface into parts ..." << endl << endl;
|
||||
|
||||
fileName surfFileNameBase(surfFileName.name());
|
||||
const word fileType = surfFileNameBase.ext();
|
||||
// Strip extension
|
||||
surfFileNameBase = surfFileNameBase.lessExt();
|
||||
// If extension was .gz strip original extension
|
||||
if (fileType == "gz")
|
||||
boolList borderEdge(surf.nEdges(), false);
|
||||
if (splitNonManifold)
|
||||
{
|
||||
surfFileNameBase = surfFileNameBase.lessExt();
|
||||
}
|
||||
|
||||
for (label zone = 0; zone < numZones; zone++)
|
||||
{
|
||||
boolList includeMap(surf.size(), false);
|
||||
|
||||
forAll(faceZone, faceI)
|
||||
const labelListList& eFaces = surf.edgeFaces();
|
||||
forAll(eFaces, edgeI)
|
||||
{
|
||||
if (faceZone[faceI] == zone)
|
||||
if (eFaces[edgeI].size() > 2)
|
||||
{
|
||||
includeMap[faceI] = true;
|
||||
borderEdge[edgeI] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
labelList pointMap;
|
||||
labelList faceMap;
|
||||
labelList faceZone;
|
||||
label numZones = surf.markZones(borderEdge, faceZone);
|
||||
|
||||
triSurface subSurf
|
||||
(
|
||||
surf.subsetMesh
|
||||
Info<< "Number of unconnected parts : " << numZones << endl;
|
||||
|
||||
if (numZones > 1)
|
||||
{
|
||||
Info<< "Splitting surface into parts ..." << endl << endl;
|
||||
|
||||
fileName surfFileNameBase(surfFileName.name());
|
||||
const word fileType = surfFileNameBase.ext();
|
||||
// Strip extension
|
||||
surfFileNameBase = surfFileNameBase.lessExt();
|
||||
// If extension was .gz strip original extension
|
||||
if (fileType == "gz")
|
||||
{
|
||||
surfFileNameBase = surfFileNameBase.lessExt();
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
Info<< "Writing zoning to "
|
||||
<< fileName
|
||||
(
|
||||
"zone_"
|
||||
+ surfFileNameBase
|
||||
+ '.'
|
||||
+ vtkSurfaceWriter::typeName
|
||||
)
|
||||
<< "..." << endl << endl;
|
||||
|
||||
// Convert data
|
||||
scalarField scalarFaceZone(faceZone.size());
|
||||
forAll(faceZone, i)
|
||||
{
|
||||
scalarFaceZone[i] = faceZone[i];
|
||||
}
|
||||
faceList faces(surf.size());
|
||||
forAll(surf, i)
|
||||
{
|
||||
faces[i] = surf[i].triFaceFace();
|
||||
}
|
||||
|
||||
vtkSurfaceWriter().write
|
||||
(
|
||||
includeMap,
|
||||
pointMap,
|
||||
faceMap
|
||||
)
|
||||
);
|
||||
surfFileName.path(),
|
||||
surfFileNameBase,
|
||||
surf.points(),
|
||||
faces,
|
||||
"zone",
|
||||
scalarFaceZone,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
fileName subFileName(surfFileNameBase + "_" + name(zone) + ".obj");
|
||||
|
||||
Info<< "writing part " << zone << " size " << subSurf.size()
|
||||
<< " to " << subFileName << endl;
|
||||
for (label zone = 0; zone < numZones; zone++)
|
||||
{
|
||||
boolList includeMap(surf.size(), false);
|
||||
|
||||
subSurf.write(subFileName);
|
||||
forAll(faceZone, faceI)
|
||||
{
|
||||
if (faceZone[faceI] == zone)
|
||||
{
|
||||
includeMap[faceI] = true;
|
||||
}
|
||||
}
|
||||
|
||||
labelList pointMap;
|
||||
labelList faceMap;
|
||||
|
||||
triSurface subSurf
|
||||
(
|
||||
surf.subsetMesh
|
||||
(
|
||||
includeMap,
|
||||
pointMap,
|
||||
faceMap
|
||||
)
|
||||
);
|
||||
|
||||
fileName subName(surfFileNameBase + "_" + name(zone) + ".obj");
|
||||
|
||||
Info<< "writing part " << zone << " size " << subSurf.size()
|
||||
<< " to " << subName << endl;
|
||||
|
||||
subSurf.write(subName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user