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

icoFoam - Fields don't match error

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 22, 2023, 06:43
Default icoFoam - Fields don't match error
  #1
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello folks.

I am a new Openfoam user. I am trying to do a paralllel simulation for flow around shampoo bottle in an arbitrary Initial orientation. The solver is IcoFoam. The mesh looks fine coz, although checkMesh allGeometry -allTopology gave 2 Mesh Checks, the coupled mesh point average Seems okay... and the Non orthogonality check is Passed. However, upon the running the simulation, I get the error Mesh/fields don't match. I am attaching the controlDict, snappyHexMeshDict, blockMeshDict Files, checkMeshlog, icoFoamlog as well as the screenshot of the error... Any help will be highly appreciated.
Attached Images
File Type: png Screenshot 2023-05-22 161030.png (32.3 KB, 13 views)
Attached Files
File Type: txt checkMeshlog_v5.txt (61.4 KB, 1 views)
File Type: txt blockMeshDict.txt (2.1 KB, 1 views)
File Type: txt snappyHexMeshDict.txt (18.8 KB, 2 views)
File Type: txt controlDict.txt (1.0 KB, 1 views)
baldbrain is offline   Reply With Quote

Old   May 22, 2023, 07:44
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Hello,

Can you describe what exact commands you are running and in which order ?

Regards,
Yann
Yann is offline   Reply With Quote

Old   June 1, 2023, 10:39
Default
  #3
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello Yann,

I executed the commands in the following sequence:
1) I first run blockMesh on a 1 x 1 x 3 meter grid with 50 x 50 x 150 cells, then
2) surfaceFeatures, then
3) decomposePar with hierarchical decomposition of n (1 2 2) order zxy, then
4) snappyHexMesh () on 4 procs, enabled with explicit Feature Edge refinement, surface-based refinement, region-wise refinement, surface snapping and layer additions, followed by
checkMesh -allGeometry -allTopology, and finally, recomposePar.

After manually inspecting the mesh for the indicated failed mesh checks (lowQualityTetFaces 9), I felt the mesh was still OK enough to run the simulation.

Hence, I run icoFoam on 4 procs (see attached icoFoamlog_v1). The solution seems to be converging I think, coz the time step continuity errors (sum local) are of the order of 10^(-9).
However, at the end of the simulation, when I load the time steps in paraView, it is giving me the error seen in the screenshot.
baldbrain is offline   Reply With Quote

Old   June 1, 2023, 11:18
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Hello,

OK thanks for the inputs.
Your error message complains about a mesh size mismatch.

When running snappyHexMesh, it creates new timeStep folder to store the mesh (one folder for each meshing steps: castellated, snap, layers)

After meshing you will have to move the polyMesh directory from the last time step into the constant folder so icoFoam will load this mesh and run on it.

You can also run snappyHexMesh with the -overwrite option to write mesh directly into constant rather than creating new time steps.

If you didn't use the overwrite option nor have moved the final mesh into constant, this is very likely the reason for this error message.

Hope this helps,
Yann
Yann is offline   Reply With Quote

Old   June 2, 2023, 01:12
Default
  #5
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello Yann,

Thanks for your swift response. I thought that this operation was done by the reconstructPar command. which I did after meshing as well as running icoFoam.
baldbrain is offline   Reply With Quote

Old   June 2, 2023, 03:34
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Hello,

Looks like you didn't post the whole commands you've been running since you didn't mention reconstructPar before.
I'm a bit insistent on this because details are important in a simulation workflow. Small detail on one command is enough to mess with the whole process.

Generally speaking, OpenFOAM commands tend to avoid overwriting data unless otherwise specified. If you ran snappy without the overwrite option, reconstructPar should just reconstruct the time step directories containing the meshes without touching the original constant/polyMesh directory (which contains the mesh created by blockMesh).
Unless you used some options with reconstructPar? I'm not sure there is such option but to be fair I never use reconstructPar anyway.
Yann is offline   Reply With Quote

Old   June 15, 2023, 07:13
Default
  #7
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello Yann,
Sorry again for the long gap in responding.

Answering your question, no, I didn't use the -overwrite flag in snappyHexMesh, nor did I use any options with reconstructPar.

I will try the simulation again with your suggestions and get back to you, hopefully sooner this time 😅

Edit (3 hours later) -------------------------------------------------------------------------------------------------------------------------

Hello again Yann,

First I manually pasted the content of the polyMesh folder for the last timeStep (in my case 0.11) directory into the constant/polyMesh and run icoFoam. I even replaced the boundary, faces, neighbour, owner, points files with the ones from the last timeStep.
So when I run icoFoam again, it gave an error in cells 262701 (<large tuple of numbers>) there are no cells of level 8 or below . Please be advised that I was attempting this as a frivolous trial run, so I didn't save the log file for this error, and I am paraphrasing the error from memory.

Then I thought, let's rerun snappyHexMesh and try again, but of course, it gave me a "?libc (core dumped)" error, but I kinda expected it to not work coz I had overwritten the blockMesh boundary, faces etc. files.

I cleaned the entire case, reran the entire simulation workflow again, but this time with the reconstructPar -latestTime option, which should perform the same function that you advised. After everything, the simulation is converging, but it is giving the exact same error still, so, I am back at square one as of now. 😅😅

Any help greatly appreciated,
Kind Regards,
- Harshawardhan Patil

Last edited by baldbrain; June 15, 2023 at 10:20.
baldbrain is offline   Reply With Quote

Old   June 18, 2023, 12:42
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Hello,

What do you mean by "simulation is converging" ? Like, icoFoam is running and crash with this message after solving some time steps?

Regards,
Yann
Yann is offline   Reply With Quote

Old   June 20, 2023, 21:05
Default
  #9
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello Yann,

No, the simulation seems to be running perfectly fine till the end, with acceptably small residuals. Please check the icoFoamlog attached in this message. I have zipped it because the original log filesize was exceeding the limit. The zip file was scanned with Bitdefender Internet Security and reported no threats 👍
Attached Files
File Type: zip icoFoamlog_v1.zip (38.1 KB, 1 views)
baldbrain is offline   Reply With Quote

Old   June 21, 2023, 03:18
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Your log looks like you ran icoFoam in parallel without the -parallel option. (which actually just run n serial icoFoam processes rather than running icoFoam in parallel)

The proper command should be something like:
Code:
mpirun -np 4 icoFoam -parallel
Or, if you use runFunctions (like in the Allrun scripts), you need to use the runParallel function instead of runApplication:
Code:
runParallel icoFoam
Yann
AtoHM likes this.
Yann is offline   Reply With Quote

Old   June 21, 2023, 14:33
Default
  #11
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello Yann,
Thanks or pointing that out. I reran the simulation with the right command, and here's the new icoFoam log. Also attached is the reconstructPar -latestTime log that I ran afterward the simulation. I'm afraid it's still the same issue
Attached Files
File Type: txt reconstructParlog.txt (4.2 KB, 1 views)
File Type: zip icoFoamlog_v1 new.zip (22.9 KB, 1 views)

Last edited by baldbrain; June 21, 2023 at 14:34. Reason: zip file not attached
baldbrain is offline   Reply With Quote

Old   June 22, 2023, 03:04
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Hello,

That's better!
Not sure how you made your log file but it seems the error does not show in the log you've posted.

Now, if you meshed your case in parallel, you need to reconstruct the mesh before reconstructing the field. Try running these commands, in this order:

Code:
reconstructParMesh -constant
reconstructPar -latestTime
Hope this helps,
Yann
Yann is offline   Reply With Quote

Old   July 10, 2023, 23:21
Default
  #13
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Hello Yann,

I'm once again sorry for not reverting back to you soon. My account was disabled by the moderators. But the issue seems to have resolved now. Are you still available to help me on this problem?

Regards,
- Harshawardhan
baldbrain is offline   Reply With Quote

Old   July 11, 2023, 13:27
Default
  #14
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,171
Rep Power: 27
Yann will become famous soon enough
Sure, but what's your problem since you say it's been resolved?
Yann is offline   Reply With Quote

Old   July 22, 2023, 01:32
Default
  #15
New Member
 
Join Date: Mar 2023
Posts: 12
Rep Power: 3
baldbrain is on a distinguished road
Well at first, I thought it was because I posted external links in a separate post. But later I discovered that I had changed the email for my account, and apparently we have to reactivate our account every time we change the email.

Regards,
- Harshawardhan
baldbrain is offline   Reply With Quote

Reply

Tags
field for p, icofoam -parallel, icofoam problem, solver error

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 13:21
[swak4Foam] swak4foam openfoam 7 installation problem Andrea23 OpenFOAM Community Contributions 1 February 17, 2020 18:11
Compile calcMassFlowC aurore OpenFOAM Programming & Development 13 March 23, 2018 07:43
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 11:39
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43


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