Ananthakrishnan |
August 19, 2015 03:43 |
setFields zone to cell:solver crashes
Hi,
I tried using setFields option with zone to cell. There are three zones with three different fluids. After starting the multiphaseInterFoam it crashes immediately.
If I use box to cell method the solver does not crash. Please let me know the mistake in my process.
As seen below the blockmesh contains 3 different zones named cement, mud and spacer. I then use this named zone in set fields
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//convertToMeters 0.001;
//5 mm column diameter
//10 cm length
//Width of middle square section
//how many cells in the square section
//how many cells from square section to perimeter
// how many cells from top to bottom
vertices
(
( 1.25 0.0 1.25) // Vertex fiveoclocksqb = 0
(-1.25 0.0 1.25) // Vertex sevenoclocksqb = 1
(-1.25 0.0 -1.25) // Vertex elevenoclocksqb = 2
( 1.25 0.0 -1.25) // Vertex oneoclocksqb = 3
( 1.76776695455285 0.0 1.76776695137989) // Vertex fiveoclockcb = 4
(-1.76776695455285 0.0 1.76776695137989) // Vertex sevenoclockcb = 5
(-1.76776695455285 0.0 -1.76776695137989) // Vertex elevenoclockcb = 6
( 1.76776695455285 0.0 -1.76776695137989) // Vertex oneoclockcb = 7
//zone 1
( 1.25 5.0 1.25) // Vertex fiveoclocksqt = 8
(-1.25 5.0 1.25) // Vertex sevenoclocksqt = 9
(-1.25 5.0 -1.25) // Vertex elevenoclocksqt = 10
( 1.25 5.0 -1.25) // Vertex oneoclocksqt = 11
( 1.76776695455285 5.0 1.76776695137989) // Vertex fiveoclockcb = 4
(-1.76776695455285 5.0 1.76776695137989) // Vertex sevenoclockcb = 5
(-1.76776695455285 5.0 -1.76776695137989) // Vertex elevenoclockcb = 6
( 1.76776695455285 5.0 -1.76776695137989) // Vertex oneoclockcb = 7
//zone 2
( 1.25 30.0 1.25) // Vertex fiveoclocksqt = 8
(-1.25 30.0 1.25) // Vertex sevenoclocksqt = 9
(-1.25 30.0 -1.25) // Vertex elevenoclocksqt = 10
( 1.25 30.0 -1.25) // Vertex oneoclocksqt = 11
( 1.76776695455285 30.0 1.76776695137989) // Vertex fiveoclockcb = 4
(-1.76776695455285 30.0 1.76776695137989) // Vertex sevenoclockcb = 5
(-1.76776695455285 30.0 -1.76776695137989) // Vertex elevenoclockcb = 6
( 1.76776695455285 30.0 -1.76776695137989) // Vertex oneoclockcb = 7
//zone 3
( 1.25 200 1.25) // Vertex fiveoclocksqt = 8
(-1.25 200 1.25) // Vertex sevenoclocksqt = 9
(-1.25 200 -1.25) // Vertex elevenoclocksqt = 10
( 1.25 200 -1.25) // Vertex oneoclocksqt = 11
( 1.76776695455285 200 1.76776695137989) // Vertex fiveoclockct = 12
(-1.76776695455285 200 1.76776695137989) // Vertex sevenoclockct = 13
(-1.76776695455285 200 -1.76776695137989) // Vertex elevenoclockct = 14
( 1.76776695455285 200 -1.76776695137989) // Vertex oneoclockct = 15
);
blocks
(
//square block
hex ( 1 0 3 2 9 8 11 10)cement (5 5 20) simpleGrading (1 1 1)
//slice1
hex (5 4 0 1 13 12 8 9)cement (5 5 20) simpleGrading (1 1 1)
//slice2
hex (1 2 6 5 9 10 14 13 )cement (5 5 20) simpleGrading (1 1 1)
//slice3
hex (2 3 7 6 10 11 15 14)cement (5 5 20) simpleGrading (1 1 1)
//slice4
hex (3 0 4 7 11 8 12 15)cement (5 5 20) simpleGrading (1 1 1)
hex (9 8 11 10 17 16 19 18) spacer (5 5 30) simpleGrading (1 1 1)
hex (13 12 9 8 21 20 16 17) spacer (5 5 30) simpleGrading (1 1 1)
hex (9 10 14 13 17 18 22 21) spacer (5 5 30) simpleGrading (1 1 1)
hex (10 11 15 14 18 19 23 22) spacer (5 5 30) simpleGrading (1 1 1)
hex (11 8 12 15 19 16 20 23) spacer (5 5 30) simpleGrading (1 1 1)
hex (17 16 19 18 25 24 27 26) mud (5 5 150) simpleGrading (1 1 1)
hex (21 20 16 17 29 28 24 25) mud (5 5 150) simpleGrading (1 1 1)
hex (17 18 22 21 25 26 30 29) mud (5 5 150) simpleGrading (1 1 1)
hex (18 19 23 22 26 27 31 30) mud (5 5 150) simpleGrading (1 1 1)
hex (19 16 20 23 27 24 28 31) mud (5 5 150) simpleGrading (1 1 1)
);
//create the quarter circles
edges
(
arc 4 5 (0.0 0.0 2.5)
arc 5 6 (-2.5 0.0 0.0)
arc 6 7 (0.0 0.0 -2.5)
arc 7 4 (2.5 0.0 0.0)
arc 12 13 (0.0 5 2.5)
arc 13 14 (-2.5 5 0.0)
arc 14 15 (0.0 5 -2.5)
arc 15 12 (2.5 5 0.0)
arc 20 21 (0.0 30 2.5)
arc 21 22 (-2.5 30.0 0.0)
arc 22 23 (0.0 30.0 -2.5)
arc 23 20 (2.5 30.0 0.0)
arc 28 29 (0.0 200.0 2.5)
arc 29 30 (-2.5 200.0 0.0)
arc 30 31 (0.0 200.0 -2.5)
arc 31 28 (2.5 200.0 0.0)
);
boundary
(
fixedWalls
{
type wall;
faces
(
(5 4 12 13)
(13 12 20 21)
(21 20 28 29)
(5 13 14 6)
(13 21 22 14)
(21 29 30 22)
(6 14 15 7)
(14 22 23 15)
(22 30 31 23)
(7 15 12 4)
(15 23 20 12)
(23 31 28 20)
);
}
lowerWall
{
type wall;
faces
(
(0 3 2 1)
(0 4 7 3)
(4 0 1 5)
(1 2 6 5)
(3 7 6 2)
);
}
atmosphere
{
type patch;
faces
(
(24 27 26 25)
(24 28 31 27)
(28 24 25 29)
(25 26 30 29)
(27 31 30 26)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //
The below image shows the block diagram of the various zones created using the above blockmesh
http://s27.postimg.org/b9np3zo9r/blockzones.jpg
Below is the set fields dictionary
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.mud 1
volScalarFieldValue alpha.spacer 0
volScalarFieldValue alpha.cement 0
volVectorFieldValue U ( 0 0 0 )
);
regions
(
zoneToCell
{
name "mud";
fieldValues
(
volScalarFieldValue alpha.mud 1
volScalarFieldValue alpha.spacer 0
volScalarFieldValue alpha.cement 0
);
}
zoneToCell
{
name "spacer";
fieldValues
(
volScalarFieldValue alpha.mud 0
volScalarFieldValue alpha.spacer 1
volScalarFieldValue alpha.cement 0
);
}
zoneToCell
{
name "cement";
fieldValues
(
volScalarFieldValue alpha.mud 0
volScalarFieldValue alpha.spacer 0
volScalarFieldValue alpha.cement 1
);
}
/*boxToCell
{
box ( -4 0 -4 ) ( 4 30 4 );
fieldValues
(
volScalarFieldValue alpha.mud 0
volScalarFieldValue alpha.spacer 1
volScalarFieldValue alpha.cement 0
);
}
boxToCell
{
box ( -4 0 -4 ) ( 4 5 4 );
fieldValues
(
volScalarFieldValue alpha.mud 0
volScalarFieldValue alpha.spacer 0
volScalarFieldValue alpha.cement 1
);
}*/
);
// ************************************************************************* //
please let me know what is the correct way of creating mesh with multiple zones and using it in set fields.
Thank you very much
With regards
Ananthakrishnan
|