|
[Sponsors] |
--> FOAM FATAL IO ERROR: (openfoam-2012) Cannot find patchField entry for testCube |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 7, 2023, 07:38 |
--> FOAM FATAL IO ERROR: (openfoam-2012) Cannot find patchField entry for testCube
|
#1 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
I am trying to simulate a river flow so i'm using snappyhexmesh and blockMesh.
When running "interFoam" to start the simulation it gives me the error in the title followed by this: "file: /river/0/U.boundaryField at line 25." Here is my U file /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v2012 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (1 0 0); boundaryField { inlet { type flowRateInletVelocity; //line 25 volumetricFlowRate constant 350; } walls { type noSlip; } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } outlet { type inletOutlet; inletValue uniform (0 0 0); value $internalField; } } // ************************************************** *********************** // On another test where I didn't use snappyhexmesh so I only had the outer box it worked just fine but i need it to get the river simulation. If you know anything that can fix my problem please reply. |
|
July 7, 2023, 07:56 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Hello,
You mesh contains a patch named "testCube" and the solver complains there is no boundary condition defined for this patch. If you do expect to have a testCube patch, then you need to define a boundary condition for it for each variable in the 0 directory. If you don't expect to have a testCube patch, it means something is wrong with your mesh. You need to check it and fix it to get your expected mesh. Regards, Yann |
|
July 7, 2023, 08:14 |
|
#3 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
Thanks for the fast reply but how do I define the boundary condition?
You mean do this? cubeGroup { type slip; } |
|
July 7, 2023, 09:08 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Yes, and choose the appropriate condition for each variable.
(If necessary you can have a look to the user guide: https://www.openfoam.com/documentati...ary-conditions) Cheers, Yann |
|
July 7, 2023, 10:37 |
|
#5 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
Thank you for answering.
I did try a few but I don't seem to find the right one. Do you know what would be the best one for a river simulation? |
|
July 7, 2023, 11:02 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
I cannot really answer that without knowing what you are trying to simulate. I don't know what is "testCube" and I don't know what conditions you tried. There are not enough information to help you.
Have a look at the interFoam tutorials and search for something close to what you want to simulate. Run it and see how it works, what boundary conditions are used, etc... Cheers, Yann |
|
July 7, 2023, 11:05 |
|
#7 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
Thanks for the help it seems to have solved the error using "fixed value" but now when I do run it, it works for awhile but then stops the simulation without giving any errors do you now what could be happening?
|
|
July 7, 2023, 12:22 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Unfortunately no I cannot really help without having more information about your case. (at least the log file of the simulation)
(you can have a look there: How to give enough info to get help) Regards, Yann |
|
July 7, 2023, 13:47 |
|
#9 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
Ok I'm sorry for not providing all the information needed previously.
I've attached the checkMesh and the interFoam logs and both fvSchemes and fvSolution plus the blockMeshDict file. Additional info, the object for the snappyHexMesh is just a 5x5x4 cube to be replaced with the 3D terrain model of the river once I can do it with the cube. |
|
July 8, 2023, 06:51 |
|
#10 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Nothing bad in the files you've posted, but the solver stops before starting time loop so probably there is an error somewhere in your case setup.
It's a bit weird you don't get any error though. What command do you use to start the solver, and how do you create your log file? |
|
July 10, 2023, 04:47 |
|
#11 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
I start solver using: mpirun interFoam (I also tried with just interFoam and it also didn't give any errors)
And I got the log file using: interFoam > interFoam.log |
|
July 10, 2023, 08:28 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
OK then try running this instead:
Code:
interFoam > interFoam.log 2>&1 (Have a look there for more information about that: https://www.cyberciti.biz/faq/redire...err-to-stdout/) |
|
July 10, 2023, 10:27 |
|
#13 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
The attached file is the result of the command u sent.
There don't seem to be any differences. |
|
July 11, 2023, 15:25 |
|
#14 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Well, at this point I cannot really help.
The solver stops during initialization, it doesn't even get to start time loop. The next step should be to read the g file to set gravity. Do you have a properly defined g file in constant? Also, can you post your whole case setup? |
|
July 19, 2023, 11:13 |
|
#15 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
Thank you for your help but I've been on holidays and I'll only be able to send the files next week.
|
|
July 24, 2023, 04:50 |
|
#16 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
The ZIP file was too large so I put it on a google drive and here is the link.
https://drive.google.com/drive/folde...usp=share_link |
|
July 24, 2023, 05:21 |
|
#17 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Hello,
I don't know why you don't get an error message when running the solver. Here is the error message I get when running your case: Code:
RAS { RASModel kOmegaSST; turbulence on; printCoeffs on; alphaK1 0.85; alphaK2 1; alphaOmega1 0.5; alphaOmega2 0.856; gamma1 0.555556; gamma2 0.44; beta1 0.075; beta2 0.0828; betaStar 0.09; a1 0.31; b1 1; c1 10; F3 false; decayControl false; kInf 0; omegaInf 0; } #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in /lib/x86_64-linux-gnu/libpthread.so.0 #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:? #6 Foam::kOmegaSSTBase<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > > >::F2() const at ??:? #7 Foam::kOmegaSSTBase<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > > >::F23() const at ??:? #8 Foam::kOmegaSSTBase<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > > >::correctNut(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #9 Foam::RASModels::kOmegaSST<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correctNut() at ??:? #10 ? at ??:? #11 ? at ??:? #12 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #13 ? at ??:? The message leads to the kOmegaSST model and something wrong with the correctNut function. Having a look at your boundary conditions, I see you set a fixedValue 0 on the testCubeGroup patch for nut, k and omega. This might be the source of the issue. Setting omega to a small value rather than 0 solves the issue. (I tried with 1e-6 and the solver starts properly. Didn't check the results though, but this is another story) Cheers! Yann |
|
July 24, 2023, 06:41 |
|
#18 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
Thanks for all the help it already works with the cube.
When I change the model to the terrain (a simplified version of the final) it starts the simulation but after one second the courant number is already at 1e-7 which also decreases the deltaT, do you know how to fix this? |
|
July 24, 2023, 07:06 |
|
#19 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
You have to check what is going on in your case. The deltaT drops to respect the max Courant number defined in your controlDict:
Code:
adjustTimeStep yes; maxCo 60; maxAlphaCo 60; maxDeltaT 1; To help diagnose your case you can save timeStep and investigate the results in paraView, or use some function objects to monitor your case. For instance the fieldMinMax function object is handy to monitor maximum velocity values (or min/max value of other variables of interest): https://develop.openfoam.com/Develop.../fieldMinMax.H Yann |
|
July 24, 2023, 07:36 |
|
#20 |
New Member
Canas
Join Date: Jul 2023
Posts: 11
Rep Power: 3 |
I've tried changing the value in meshQualityDict but it doesn't seem to work.
And how do I use the fieldMinMax function? Last edited by DCanas; July 24, 2023 at 13:28. |
|
Tags |
boundary field, snappyhesmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"FOAM FATAL IO ERROR: Cannot find patchField entry for NACA6409_patch24311" | Pavlidis Chariton | OpenFOAM Running, Solving & CFD | 0 | October 7, 2019 05:57 |
InterDyMFoam+simpleFunctionObject | Elham | OpenFOAM Running, Solving & CFD | 5 | July 10, 2017 12:59 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |