tutorials/lagrangian/reactingParcelFoam/splashPanel: Resolved divergence

The side surfaces in this tutorial have been made symmetry planes to
match the corresponding boundaries in the film region, and the top has
had its pressure condition changed to totalPressure. The case now runs
successfully to completion.

Previously the pressure-velocity boundary condition combination on the
non-film patches was incorrect in that in regions of outflow a pressure
value was not being specified. This resulted in divergence.
This commit is contained in:
Will Bainbridge
2019-10-01 12:06:43 +01:00
parent 1bbac95448
commit 826c380fa3
23 changed files with 73 additions and 330 deletions

View File

@ -15,20 +15,21 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.0;
internalField uniform 0;
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -15,20 +15,21 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0.79;
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -13,7 +13,6 @@ FoamFile
location "0";
object O2;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
@ -22,13 +21,15 @@ internalField uniform 0.21;
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -21,13 +21,15 @@ internalField uniform 300;
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type fixedValue;
value uniform 300;

View File

@ -21,12 +21,14 @@ internalField uniform (0 0 0);
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
value $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type noSlip;
}

View File

@ -21,12 +21,14 @@ internalField uniform 100000;
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type calculated;
value $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type calculated;
value $internalField;

View File

@ -21,11 +21,14 @@ internalField uniform 100000;
boundaryField
{
sides
#includeEtc "caseDicts/setConstraintTypes"
top
{
type fixedFluxPressure;
type totalPressure;
p0 $internalField;
}
region0_to_wallFilmRegion_wallFilmFaces
region0_to_wallFilm_walls
{
type fixedFluxPressure;
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0/wallFilmRegion";
location "0/wallFilm";
object Tf;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -21,32 +21,14 @@ internalField uniform 300;
boundaryField
{
wallFilmFaces_top
#includeEtc "caseDicts/setConstraintTypes"
walls_top
{
type zeroGradient;
}
region0_to_wallFilmRegion_wallFilmFaces
{
type zeroGradient;
}
side1
{
type zeroGradient;
}
side2
{
type zeroGradient;
}
side3
{
type zeroGradient;
}
side4
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volVectorField;
location "0/wallFilmRegion";
location "0/wallFilm";
object Uf;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -21,32 +21,14 @@ internalField uniform (0 0 0);
boundaryField
{
wallFilmFaces_top
#includeEtc "caseDicts/setConstraintTypes"
walls_top
{
type slip;
}
region0_to_wallFilmRegion_wallFilmFaces
{
type noSlip;
}
side1
{
type noSlip;
}
side2
{
type noSlip;
}
side3
{
type noSlip;
}
side4
region0_to_wallFilm_walls
{
type noSlip;
}

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class volScalarField;
location "0/wallFilmRegion";
location "0/wallFilm";
object deltaf;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -21,32 +21,14 @@ internalField uniform 0.00013;
boundaryField
{
wallFilmFaces_top
#includeEtc "caseDicts/setConstraintTypes"
walls_top
{
type zeroGradient;
}
region0_to_wallFilmRegion_wallFilmFaces
{
type zeroGradient;
}
side1
{
type zeroGradient;
}
side2
{
type zeroGradient;
}
side3
{
type zeroGradient;
}
side4
region0_to_wallFilm_walls
{
type zeroGradient;
}

View File

@ -6,7 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
rm -rf constant/wallFilmRegion
rm -f *.obj
rm -rf constant/wallFilm
#------------------------------------------------------------------------------

View File

@ -1,31 +0,0 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
#If using batch mode
#runApplication -s wallFilmRegion \
# setSet -batch wallFilmRegion.setSet
#If using dictionary mode
runApplication -s wallFilmRegion \
topoSet -dict system/wallFilmRegion.topoSet
runApplication extrudeToRegionMesh -overwrite
#If using batch mode
#runApplication -s createWallFilmRegionPatches \
# setSet -region wallFilmRegion \
# -batch createWallFilmRegionPatches.setSet
#If using dictionary mode
runApplication -s createWallFilmRegionPatches \
topoSet -region wallFilmRegion \
-dict system/createWallFilmRegionPatches.topoSet
runApplication createPatch -region wallFilmRegion -overwrite
paraFoam -touch
paraFoam -touch -region wallFilmRegion
#------------------------------------------------------------------------------

View File

@ -3,10 +3,12 @@ cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allmesh
runApplication blockMesh
runApplication topoSet
runApplication extrudeToRegionMesh -overwrite
application=$(getApplication)
paraFoam -touchAll
runApplication $application
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -17,7 +17,7 @@ FoamFile
surfaceFilmModel thermoSingleLayer;
regionName wallFilmRegion;
regionName wallFilm;
active true;

View File

@ -1,5 +0,0 @@
# Create face sets
faceSet sideFaces1 new boxToFace (-0.00001 -0.00001 -1) (0.10001 0.00001 1)
faceSet sideFaces2 new boxToFace ( 0.09999 -0.00001 -1) (0.10001 0.05001 1)
faceSet sideFaces3 new boxToFace (-0.00001 0.04999 -1) (1.00001 0.05001 1)
faceSet sideFaces4 new boxToFace (-0.00001 -0.00001 -1) (0.00001 0.05001 1)

View File

@ -18,13 +18,11 @@ convertToMeters 0.1;
vertices
(
// back
( 0 0 0)
( 1 0 0)
( 0 0.5 0)
( 1 0.5 0)
// front
( 0 0 1)
( 1 0 1)
( 0 0.5 1)
@ -33,7 +31,7 @@ vertices
blocks
(
hex (0 1 3 2 4 5 7 6 ) (20 10 20) simpleGrading (1 1 1)
hex (0 1 3 2 4 5 7 6) (20 10 20) simpleGrading (1 1 1)
);
edges
@ -42,19 +40,26 @@ edges
boundary
(
sides
top
{
type patch;
faces
(
(1 5 7 3)
(4 5 7 6)
);
}
sides
{
type symmetry;
faces
(
(1 5 7 3)
(4 0 2 6)
(7 3 2 6)
(0 4 5 1)
);
}
filmWalls
walls
{
type wall;
faces

View File

@ -14,9 +14,9 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
region wallFilmRegion;
region wallFilm;
faceZones (wallFilmFaces);
faceZones (walls);
oneD false;

View File

@ -18,23 +18,23 @@ FoamFile
actions
(
{
name wallFilmFaceSet;
name walls;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name filmWalls;
name walls;
}
}
{
name wallFilmFaces;
name walls;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet wallFilmFaceSet;
faceSet walls;
}
}
);

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "system/wallFilmRegion";
location "system/wallFilm";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -10,7 +10,7 @@ FoamFile
version 2.0;
format ascii;
class dictionary;
location "system/wallFilmRegion";
location "system/wallFilm";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,120 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
// a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
// is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
// and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
// setting.
// - optionally pointSync true to guarantee points to line up.
// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
// "face 0 area does not match neighbour 2 by 0.0100005%"
// " -- possible face ordering problem."
// - in polyMesh/boundary file:
// - loosen matchTolerance of all cyclics to get case to load
// - or change patch type from 'cyclic' to 'patch'
// and regenerate cyclic as above
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclics).
pointSync false;
// Optional: Write cyclic matches into .obj format; defaults to false.
writeCyclicMatch false;
// Patches to create.
patches
(
{
// Name of new patch
name side1;
// Type of new patch
patchInfo
{
type patch;
}
// How to construct: either from 'patches' or 'set'
constructFrom set;
// If constructFrom = set : name of faceSet
set sideFaces1;
}
{
// Name of new patch
name side2;
// Type of new patch
patchInfo
{
type patch;
}
// How to construct: either from 'patches' or 'set'
constructFrom set;
// If constructFrom = set : name of faceSet
set sideFaces2;
}
{
// Name of new patch
name side3;
// Type of new patch
patchInfo
{
type patch;
}
// How to construct: either from 'patches' or 'set'
constructFrom set;
// If constructFrom = set : name of faceSet
set sideFaces3;
}
{
// Name of new patch
name side4;
// Type of new patch
patchInfo
{
type patch;
}
// How to construct: either from 'patches' or 'set'
constructFrom set;
// If constructFrom = set : name of faceSet
set sideFaces4;
}
);
// ************************************************************************* //

View File

@ -1,62 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name sideFaces1;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (-0.00001 -0.00001 -1) (0.10001 0.00001 1);
}
}
{
name sideFaces2;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box ( 0.09999 -0.00001 -1) (0.10001 0.05001 1);
}
}
{
name sideFaces3;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (-0.00001 0.04999 -1) (1.00001 0.05001 1);
}
}
{
name sideFaces4;
type faceSet;
action new;
source boxToFace;
sourceInfo
{
box (-0.00001 -0.00001 -1) (0.00001 0.05001 1);
}
}
);
// ************************************************************************* //

View File

@ -1,3 +0,0 @@
# Create face set
faceSet wallFilmFaces new patchToFace filmWalls
faceZoneSet wallFilmFaces new setToFaceZone wallFilmFaces