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

Does decomposition work with empty boundary condition?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By agunhan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2024, 13:53
Question Does decomposition work with empty boundary condition?
  #1
New Member
 
Aykut Gunhan
Join Date: Nov 2023
Posts: 5
Rep Power: 3
agunhan is on a distinguished road
Hello All,

For my study, I am running a porous media in OpenFoam v2306. To save some computational cost I want to run it in 2D.
I set my front and back as patch at the beginning then I run blockMesh> snappyHexMesh -overwrite > extrudeMesh (front/back) > createPatch (front/back as empty).
But after creating the mesh I can check it on paraview. When I try to do decomposition I get error.
Does decomposition work with empty boundary conditions?

The error looks like this;

--> FOAM FATAL IO ERROR: (openfoam-2306)
Size 179028 is not equal to the expected length 41418

file: 0/cellLevel.internalField at line 21.

From void Foam::Field<Type>::assign(const Foam::entry&, Foam::label) [with Type = double; Foam::label = int]
in file ./src/OpenFOAM/lnInclude/Field.C at line 253.

FOAM exiting

Hint: I set the front and back as patch and named them as front1/back1 then using the createpatchdict named them front/back.

Thank you in advance.



%------------------SOLVED-----------%
For those who encounter the same problem.
The issue was the created mesh files in "0" file.
After running all the steps I restored the "0" file and I was able to run the simulation without any error.
cp -r 0.orig/ 0

blockMesh

snappyHexMesh -overwrite

topoSet

extrudeMesh

createPatch -overwrite

# Restore initial conditions in the 0 directory
restore0Dir

# Decompose the domain for parallel processing
decomposePar

# Run the simulation in parallel
mpirun -n 14 pimpleFoam >> log.pimpleFoam -parallel

Last edited by agunhan; October 14, 2024 at 16:48.
agunhan is offline   Reply With Quote

Old   October 15, 2024, 04:52
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello,

you don't need createPatch in your case, changeDictionary will be enough. (you don't need to create new patches, just to update the patch type for front and back)

This being said, this is not the cause of your error.

Code:
--> FOAM FATAL IO ERROR: (openfoam-2306)
Size 179028 is not equal to the expected length 41418

file: 0/cellLevel.internalField at line 21.
This message indicates a size mismatch between your mesh and the variables contained in the 0 directory.

cellLevel is a variable written by snappyHexMesh when you have some writeFlags activated in snappyHexMeshDict.

After running snappy and writing cellLevel variable, you modified your mesh with extrudeMesh, this is why you get this error. (cellLevel size does not match the size of your mesh anymore)

Just remove the variables written by snappy before decomposing your case and you should be fine.
Yann is offline   Reply With Quote

Old   October 15, 2024, 05:21
Default
  #3
New Member
 
Aykut Gunhan
Join Date: Nov 2023
Posts: 5
Rep Power: 3
agunhan is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

you don't need createPatch in your case, changeDictionary will be enough. (you don't need to create new patches, just to update the patch type for front and back)

This being said, this is not the cause of your error.

Code:
--> FOAM FATAL IO ERROR: (openfoam-2306)
Size 179028 is not equal to the expected length 41418

file: 0/cellLevel.internalField at line 21.
This message indicates a size mismatch between your mesh and the variables contained in the 0 directory.

cellLevel is a variable written by snappyHexMesh when you have some writeFlags activated in snappyHexMeshDict.

After running snappy and writing cellLevel variable, you modified your mesh with extrudeMesh, this is why you get this error. (cellLevel size does not match the size of your mesh anymore)

Just remove the variables written by snappy before decomposing your case and you should be fine.

Thank you, I will try it also without creatingpatch!!
Yann likes this.
agunhan is offline   Reply With Quote

Reply

Tags
decomposepardict, decomposition, openfoamv2306


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
Wind turbine simulation Saturn CFX 60 July 17, 2024 06:45
Question about different kinds of Boundaries and Boundary Conditions granzer Main CFD Forum 17 April 12, 2022 18:27
[Other] empty boundary condition Ahmed Khattab OpenFOAM Meshing & Mesh Conversion 1 December 29, 2017 10:21
[snappyHexMesh] sHM quality of multi-region aminem OpenFOAM Meshing & Mesh Conversion 0 April 16, 2015 12:38
External Radiation Boundary Condition (Two sided wall), Grid Interface CFD XUE FLUENT 0 July 8, 2010 07:49


All times are GMT -4. The time now is 16:09.