|
[Sponsors] |
Attempt to cast type zeroGradient to type nutWallFunction |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 17, 2020, 09:47 |
Attempt to cast type zeroGradient to type nutWallFunction
|
#1 |
New Member
Anon
Join Date: Dec 2020
Posts: 20
Rep Power: 5 |
Hi all,
I'm running a pimpleFoam case, and the error '--> FOAM FATAL ERROR: Attempt to cast type zeroGradient to type nutWallFunction From function To& Foam::refCast(From&) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>] in file /home/ubuntu/OpenFOAM/OpenFOAM-7/src/OpenFOAM/lnInclude/typeInfo.H at line 114' appears after initially solving for ux, uy, and uz. I have tried a number of different types for the patch to see if it will run, but the error appears each time with the different type used substituted into it. A search for this error provides a link to people saying they have this problem, but no solution is working for me My nut case is shown below dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { #include "include/ABLConditions" inlet { type zeroGradient; //value uniform 0.0; } outlet { type zeroGradient; //value uniform 0; } top { type zeroGradient; //value uniform 0; } NiliDuneField { type nutkAtmRoughWallFunction; z0 0.03; value uniform 0; } } If anyone is able to help with this, that would be greatly appreciated |
|
December 17, 2020, 11:50 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
The reason of that error is bad class hierarchy change. Spilled from OpenFOAM.org...
Please just use a nut wall function in 0/nut file. For example, if you have `fixedValue` for a patch inside 0/nut, please change it to `nutLowReWallFunction`. Then it should run.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
December 17, 2020, 13:35 |
|
#3 |
New Member
Anon
Join Date: Dec 2020
Posts: 20
Rep Power: 5 |
Thanks for the advice, however the error then throws up that the patch type for inlet must be wall, which isn't correct for this simulation
Do you know which nut type would resolve that issue, without changing the wall type? |
|
December 17, 2020, 13:36 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
would you mind to share the boundary condition files as well as constant/polyMesh/boundar*, please?
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
December 18, 2020, 12:47 |
|
#5 |
New Member
Anon
Join Date: Dec 2020
Posts: 20
Rep Power: 5 |
Sorry for being late getting back to you. I tried remaking the case to see if it was a redundant line that was causing the issue but no joy
My constant/polymesh/boundary is as follows 4 ( outlet { type patch; nFaces 33775; startFace 29542772; } inlet { type patch; nFaces 28497; startFace 29576547; } top { type patch; nFaces 450; startFace 29605044; } DuneField { type wall; inGroups List<word> 1(wall); nFaces 459920; startFace 29605494; } ) p is as follows: #include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; internalField uniform $pressure; boundaryField { inlet { type zeroGradient; } outlet { type uniformFixedValue; uniformValue constant $pressure; } top { type zeroGradient; } DuneField { type zeroGradient; } ground { type zeroGradient; } u is as follows #include "include/initialConditions" dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type atmBoundaryLayerInletVelocity; #include "include/ABLConditions" } outlet { type inletOutlet; inletValue uniform (0 0 0); value $internalField; } top { type zeroGradient; } DuneField { type uniformFixedValue; value uniform (0 0 0); uniformValue constant (0 0 0); } k is as follows #include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; internalField uniform $turbulentKE; boundaryField { outlet { type inletOutlet; inletValue uniform $turbulentKE; value $internalField; } inlet { type atmBoundaryLayerInletK; #include "include/ABLConditions" } top { type kqRWallFunction; value uniform 0.375; } DuneField { type zeroGradient; } } nut is as follows dimensions [0 2 -1 0 0 0 0]; internalField uniform 0; boundaryField { #include "include/ABLConditions" inlet { type nutLowReWallFunction; value uniform 0.0; } outlet { type nutLowReWallFunction; value uniform 0; } top { type nutLowReWallFunction; value uniform 0; } DuneField { type nutkAtmRoughWallFunction; z0 0.03; value uniform 0; } } epsilon is as follows dimensions [0 2 -3 0 0 0 0]; #include "include/initialConditions" internalField uniform $turbulentEpsilon; boundaryField { inlet { type fixedValue; value uniform 0.01; } outlet { type inletOutlet; inletValue uniform $turbulentEpsilon; value $internalField; } top { type epsilonWallFunction; value uniform 0.01; } DuneField { type zeroGradient; } } Thank you very much for looking at this |
|
October 24, 2021, 11:03 |
|
#6 |
New Member
Hosam Alrefaie
Join Date: Jul 2021
Posts: 24
Rep Power: 5 |
Hi CfdUser5855,
have you solved this? |
|
January 29, 2022, 21:57 |
|
#7 |
New Member
Join Date: Jan 2022
Posts: 3
Rep Power: 4 |
Hi everyone,
I've encountered this issue as well. Has anyone found a solution? Much appreciated. |
|
January 30, 2022, 11:40 |
|
#8 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 21 |
Check your polyMesh boundary file. Make sure that walls are of type wall and not patch.
|
|
January 30, 2022, 12:56 |
|
#9 | |
New Member
Join Date: Jan 2022
Posts: 3
Rep Power: 4 |
Quote:
Thanks. |
||
July 11, 2023, 13:40 |
|
#10 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
I had the same problem... so here is the simple solution:
just still use: type calculated; value uniform 0.0 for a patch and wallFunctions for walls. |
|
November 12, 2024, 20:36 |
|
#11 |
Member
Join Date: May 2016
Posts: 40
Rep Power: 10 |
In my case, the issue was the patch type in one of the boundaries wasn't corrected between wall to patch or vice-versa in epsilon setup. The solver gives an error on "nut" doesn't mean the error is in nut could be in omega/epsilon depending on your turbulent model.
|
|
Tags |
pimplefoam, turbulent |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
natural convection in square cavity having inlet and outlet | sujeet | OpenFOAM Running, Solving & CFD | 1 | November 2, 2019 03:17 |
time step continuity error increases with time_SRFSimplefoam | mostafa kamal | OpenFOAM Running, Solving & CFD | 7 | October 2, 2019 03:00 |
rhoPimpleFoam hardship | petrus | OpenFOAM Running, Solving & CFD | 0 | October 7, 2016 03:41 |
LES supersonic free jet | martyn88 | OpenFOAM | 22 | April 17, 2015 07:00 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 10:28 |