CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] Changing from Fill Bottle to Rinse Bottle

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2016, 11:03
Question Changing from Fill Bottle to Rinse Bottle
  #1
New Member
 
Warna Downey
Join Date: Aug 2016
Posts: 8
Rep Power: 10
anraw is on a distinguished road
I have gotten the fill bottle Tutorial of Hassan Hemida to work well for my simulations of pouring lava into water or wet sediments.

Now I would like to turn the bottle over and inject magma into the "bottle". It should be fairly simple for me to invert the mesh but I keep getting an error when I use the blockMesh command. --> FOAM FATAL ERROR:
Trying to specify a boundary face 4(2 5 19 16) on the face on cell 1 which is either an internal face or already belongs to some other patch. This is face 0 of patch 0 named inlet.

I know it's probably something elementary but since I am just learning all of this I would greatly appreciate the help in getting the mesh right. I think I need to reorder the inlet and wall conditions but I am not sure how to go about it properly.

Thanks for your help!

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices
(
(-50 230 0)
(-5 230 0)
(5 30 0)
(-50 30 0)
(5 230 0)
(-5 30 0)
(50 230 0)
(50 30 0)
(5 20 0)
(-5 20 0)
(10 10 0)
(-10 10 0)
(10 0 0)
(-10 0 0)
(-50 230 1)
(-5 230 1)
(5 30 1)
(-50 30 1)
(5 230 1)
(-5 30 1)
(50 230 1)
(50 30 1)
(5 20 1)
(-5 20 1)
(10 10 1)
(-10 10 1)
(10 0 1)
(-10 0 1)
);

blocks
(
hex (5 7 6 4 19 21 20 18) (100 200 1) simpleGrading (1 1 1)
hex (2 5 4 1 16 19 18 15) (100 200 1) simpleGrading (1 1 1)
hex (3 2 1 0 17 16 15 14) (100 200 1) simpleGrading (1 1 1)
hex (9 8 5 2 23 22 19 16) (10 200 1) simpleGrading (1 1 1)
hex (11 10 8 9 25 24 22 23) (10 20 1) simpleGrading (1 1 1)
hex (13 12 10 11 27 26 24 25) (10 20 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(2 5 19 16)
)
wall inletWall
(
(2 9 23 16)
(9 11 25 23)
(11 13 27 25)
(5 8 22 19)
(8 10 24 22)
(10 12 26 24)
)
wall bottleWall
(
(6 7 21 20)
(7 5 19 21)
(3 2 17 16)
(3 0 14 17)
)
patch atmosphere
(
(0 1 15 14)
(1 4 18 15)
(4 6 20 18)
)
empty frontAndBack
(
(0 1 2 3)
(1 4 5 2)
(4 6 7 5)
(2 5 8 9)
(9 8 10 11)
(11 10 12 13)
(14 15 16 17)
(15 18 19 16)
(18 20 21 19)
(16 19 22 23)
(23 22 24 25)
(25 24 26 27)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //
anraw is offline   Reply With Quote

Old   October 5, 2016, 11:40
Default Found Part of my mistake
  #2
New Member
 
Warna Downey
Join Date: Aug 2016
Posts: 8
Rep Power: 10
anraw is on a distinguished road
I mapped the wrong face for the inlet. Changed the patch inlet to


patches
(
patch inlet
(
(13 12 26 27)
)

Now I still have another error
--> FOAM FATAL ERROR:
Inconsistent number of faces between block pair 1 and 3

From function blockMesh::calcMergeInfo()
in file blockMesh/blockMeshMerge.C at line 217.

Maybe I can figure this thing out! Again any help is well appreciated
anraw is offline   Reply With Quote

Old   October 5, 2016, 13:01
Default Error in my vertices
  #3
New Member
 
Warna Downey
Join Date: Aug 2016
Posts: 8
Rep Power: 10
anraw is on a distinguished road
There was an error in my vertices. I finally found it after doing some checking and rechecking.

Here it is in case you want to fill a bottle. The mesh size needs to be changed but all in all it works.

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object blockMeshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices
(
(-50 230 0)
(-5 230 0)
(-5 30 0)
(-50 30 0)
(5 230 0)
(-5 30 0)
(50 230 0)
(50 30 0)
(5 20 0)
(-5 20 0)
(10 10 0)
(-10 10 0)
(10 0 0)
(-10 0 0)
(-50 230 1)
(-5 230 1)
(-5 30 1)
(-50 30 1)
(5 230 1)
(-5 30 1)
(50 230 1)
(50 30 1)
(5 20 1)
(-5 20 1)
(10 10 1)
(-10 10 1)
(10 0 1)
(-10 0 1)
);

blocks
(
hex (5 7 6 4 19 21 20 18) (10 20 1) simpleGrading (1 1 1)
hex (2 5 4 1 16 19 18 15) (10 20 1) simpleGrading (1 1 1)
hex (3 2 1 0 17 16 15 14) (10 20 1) simpleGrading (1 1 1)
hex (9 8 5 2 23 22 19 16) (10 5 1) simpleGrading (1 1 1)
hex (11 10 8 9 25 24 22 23) (10 5 1) simpleGrading (1 1 1)
hex (13 12 10 11 27 26 24 25) (10 5 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch inlet
(
(13 12 26 27)
)
wall inletWall
(
(2 9 23 16)
(9 11 25 23)
(11 13 27 25)
(5 8 22 19)
(8 10 24 22)
(10 12 26 24)
)
wall bottleWall
(
(6 7 21 20)
(7 5 19 21)
(3 2 17 16)
(3 0 14 17)
)
patch atmosphere
(
(0 1 15 14)
(1 4 18 15)
(4 6 20 18)
)
empty frontAndBack
(
(0 1 2 3)
(1 4 5 2)
(4 6 7 5)
(2 5 8 9)
(9 8 10 11)
(11 10 12 13)
(14 15 16 17)
(15 18 19 16)
(18 20 21 19)
(16 19 22 23)
(23 22 24 25)
(25 24 26 27)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //
anraw is offline   Reply With Quote

Old   August 21, 2017, 08:03
Default Help
  #4
New Member
 
Join Date: Feb 2013
Posts: 24
Rep Power: 13
me12p1006 is on a distinguished road
Hi,

I am trying the Hameda tutorial u mentioned (water filling bottle) from long back. I am not getting reasonable results.

I used inlet velocity as 0.1 m/sec. I am attaching my FOAM files. Please kindly let me know what mistake I am doing.
Attached Files
File Type: zip bottlefill.zip (8.9 KB, 3 views)
me12p1006 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
loading issue libraries:libsimpleFunctionObjects.so libsimpleSwakFunctionObjects.so immortality OpenFOAM Pre-Processing 15 April 7, 2024 13:35
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 19:58
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 08:18
Fill a bottle with water for FEA Jyrator Main CFD Forum 0 September 10, 2013 07:33
bottle fill issues Don Main CFD Forum 0 December 5, 2001 18:42


All times are GMT -4. The time now is 22:42.