Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Showing
with 146 additions and 25 deletions
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
multiphaseEulerFoam multiphaseEulerFoam
Group
grpMultiphaseSolvers
Description Description
Solver for a system of many compressible fluid phases including Solver for a system of many compressible fluid phases including
heat-transfer. heat-transfer.
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
multiphaseInterFoam multiphaseInterFoam
Group
grpMultiphaseSolvers grpMovingMeshSolvers
Description Description
Solver for n incompressible fluids which captures the interfaces and Solver for n incompressible fluids which captures the interfaces and
includes surface-tension and contact-angle effects for each phase. includes surface-tension and contact-angle effects for each phase.
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
multiphaseInterFoam multiphaseInterFoam
Group
grpMultiphaseSolvers
Description Description
Solver for n incompressible fluids which captures the interfaces and Solver for n incompressible fluids which captures the interfaces and
includes surface-tension and contact-angle effects for each phase. includes surface-tension and contact-angle effects for each phase.
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\defgroup grpMultiphaseSolvers Multiphase solvers
@{
\ingroup grpSolvers
This group contains multiphase solvers.
@}
\*---------------------------------------------------------------------------*/
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
potentialFreeSurfaceDyMFoam potentialFreeSurfaceDyMFoam
Group
grpMultiphaseSolvers grpMovingMeshSolvers
Description Description
Incompressible Navier-Stokes solver with inclusion of a wave height field Incompressible Navier-Stokes solver with inclusion of a wave height field
to enable single-phase free-surface approximations. to enable single-phase free-surface approximations.
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
potentialFreeSurfaceFoam potentialFreeSurfaceFoam
Group
grpMultiphaseSolvers
Description Description
Incompressible Navier-Stokes solver with inclusion of a wave height field Incompressible Navier-Stokes solver with inclusion of a wave height field
to enable single-phase free-surface approximations to enable single-phase free-surface approximations
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
reactingMultiphaseEulerFoam reactingMultiphaseEulerFoam
Group
grpMultiphaseSolvers
Description Description
Solver for a system of any number of compressible fluid phases with a Solver for a system of any number of compressible fluid phases with a
common pressure, but otherwise separate properties. The type of phase model common pressure, but otherwise separate properties. The type of phase model
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
reactingTwoPhaseEulerFoam reactingTwoPhaseEulerFoam
Group
grpMultiphaseSolvers
Description Description
Solver for a system of 2 compressible fluid phases with a common pressure, Solver for a system of 2 compressible fluid phases with a common pressure,
but otherwise separate properties. The type of phase model is run time but otherwise separate properties. The type of phase model is run time
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
twoLiquidMixingFoam twoLiquidMixingFoam
Group
grpMultiphaseSolvers
Description Description
Solver for mixing 2 incompressible fluids. Solver for mixing 2 incompressible fluids.
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
twoPhaseEulerFoam twoPhaseEulerFoam
Group
grpMultiphaseSolvers
Description Description
Solver for a system of 2 compressible fluid phases with one phase Solver for a system of 2 compressible fluid phases with one phase
dispersed, e.g. gas bubbles in a liquid including heat-transfer. dispersed, e.g. gas bubbles in a liquid including heat-transfer.
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
solidDisplacementFoam solidDisplacementFoam
Group
grpStressAnalysisSolvers
Description Description
Transient segregated finite-volume solver of linear-elastic, Transient segregated finite-volume solver of linear-elastic,
small-strain deformation of a solid body, with optional thermal small-strain deformation of a solid body, with optional thermal
......
...@@ -24,6 +24,9 @@ License ...@@ -24,6 +24,9 @@ License
Application Application
solidEquilibriumDisplacementFoam solidEquilibriumDisplacementFoam
Group
grpStressAnalysisSolvers
Description Description
Steady-state segregated finite-volume solver of linear-elastic, Steady-state segregated finite-volume solver of linear-elastic,
small-strain deformation of a solid body, with optional thermal small-strain deformation of a solid body, with optional thermal
......
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2015 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/>.
\defgroup grpStressAnalysisSolvers Stress analysis solvers
@{
\ingroup grpSolvers
This group contains stress analysis solvers.
@}
\*---------------------------------------------------------------------------*/
...@@ -34,7 +34,8 @@ Description ...@@ -34,7 +34,8 @@ Description
NOTE: To avoid exposing wrong fields values faceSets should include NOTE: To avoid exposing wrong fields values faceSets should include
faces contained in the blockedCells cellset. faces contained in the blockedCells cellset.
- coupledFaces reads coupledFacesSet to introduces mixe-coupled baffles - coupledFaces reads coupledFacesSet to introduces mixed-coupled
duplicate baffles
Subsets out the blocked cells and splits the blockedFaces and updates Subsets out the blocked cells and splits the blockedFaces and updates
fields. fields.
......
...@@ -17,7 +17,8 @@ FoamFile ...@@ -17,7 +17,8 @@ FoamFile
//- Per faceSet the patch the faces should go into blocked baffles //- Per faceSet the patch the faces should go into blocked baffles
blockedFaces ((blockedFacesSet blockedFaces)); blockedFaces ((blockedFacesSet blockedFaces));
//- Per faceSet the patch the faces should go into coupled baffles //- Per faceSet the duplicate baffles to generate (one 'normal', wall baffle,
// one cyclic baffle). For use with active baffle boundary conditions.
coupledFaces coupledFaces
{ {
coupledFacesSet coupledFacesSet
......
...@@ -2,7 +2,7 @@ ...@@ -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-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -525,7 +525,7 @@ int main(int argc, char *argv[]) ...@@ -525,7 +525,7 @@ int main(int argc, char *argv[])
Info<< "Created zone " << name Info<< "Created zone " << name
<< " at index " << zoneID << " at index " << zoneID
<< " with " << n << " faces" << endl; << " with " << returnReduce(n, sumOp<label>()) << " faces" << endl;
mesh.faceZones().set mesh.faceZones().set
( (
......
...@@ -512,6 +512,11 @@ int main(int argc, char *argv[]) ...@@ -512,6 +512,11 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addRegionOption.H" #include "addRegionOption.H"
#include "addDictOption.H" #include "addDictOption.H"
Foam::argList::addBoolOption
(
"writeObj",
"write obj files showing the cyclic matching process"
);
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
runTime.functionObjects().off(); runTime.functionObjects().off();
...@@ -523,12 +528,13 @@ int main(int argc, char *argv[]) ...@@ -523,12 +528,13 @@ int main(int argc, char *argv[])
#include "createNamedPolyMesh.H" #include "createNamedPolyMesh.H"
const bool writeObj = args.optionFound("writeObj");
const word oldInstance = mesh.pointsInstance(); const word oldInstance = mesh.pointsInstance();
const word dictName("createPatchDict"); const word dictName("createPatchDict");
#include "setSystemMeshDictionaryIO.H" #include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictIO.instance()/dictIO.name() << nl << endl;
Info<< "Reading " << dictName << nl << endl;
IOdictionary dict(dictIO); IOdictionary dict(dictIO);
...@@ -542,7 +548,10 @@ int main(int argc, char *argv[]) ...@@ -542,7 +548,10 @@ int main(int argc, char *argv[])
patches.checkParallelSync(true); patches.checkParallelSync(true);
dumpCyclicMatch("initial_", mesh); if (writeObj)
{
dumpCyclicMatch("initial_", mesh);
}
// Read patch construct info from dictionary // Read patch construct info from dictionary
PtrList<dictionary> patchSources(dict.lookup("patches")); PtrList<dictionary> patchSources(dict.lookup("patches"));
...@@ -761,7 +770,10 @@ int main(int argc, char *argv[]) ...@@ -761,7 +770,10 @@ int main(int argc, char *argv[])
autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true); autoPtr<mapPolyMesh> map = meshMod.changeMesh(mesh, true);
mesh.movePoints(map().preMotionPoints()); mesh.movePoints(map().preMotionPoints());
dumpCyclicMatch("coupled_", mesh); if (writeObj)
{
dumpCyclicMatch("coupled_", mesh);
}
// Synchronise points. // Synchronise points.
if (!pointSync) if (!pointSync)
...@@ -872,7 +884,10 @@ int main(int argc, char *argv[]) ...@@ -872,7 +884,10 @@ int main(int argc, char *argv[])
filterPatches(mesh, addedPatchNames); filterPatches(mesh, addedPatchNames);
dumpCyclicMatch("final_", mesh); if (writeObj)
{
dumpCyclicMatch("final_", mesh);
}
// Set the precision of the points data to 10 // Set the precision of the points data to 10
......
...@@ -96,6 +96,8 @@ int main(int argc, char *argv[]) ...@@ -96,6 +96,8 @@ int main(int argc, char *argv[])
Info<< "Writing points into directory " << points.path() << nl << endl; Info<< "Writing points into directory " << points.path() << nl << endl;
points.write(); points.write();
Info<< nl << "End" << nl << endl;
return 0; return 0;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -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-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -62,7 +62,6 @@ int main(int argc, char *argv[]) ...@@ -62,7 +62,6 @@ int main(int argc, char *argv[])
"merge two meshes" "merge two meshes"
); );
argList::noParallel();
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
argList::validArgs.append("masterCase"); argList::validArgs.append("masterCase");
...@@ -97,6 +96,18 @@ int main(int argc, char *argv[]) ...@@ -97,6 +96,18 @@ int main(int argc, char *argv[])
word addRegion = polyMesh::defaultRegion; word addRegion = polyMesh::defaultRegion;
args.optionReadIfPresent("addRegion", addRegion); args.optionReadIfPresent("addRegion", addRegion);
// Since we don't use argList processor directory detection, add it to
// the casename ourselves so it triggers the logic inside TimePath.
const fileName& cName = args.caseName();
std::string::size_type pos = cName.find("processor");
if (pos != string::npos && pos != 0)
{
fileName processorName = cName.substr(pos, cName.size()-pos);
masterCase += '/' + processorName;
addCase += '/' + processorName;
}
getRootCase(masterCase); getRootCase(masterCase);
getRootCase(addCase); getRootCase(addCase);
......
...@@ -2,7 +2,7 @@ ...@@ -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-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -243,8 +243,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) ...@@ -243,8 +243,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
// Mirror boundary faces patch by patch // Mirror boundary faces patch by patch
wordList newPatchTypes(boundary().size());
wordList newPatchNames(boundary().size()); labelList newToOldPatch(boundary().size(), -1);
labelList newPatchSizes(boundary().size(), -1); labelList newPatchSizes(boundary().size(), -1);
labelList newPatchStarts(boundary().size(), -1); labelList newPatchStarts(boundary().size(), -1);
label nNewPatches = 0; label nNewPatches = 0;
...@@ -303,8 +304,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) ...@@ -303,8 +304,8 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
// If patch exists, grab the name and type of the original patch // If patch exists, grab the name and type of the original patch
if (nNewFaces > newPatchStarts[nNewPatches]) if (nNewFaces > newPatchStarts[nNewPatches])
{ {
newPatchTypes[nNewPatches] = boundaryMesh()[patchI].type(); newToOldPatch[nNewPatches] = patchI;
newPatchNames[nNewPatches] = boundaryMesh()[patchI].name();
newPatchSizes[nNewPatches] = newPatchSizes[nNewPatches] =
nNewFaces - newPatchStarts[nNewPatches]; nNewFaces - newPatchStarts[nNewPatches];
...@@ -316,8 +317,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) ...@@ -316,8 +317,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
newFaces.setSize(nNewFaces); newFaces.setSize(nNewFaces);
Info<< " New faces: " << nNewFaces << endl; Info<< " New faces: " << nNewFaces << endl;
newPatchTypes.setSize(nNewPatches); newToOldPatch.setSize(nNewPatches);
newPatchNames.setSize(nNewPatches);
newPatchSizes.setSize(nNewPatches); newPatchSizes.setSize(nNewPatches);
newPatchStarts.setSize(nNewPatches); newPatchStarts.setSize(nNewPatches);
...@@ -377,18 +377,16 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) ...@@ -377,18 +377,16 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
fvMesh& pMesh = *mirrorMeshPtr_; fvMesh& pMesh = *mirrorMeshPtr_;
// Add the boundary patches // Add the boundary patches
List<polyPatch*> p(newPatchTypes.size()); List<polyPatch*> p(newPatchSizes.size());
forAll(p, patchI) forAll(p, patchI)
{ {
p[patchI] = polyPatch::New p[patchI] = boundaryMesh()[newToOldPatch[patchI]].clone
( (
newPatchTypes[patchI], pMesh.boundaryMesh(),
newPatchNames[patchI],
newPatchSizes[patchI],
newPatchStarts[patchI],
patchI, patchI,
pMesh.boundaryMesh() newPatchSizes[patchI],
newPatchStarts[patchI]
).ptr(); ).ptr();
} }
......