|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
|
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 ![]() 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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 11 ![]() |
Hi
I have a similar problem. Did you find a solution to this problem. Thank you. Saurabh |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
|
Hi,
unfortunately no. i continued with box to cell. This might be a blunder.. just random thought.. I feel that somehow there are some vacuum cells ( cells where nothing is initialized ). May be u can check by keeping the interface cells of adjacent zones in both the zones and overwrite the cells in the set fields in the required order so as to satisfy the final requirement. Please ignore, if it doesnt make any sense to you!!! Hope you find the solution soon, Cheers AK |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Saurabh Tandon
Join Date: Nov 2015
Location: Austin
Posts: 43
Rep Power: 11 ![]() |
Hi
Did you try using cellToCell. That helped me. This is my code and it works for me. I have already defined the fields and the cells. defaultFieldValues ( volScalarFieldValue DT 3e-09 volScalarFieldValue Tb 3 ); regions ( // Set patch values (using ==) cellToCell { set "PoreWater"; fieldValues ( volScalarFieldValue DT 2e-09 volScalarFieldValue Tb 1.5 ); } ); I use funkySetFields to set more intricate fields. Hope this helps. Thank you. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
|
oh great.
Actually box to cell did the job for me. So it ended there for me. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) | Aadhavan | OpenFOAM Meshing & Mesh Conversion | 2 | March 8, 2018 02:47 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 10:28 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 18:51 |
Problem in IMPORT of ICEM input file in FLUENT | csvirume | FLUENT | 2 | September 9, 2009 02:08 |