|
[Sponsors] |
November 24, 2022, 08:44 |
Boundary field error
|
#1 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
Hello, I am trying to put an inlet and outlet in a box, and i am trying to model the air ventilation in a room, however my simulation when it runs keeps on giving me this error: test/0/T.boundaryField at line 27. However line 27 is still okay i would say there are no parenthesis error too. What maybe causing this error then the blockMesh dict file looks like this, am i doing something wrong with the blockMesh file?
FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // Exported by SnappyHexMesh GUI add-on for Blender v1.0 // Source file: G:\wsl-ubuntu20.04\rootfs\home\ms\OpenFOAM\ms-v2006\covidVenNew\constant\triSurface\fannew.blend // Export date: 2021-04-06 18:40:32.642516 convertToMeters 1; vertices ( ( 0.0 0.0 0.0 ) ( 7.8 0.0 0.0 ) ( 7.8 7.8 0.0 ) ( 0.0 7.8 0.0 ) ( 0.0 0.0 3.1 ) ( 7.8 0.0 3.1 ) ( 7.8 7.8 3.1 ) ( 0.0 7.8 3.1 ) ); blocks ( hex (0 1 2 3 4 5 6 7) (100 100 50) simpleGrading (1 1 1) //hex (0 1 2 3 4 5 6 7) (96 64 64) simpleGrading (1 1 1) ); edges ( ); boundary ( world { type patch; faces ( (3 7 6 2) (0 4 7 3) (2 6 5 1) (1 5 4 0) (0 3 2 1) (4 5 6 7) ); } ); |
|
November 24, 2022, 09:03 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Hi,
Yann |
|
November 24, 2022, 09:04 |
|
#3 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
This is the T file
FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object T; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 1 0 0 0]; internalField uniform 297.15; boundaryField { body { type fixedValue; value uniform 299.75; } hands { type fixedValue; value uniform 299.75; } head { type fixedValue; value uniform 304.95; } mouth { type fixedValue; value uniform 304.95; } sidewalls { type fixedValue; value uniform 297.15; } inlet { type fixedValue; value uniform 283.15; } outlet { type fixedValue; value $internalField ; } } |
|
November 24, 2022, 09:06 |
|
#4 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
yes blockmesh runs properly
|
|
November 24, 2022, 09:07 |
|
#5 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
This is the error message
--> FOAM FATAL IO ERROR: (openfoam-2106 patch=211215) Cannot find patchField entry for world file: /home/rabia/RabiaOpenFOAM/test/0/T.boundaryField at line 27. From void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam:imensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh] in file /usr/lib/openfoam/openfoam2106/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 172. FOAM exiting |
|
November 24, 2022, 09:23 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Thanks!
How do you create your mesh? With blockMesh only or blockMesh+snappyHexMesh? From the files you have posted: blockMesh creates a domain and all patches are named world. In your T file you have boundary conditions defined for a lot bunch of patches which probably do not exist in the mesh if you just ran blockMesh (hands, head, mouth etc...) but there is no boundary condition for the patch world and this is what the solver complains about. Yann |
|
November 24, 2022, 09:25 |
|
#7 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
I am using snappyHexMesh. However, the model worked before when there was no inlet and outlet. It worked with the patch world and now its not working when i have introduced inlet and outlet into the model.
|
|
November 24, 2022, 09:30 |
|
#8 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
How do we know which patch number matches which vertice because i think i need to amend the blockmesh file maybe but i dont know what patch my inlet and outlet is at
|
|
November 24, 2022, 09:37 |
|
#9 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
have a look at the boundary file:
This is the list of the boundaries of your mesh. Each boundary needs a boundary condition. If there are missing boundary names or additional ones, it means something goes wrong with snappyHexMesh, blockMesh, or the STL files you are using with snappyHexMesh. Yann |
|
November 24, 2022, 09:39 |
|
#10 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Quote:
|
||
November 24, 2022, 09:55 |
|
#11 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
Thanks, i also have another issue with the postprocessing, when i postprocess the results and use reconstructPara command from parrallel computing, then i open a.foam in paraview, for some reason it does not start from 0 time, why this maybe the case, it directly starts from the second time instance for example if i did 5 seconds interval the paraview starts showing from 5 seconds and not at 0 seconds. I need this because i would want to animate my simulation so it must start from 0. Here is the command:
reconstructPar -time '0,5,10,15,20,25' |
|
November 24, 2022, 11:18 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
When loading your .foam file in paraview, uncheck the "skip zero time" option.
|
|
November 28, 2022, 09:56 |
|
#13 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
Thanks, I can now see the simulation from 0, i have another question about, the blockMesh, I have this example block mesh in which there are coordinates, x y and z and then i believe the 0 , 1 , 2 etc. is the patch number, but what are these coordinates then if i was to match these to my .stl file block?
vertices ( (0.0 0.0 0.4) //0 (0.0 0.4 0.4) //1 (0.8 0.4 0.4) //2 (0.8 0.0 0.4) //3 (0.0 0.0 0.38) //4 (0.0 0.18 0.38) //5 (0.0 0.22 0.38) //6 (0.0 0.4 0.38) //7 (0.8 0.4 0.38) //8 (0.8 0.22 0.38) //9 (0.8 0.18 0.38) //10 (0.8 0.0 0.38) //11 (0.0 0.0 0.34) //12 (0.0 0.18 0.34) //13 (0.0 0.22 0.34) //14 (0.0 0.4 0.34) //15 (0.8 0.4 0.34) //16 (0.8 0.22 0.34) //17 (0.8 0.18 0.34) //18 (0.8 0.0 0.34) //19 (0.0 0.0 0.06) //20 (0.0 0.18 0.06) //21 (0.0 0.22 0.06) //22 (0.0 0.4 0.06) //23 |
|
November 28, 2022, 10:20 |
|
#14 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Quote:
Have a look at the documentation for more details: https://www.openfoam.com/documentati...ckmesh-utility I don't understand your statement. What do you mean by matching it to your stl file block? The usual strategy is to use blockMesh to create a bakground mesh for snappyHexMesh to work with. The blockMesh mesh has to be larger than the geometry you want to mesh (your stl file) |
||
November 28, 2022, 10:43 |
|
#15 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
My .stl file is a block which has an inlet and an outlet, so what i dont understand is that the vertices in this blockMesh file are vertices of what, I understand my blockMesh has to be larger than the stl file block, so my block measures 7.4 x 7.4 x 3 m.........now in this blockMesh files the vertices are showing perhaps blocks and then at the end these get merged by this command
mergePatchPairs also if i need to use blockMesh, do i really need the stl file? Or this is not possible for openFOAM to be able to apply blockMesh without the stl file |
|
November 28, 2022, 11:25 |
|
#16 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
I cannot really answer without knowing what geometry you are trying to mesh.
blockMesh allows to create meshes for pretty simple cases by defining vertices, edges and blocks. For more complex geometries you won't be able to use blockMesh alone so you need to switch to snappyHexMesh which will allow to create a volume mesh based on an initial background mesh (usually created with blockMesh) and a surface mesh of the geometry you want to mesh as a STL file. Maybe the documentation can help you to understand how snappy works:https://www.openfoam.com/documentati...exmesh-utility |
|
November 28, 2022, 12:27 |
|
#17 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
its just a box with an inlet and outlet thats all. I am using snappyHexMesh too.
|
|
November 28, 2022, 12:34 |
|
#18 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
Then in blockMesh you need to define a block larger than your STL file. You know your STL size and position, in blockMeshDict you have to define the vertices coordinates accordingly.
|
|
November 29, 2022, 07:39 |
|
#19 |
Member
West Midlands
Join Date: Aug 2022
Posts: 63
Rep Power: 4 |
Thanks a lot for this, I also have another question about animation of the simulation, i have been able to follow untick the zero time in paraview but how will i show the time when animating my solution ?
|
|
November 29, 2022, 08:17 |
|
#20 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29 |
In paraView, you can use the "annotate time filter" to display time.
Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gmsh reports an OpenCascade exception when opening a .geo file | algc | Main CFD Forum | 2 | October 24, 2022 06:59 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
Errors in UDF | shashank312 | Fluent UDF and Scheme Programming | 6 | May 30, 2013 21:30 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 18:38 |