BUG: regression in handling of finiteArea processor boundaries (#2507)
- update the area-centres processor/processor information as part of faMesh::init() after all of the global data and geometry data is setup. - improve flattenEdgeField helper to properly handle empty patches. This change removes the false fails when testing edge-centre redistribution (FULLDEBUG mode). TUT: add filmPanel (rivulet) tutorial
This commit is contained in:
parent
7f748bd5fd
commit
8efa44734a
@ -118,52 +118,83 @@ Foam::faMeshDistributor::faMeshDistributor
|
||||
Pout<< "Create from nFaces:" << srcMesh.faceLabels().size()
|
||||
<< " to:" << tgtMesh.faceLabels().size() << endl;
|
||||
|
||||
vectorField oldFaceCentres(srcMesh_.areaCentres());
|
||||
vectorField newFaceCentres(tgtMesh_.areaCentres());
|
||||
|
||||
// volume: cells, area: faces
|
||||
distMap_.distributeCellData(oldFaceCentres);
|
||||
vectorField diff(newFaceCentres - oldFaceCentres);
|
||||
|
||||
Pout<< "diff faces: " << diff << endl;
|
||||
|
||||
vectorField oldEdgeCentres
|
||||
(
|
||||
faMeshTools::flattenEdgeField(srcMesh_.edgeCentres())
|
||||
);
|
||||
vectorField newEdgeCentres
|
||||
(
|
||||
faMeshTools::flattenEdgeField(tgtMesh_.edgeCentres())
|
||||
);
|
||||
|
||||
Pout<< "distributed edges: " << oldEdgeCentres.size() << " from "
|
||||
<< srcMesh.nEdges() << " to " << tgtMesh.nEdges() << endl;
|
||||
|
||||
// volume: faces, area: edges
|
||||
distMap_.distributeFaceData(oldEdgeCentres);
|
||||
|
||||
diff = (newEdgeCentres - oldEdgeCentres);
|
||||
|
||||
Pout<< "diff edges: " << diff << endl;
|
||||
|
||||
Info<< "Patch edge maps" << endl;
|
||||
forAll(patchEdgeMaps_, patchi)
|
||||
// Check face centres
|
||||
{
|
||||
if (patchEdgeMaps_.set(patchi))
|
||||
vectorField oldFaceCentres(srcMesh_.areaCentres());
|
||||
vectorField newFaceCentres(tgtMesh_.areaCentres());
|
||||
|
||||
// volume: cells, area: faces
|
||||
distMap_.distributeCellData(oldFaceCentres);
|
||||
|
||||
vectorField diff(newFaceCentres - oldFaceCentres);
|
||||
|
||||
if (!diff.empty() && !diff.uniform())
|
||||
{
|
||||
Pout<< "patch " << patchi << " : "
|
||||
<< patchEdgeMaps_[patchi].info() << endl;
|
||||
forAll(oldFaceCentres, facei)
|
||||
{
|
||||
if (oldFaceCentres[facei] != newFaceCentres[facei])
|
||||
{
|
||||
Pout<< "face: " << facei
|
||||
<< ' ' << oldFaceCentres[facei]
|
||||
<< " vs " << newFaceCentres[facei]
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Info<< nl << "Detailed patch maps" << endl;
|
||||
|
||||
forAll(patchEdgeMaps_, patchi)
|
||||
// Check edge centres
|
||||
{
|
||||
if (patchEdgeMaps_.set(patchi))
|
||||
vectorField oldEdgeCentres
|
||||
(
|
||||
faMeshTools::flattenEdgeField(srcMesh_.edgeCentres())
|
||||
);
|
||||
vectorField newEdgeCentres
|
||||
(
|
||||
faMeshTools::flattenEdgeField(tgtMesh_.edgeCentres())
|
||||
);
|
||||
|
||||
Pout<< "distributed edges: " << oldEdgeCentres.size() << " from "
|
||||
<< srcMesh.nEdges() << " to " << tgtMesh.nEdges() << endl;
|
||||
|
||||
// volume: faces, area: edges
|
||||
distMap_.distributeFaceData(oldEdgeCentres);
|
||||
|
||||
vectorField diff(newEdgeCentres - oldEdgeCentres);
|
||||
|
||||
if (!diff.empty() && !diff.uniform())
|
||||
{
|
||||
Info<< "patch " << patchi << " : "
|
||||
<< patchEdgeMaps_[patchi] << endl;
|
||||
forAll(oldEdgeCentres, edgei)
|
||||
{
|
||||
if (oldEdgeCentres[edgei] != newEdgeCentres[edgei])
|
||||
{
|
||||
Pout<< "edge: " << edgei
|
||||
<< ' ' << oldEdgeCentres[edgei]
|
||||
<< " vs " << newEdgeCentres[edgei]
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "Patch edge maps" << endl;
|
||||
forAll(patchEdgeMaps_, patchi)
|
||||
{
|
||||
if (patchEdgeMaps_.set(patchi))
|
||||
{
|
||||
Pout<< "patch " << patchi << " : "
|
||||
<< patchEdgeMaps_[patchi].info() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
Info<< nl << "Detailed patch maps" << endl;
|
||||
|
||||
forAll(patchEdgeMaps_, patchi)
|
||||
{
|
||||
if (patchEdgeMaps_.set(patchi))
|
||||
{
|
||||
Info<< "patch " << patchi << " : "
|
||||
<< patchEdgeMaps_[patchi] << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ License
|
||||
#include "areaFields.H"
|
||||
#include "edgeFields.H"
|
||||
#include "faMeshLduAddressing.H"
|
||||
#include "processorFaPatch.H"
|
||||
#include "wedgeFaPatch.H"
|
||||
#include "faPatchData.H"
|
||||
|
||||
@ -283,6 +284,13 @@ bool Foam::faMesh::init(const bool doInit)
|
||||
// Calculate the geometry for the patches (transformation tensors etc.)
|
||||
boundary_.calcGeometry();
|
||||
|
||||
// Ensure area information is properly synchronised
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
const_cast<areaVectorField&>(areaCentres()).boundaryFieldRef()
|
||||
.evaluateCoupled<processorFaPatch>();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -31,12 +31,12 @@ License
|
||||
#include "areaFields.H"
|
||||
#include "edgeFields.H"
|
||||
#include "fac.H"
|
||||
#include "processorFaPatch.H"
|
||||
#include "wedgeFaPatch.H"
|
||||
#include "cartesianCS.H"
|
||||
#include "scalarMatrices.H"
|
||||
#include "processorFaPatch.H"
|
||||
#include "processorFaPatchFields.H"
|
||||
#include "emptyFaPatchFields.H"
|
||||
#include "wedgeFaPatch.H"
|
||||
#include "triPointRef.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
@ -42,35 +42,35 @@ Foam::tmp<Foam::Field<Type>> Foam::faMeshTools::flattenEdgeField
|
||||
auto& result = tresult.ref();
|
||||
|
||||
// Internal field
|
||||
result.slice(0, fld.size()) = fld;
|
||||
result.slice(0, fld.size()) = fld.primitiveField();
|
||||
|
||||
if (primitiveOrdering)
|
||||
label start = fld.size();
|
||||
|
||||
// Boundary fields
|
||||
forAll(fld.boundaryField(), patchi)
|
||||
{
|
||||
// Boundary field in primitive patch order
|
||||
const labelList& edgeLabels = mesh.boundary()[patchi].edgeLabels();
|
||||
const label len = edgeLabels.size();
|
||||
const auto& pfld = fld.boundaryField()[patchi];
|
||||
|
||||
forAll(fld.boundaryField(), patchi)
|
||||
// Only assign when field size matches underlying patch size
|
||||
// ie, skip 'empty' patches etc
|
||||
|
||||
if (len == pfld.size())
|
||||
{
|
||||
UIndirectList<Type>
|
||||
(
|
||||
result,
|
||||
mesh.boundary()[patchi].edgeLabels()
|
||||
) = fld.boundaryField()[patchi];
|
||||
if (primitiveOrdering)
|
||||
{
|
||||
// In primitive patch order
|
||||
UIndirectList<Type>(result, edgeLabels) = pfld;
|
||||
}
|
||||
else
|
||||
{
|
||||
// In sub-list (slice) order
|
||||
result.slice(start, len) = pfld;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Boundary field in sub-list (slice) order
|
||||
|
||||
label start = fld.size();
|
||||
|
||||
forAll(fld.boundaryField(), patchi)
|
||||
{
|
||||
const label len = mesh.boundary()[patchi].size();
|
||||
|
||||
result.slice(start, len) = fld.boundaryField()[patchi];
|
||||
|
||||
start += len;
|
||||
}
|
||||
start += len;
|
||||
}
|
||||
|
||||
return tresult;
|
||||
|
@ -0,0 +1,98 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Ux 0;
|
||||
Uy 0;
|
||||
Uz 0;
|
||||
CON 100;
|
||||
|
||||
Uinlet uniform ($Ux $Uy $Uz);
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
"(inlet|outlet)"
|
||||
{
|
||||
type fixedValue;
|
||||
value $Uinlet;
|
||||
}
|
||||
|
||||
"(side|back)"
|
||||
{
|
||||
//type zeroGradient;
|
||||
type fixedValue;
|
||||
value $Uinlet;
|
||||
}
|
||||
|
||||
film
|
||||
{
|
||||
type velocityFilmShell;
|
||||
active true;
|
||||
U U;
|
||||
pRef 1e5;
|
||||
T0 313.15;;
|
||||
deltaWet 5e-5; // dry vs wet
|
||||
|
||||
thermo
|
||||
{
|
||||
H2O;
|
||||
}
|
||||
|
||||
turbulence laminar;
|
||||
|
||||
laminarCoeffs
|
||||
{
|
||||
shearStress simple;
|
||||
friction quadraticProfile; //
|
||||
//n 0.03;// Manning number
|
||||
Cf 0; //1e-18;//0.001;//0.9;
|
||||
// Gas/liquid/surface friction for DarcyWeisbach 0.0
|
||||
// the friction is with the wall
|
||||
}
|
||||
|
||||
injectionModels ();
|
||||
|
||||
forces (perturbedTemperatureDependentContactAngle);
|
||||
|
||||
perturbedTemperatureDependentContactAngleCoeffs
|
||||
{
|
||||
Ccf 0.4;
|
||||
theta constant 0;
|
||||
distribution
|
||||
{
|
||||
type normal;
|
||||
normalDistribution
|
||||
{
|
||||
minValue $CON;
|
||||
maxValue $CON;
|
||||
mu $CON;
|
||||
sigma 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
region film;
|
||||
liquidFilmModel kinematicThinFilm;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,51 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class areaVectorField;
|
||||
location "0";
|
||||
object Uf_film;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Uin 0.309;
|
||||
// To fix original position, no rotate, gravity is modified
|
||||
|
||||
// alphaPlateFix 90;
|
||||
// Uin_y #eval{ - $Uin*sin(degToRad($alphaPlateFix)) };
|
||||
// Uin_z #eval{ $Uin*cos(degToRad($alphaPlateFix)) };
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 #eval{ -$Uin } 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
side
|
||||
{
|
||||
//type fixedValue;
|
||||
//value $internalField;
|
||||
type slip;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,44 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class areaScalarField;
|
||||
location "0";
|
||||
object h_film;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 1e-3;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
side
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue $internalField;
|
||||
value $internalField;
|
||||
phi phi2s_film;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
"(outlet|side|back)"
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
film
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
#includeEtc "caseDicts/setConstraintTypes"
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
8
tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allclean
Executable file
8
tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allclean
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cleanCase0
|
||||
|
||||
#------------------------------------------------------------------------------
|
33
tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allrun-parallel
Executable file
33
tutorials/incompressible/pimpleFoam/laminar/filmPanel0/Allrun-parallel
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
restore0Dir
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
decompDict="-decomposeParDict system/decomposeParDict.4"
|
||||
|
||||
if false
|
||||
then
|
||||
# Simple preparation
|
||||
|
||||
runApplication makeFaMesh
|
||||
|
||||
runApplication decomposePar
|
||||
|
||||
else
|
||||
|
||||
# Additional steps (to exercise some functionality)
|
||||
|
||||
runParallel $decompDict -s decompose redistributePar -decompose
|
||||
|
||||
runParallel $decompDict makeFaMesh
|
||||
|
||||
runParallel -s redistribute redistributePar -overwrite
|
||||
fi
|
||||
|
||||
runParallel $(getApplication)
|
||||
|
||||
#------------------------------------------------------------------------------
|
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
alpha 5;
|
||||
alphax 0;
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
|
||||
value #eval
|
||||
{
|
||||
-9.81 * vector
|
||||
(
|
||||
sin(degToRad($alphax)),
|
||||
sin(degToRad($alpha)),
|
||||
cos(degToRad($alpha))
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,24 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object transportProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
transportModel Newtonian;
|
||||
|
||||
nu 1e-5;
|
||||
|
||||
rhoInf 1.2;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,19 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,118 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
scale 1;
|
||||
|
||||
xside 0.05;
|
||||
xcore 0.51;
|
||||
ymax 1.22;
|
||||
zmin -0.01;
|
||||
|
||||
cellWidth 0.005;
|
||||
//cellWidth 0.01;
|
||||
|
||||
nx #eval{ round($xside / $cellWidth) };
|
||||
nxin #eval{ round($xcore / $cellWidth) };
|
||||
ny #eval{ round($ymax / $cellWidth) };
|
||||
nz 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
// side
|
||||
(0 0 $zmin)
|
||||
($xside 0 $zmin)
|
||||
($xside $ymax $zmin)
|
||||
(0 $ymax $zmin)
|
||||
(0 0 0)
|
||||
($xside 0 0)
|
||||
($xside $ymax 0)
|
||||
(0 $ymax 0)
|
||||
|
||||
// central core
|
||||
(#eval{$xcore + $xside} 0 $zmin)
|
||||
(#eval{$xcore + $xside} $ymax $zmin)
|
||||
(#eval{$xcore + $xside} 0 0)
|
||||
(#eval{$xcore + $xside} $ymax 0)
|
||||
|
||||
// side
|
||||
(#eval{$xcore + 2*$xside} 0 $zmin)
|
||||
(#eval{$xcore + 2*$xside} $ymax $zmin)
|
||||
(#eval{$xcore + 2*$xside} 0 0)
|
||||
(#eval{$xcore + 2*$xside} $ymax 0)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7 ) ($nx $ny $nz) grading (1 1 1)
|
||||
hex (1 8 9 2 5 10 11 6 ) ($nxin $ny $nz) grading (1 1 1)
|
||||
hex (8 12 13 9 10 14 15 11) ($nx $ny $nz) grading (1 1 1)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(2 9 11 6)
|
||||
);
|
||||
}
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 5 4)
|
||||
(1 8 10 5)
|
||||
(8 12 14 10)
|
||||
);
|
||||
}
|
||||
side
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 3 7 4)
|
||||
(12 14 15 13)
|
||||
(3 2 6 7)
|
||||
(9 13 15 11)
|
||||
);
|
||||
}
|
||||
back
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(5 10 11 6)
|
||||
(10 14 15 11)
|
||||
);
|
||||
}
|
||||
film
|
||||
{
|
||||
type patch;
|
||||
faces
|
||||
(
|
||||
(0 1 2 3)
|
||||
(1 8 9 2)
|
||||
(8 12 13 9)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,69 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//libs (regionFaModels);
|
||||
|
||||
application pimpleFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 5;
|
||||
|
||||
deltaT 0.0005;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 400;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat binary; // ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
adjustTimeStep no;
|
||||
|
||||
maxCo 1;
|
||||
|
||||
maxDeltaT 0.1;
|
||||
|
||||
functions
|
||||
{
|
||||
#include "sampling"
|
||||
|
||||
residuals
|
||||
{
|
||||
type solverInfo;
|
||||
libs (utilityFunctionObjects);
|
||||
fields (".*");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 12;
|
||||
|
||||
method scotch;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 16;
|
||||
|
||||
method scotch;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,21 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object decomposeParDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
numberOfSubdomains 8;
|
||||
|
||||
method scotch;
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,42 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/faMesh";
|
||||
object faMeshDefinition;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
polyMeshPatches ( film );
|
||||
|
||||
boundary
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type patch;
|
||||
neighbourPolyPatch inlet;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type patch;
|
||||
neighbourPolyPatch outlet;
|
||||
}
|
||||
|
||||
side
|
||||
{
|
||||
type patch;
|
||||
neighbourPolyPatch side;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************** //
|
@ -0,0 +1,57 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phif_film,hf_film) Gauss upwind;//Gamma 0.5;
|
||||
div(phi2s_film,Uf_film) Gauss upwind;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(hf_film) Gauss linear limited 0.33;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default limited 0.33;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
hf_film true;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object faSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
Uf_film
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.0;
|
||||
}
|
||||
|
||||
hf_film
|
||||
{
|
||||
solver PBiCGStab;
|
||||
preconditioner DILU;
|
||||
tolerance 1e-08;
|
||||
relTol 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor true;
|
||||
nOuterCorr 4;
|
||||
nCorr 1;
|
||||
nNonOrthCorr 0;
|
||||
|
||||
nFilmCorr 1;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
hf_Film 0.9;
|
||||
Uf_Film 0.9;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,54 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default Euler;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
grad(p) Gauss linear;
|
||||
grad(U) Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(phi,U) Gauss linearUpwind grad(U);
|
||||
div((nuEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
interpolate(HbyA) linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,87 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: v2206 |
|
||||
| \\ / A nd | Website: www.openfoam.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
"pcorr.*"
|
||||
{
|
||||
solver GAMG;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration no;
|
||||
|
||||
tolerance 0.02;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
$pcorr;
|
||||
tolerance 1e-06;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
pFinal
|
||||
{
|
||||
$p;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
U
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother GaussSeidel;
|
||||
tolerance 1e-05;
|
||||
relTol 0.01;
|
||||
}
|
||||
|
||||
UFinal
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-06;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
cellMotionUx
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
correctPhi no;
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 1;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
|
||||
pRefCell 0;
|
||||
pRefValue 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
equations
|
||||
{
|
||||
"U.*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
@ -0,0 +1,73 @@
|
||||
// -*- C++ -*-
|
||||
|
||||
probes
|
||||
{
|
||||
type probes;
|
||||
libs (sampling);
|
||||
|
||||
writeControl timeStep;
|
||||
writeInterval 2;
|
||||
probeLocations
|
||||
(
|
||||
(0.305 0.02 -0.01)
|
||||
(0.305 0.27 -0.01)
|
||||
(0.305 0.52 -0.01)
|
||||
(0.305 0.77 -0.01)
|
||||
(0.305 1.02 -0.01)
|
||||
(0.305 1.21 -0.01)
|
||||
);
|
||||
fixedLocations false;
|
||||
fields
|
||||
(
|
||||
p U
|
||||
);
|
||||
}
|
||||
|
||||
patch
|
||||
{
|
||||
enabled false;
|
||||
type surfaces;
|
||||
libs (sampling);
|
||||
|
||||
surfaceFormat boundaryData;
|
||||
writeControl adjustableRunTime;
|
||||
writeInterval 0.1;
|
||||
interpolationScheme cell;
|
||||
|
||||
surfaceFormat vtk;
|
||||
fields (U p hf_film ); // ( alpha.water p U k omega);
|
||||
surfaces
|
||||
{
|
||||
film
|
||||
{
|
||||
type patch;
|
||||
patches ("film.*");
|
||||
interpolate true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
area
|
||||
{
|
||||
type areaWrite;
|
||||
libs (utilityFunctionObjects);
|
||||
|
||||
// Write at same frequency as fields
|
||||
writeControl outputTime;
|
||||
writeInterval 1;
|
||||
|
||||
fields (U p hf_film );
|
||||
|
||||
surfaceFormat ensight;
|
||||
formatOptions
|
||||
{
|
||||
ensight
|
||||
{
|
||||
format binary;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
Loading…
Reference in New Issue
Block a user