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

Error with k-omega SST and simpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By HPE
  • 1 Post By Markus Kolano

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 21, 2020, 04:16
Default Error with k-omega SST and simpleFoam
  #1
Member
 
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9
jvinuales is on a distinguished road
Hi everyone,

I am trying to set up a case using simpleFoam and k-omega SST. I have low y+ (<1). So I followed the recommendations on this post:

Why Menter's SST model low-Re issue has not been seriously investigated?

0/k
Code:
    walls
    {
	type fixedValue;
	value uniform 0.000000000001;
    }
0/nut
Code:
    walls
    {
	type calculated;
	value uniform 0;
    }
0/omega
Code:
    walls
    {
        type            omegaWallFunction;
        value           $internalField;
    }
When I run the case, I got the following error:

--> FOAM FATAL ERROR:
Attempt to cast type calculated to type nutWallFunction at index 0


I ran the case with wall functions and it runs without error (but no convergence).

Please, any idea why I am getting this error?

log
Code:
Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.063120202, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.097361982, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.064783265, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.99353884, Final residual = 0.0071047527, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.17426867, Final residual = 0.0010439839, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.02697205, Final residual = 0.0002594569, No Iterations 4
time step continuity errors : sum local = 0.017789744, global = 0.0025942697, cumulative = 0.0025942697


--> FOAM FATAL ERROR:
Attempt to cast type calculated to type nutWallFunction at index 0

    From function To& Foam::refCast(From&, Foam::label) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>; Foam::label = int]
    in file /home/pawan/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/typeInfo.H at line 162.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::nutWallFunctionFvPatchScalarField::nutw(Foam::turbulenceModel const&, int) at ??:?
#3  Foam::omegaWallFunctionFvPatchScalarField::calculate(Foam::turbulenceModel const&, Foam::List<double> const&, Foam::fvPatch const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#4  Foam::omegaWallFunctionFvPatchScalarField::calculateTurbulenceFields(Foam::turbulenceModel const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#5  Foam::omegaWallFunctionFvPatchScalarField::updateCoeffs() at ??:?
#6  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
#7  Foam::kOmegaSSTBase<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > > >::correct() at ??:?
#8  ? at ??:?
#9  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#10  ? at ??:?
Aborted (core dumped)
jvinuales is offline   Reply With Quote

Old   February 21, 2020, 04:27
Default
  #2
Member
 
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9
jvinuales is on a distinguished road
Quote:
Originally Posted by jvinuales View Post
I am trying to set up a case using simpleFoam and k-omega SST. I have low y+ (<1).
I forgot to mention. I am using OpenFoam v1912
jvinuales is offline   Reply With Quote

Old   February 21, 2020, 04:51
Default
  #3
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Can you share your nut file, please?

As far as I understand, this problem comes from a recent .org integration which changed the hierarchy of wallFuncs. There must a nutWallFunction be defined now among nut boundary conditions if you use some wall function somewhere else, like omegaWallFunction.

I think this bug will be fixed in the next release.
HPE is offline   Reply With Quote

Old   February 21, 2020, 05:25
Default
  #4
Member
 
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9
jvinuales is on a distinguished road
Thanks for your answer.

0/nut
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    x1
    {type		cyclicAMI;}

    x2
    {type		cyclicAMI;}
	
    y1
    {type		cyclicAMI;}
	
	y2
    {type		cyclicAMI;}
	
	z1
    {type		cyclicAMI;}
	
    z2
    {type		cyclicAMI;}	

    walls
    {
	type calculated;
	value uniform 0;
    }
}
It may look strange but the flow is maintained through a fixedJumpAMI in p.
jvinuales is offline   Reply With Quote

Old   February 28, 2020, 05:28
Default
  #5
Member
 
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9
jvinuales is on a distinguished road
Quote:
Originally Posted by HPE View Post
There must a nutWallFunction be defined now among nut boundary conditions if you use some wall function somewhere else, like omegaWallFunction.

I think this bug will be fixed in the next release.
Is there an alternative set up that I can use for my case (k-omega SST with resolved b.layer i.e. y+<1) that does not result in an error?
jvinuales is offline   Reply With Quote

Old   March 27, 2020, 11:11
Default
  #6
Member
 
Javier Vinuales
Join Date: May 2016
Posts: 42
Rep Power: 9
jvinuales is on a distinguished road
Hi everyone,

Is there no fix for this? I do not want to have to run my simulations with another turbulence model because a bug... cannot anyone recommend a fix or an alternative set up with meaningful physics for k-omega SST with resolved boundary layer?
jvinuales is offline   Reply With Quote

Old   May 14, 2020, 12:49
Default
  #7
New Member
 
Join Date: Nov 2019
Posts: 19
Rep Power: 6
requou is on a distinguished road
Hello jvinuales,


I don't know if you still need help on that but my way of fixing this bug it to use a fixed value for omega instead of a wall function. In fact, it is my understanding that using OmegaWallFunction on the wall only calculate the BC at the wall and therefore can be used even we are not using a wall function but it is not mandatory and directly giving the value also works.



See: https://curiosityfluids.com/2019/02/...ry-conditions/ to know what value to choose.
requou is offline   Reply With Quote

Old   May 15, 2020, 16:56
Default
  #8
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Hi,

- requou is right.
- you can use `omegaWallFunction` for low-Re type meshes. For the viscous sublayer mesh, it will correctly return the y+<5 value. Also it is preferable for numerical stability reasons.
- please do also consider `blended on` keyword in omegaWallFunction.

Hope this helps.
omidra likes this.
HPE is offline   Reply With Quote

Old   June 21, 2021, 16:18
Default
  #9
Member
 
Join Date: Apr 2021
Posts: 41
Rep Power: 4
AlxB is on a distinguished road
Hello requou,
thanks for the link to the formula for omega at the wall.



but:

what is Δywall ?
is it the distance of the first node from the wall ?

what is nu ?
is the fluid kinematic viscosity or the turbulent kinematic viscosity ?

I am not sure of these and would be happy to get a clarification.
AlxB is offline   Reply With Quote

Old   July 20, 2021, 12:14
Default
  #10
New Member
 
Markus Kolano
Join Date: Jun 2015
Posts: 1
Rep Power: 0
Markus Kolano is on a distinguished road
Maybe this helps someone: In my understanding, for the LowRe-setup, you need to use the nutLowReWallFunction (https://www.openfoam.com/documentati...lFunction.html) if you want to use the omegaWallFunction (and not fixedValue as also correctly suggested above). It is supposed to be a dummy BC which sets nut to zero but allows to calculate y+.



Also see the following post:



Wall function usage
saladbowl likes this.
Markus Kolano is offline   Reply With Quote

Old   June 28, 2023, 06:03
Default
  #11
Senior Member
 
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
farzadmech is on a distinguished road
Dear jvinuales
Did you find an answer for your question? I have the same problem, I can runs using Laminar model, but when I want to use kOmegaSST it gives me error.


Thanks,
Farzad

Quote:
Originally Posted by jvinuales View Post
Hi everyone,

I am trying to set up a case using simpleFoam and k-omega SST. I have low y+ (<1). So I followed the recommendations on this post:

Why Menter's SST model low-Re issue has not been seriously investigated?

0/k
Code:
    walls
    {
	type fixedValue;
	value uniform 0.000000000001;
    }
0/nut
Code:
    walls
    {
	type calculated;
	value uniform 0;
    }
0/omega
Code:
    walls
    {
        type            omegaWallFunction;
        value           $internalField;
    }
When I run the case, I got the following error:

--> FOAM FATAL ERROR:
Attempt to cast type calculated to type nutWallFunction at index 0


I ran the case with wall functions and it runs without error (but no convergence).

Please, any idea why I am getting this error?

log
Code:
Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.063120202, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.097361982, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.064783265, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.99353884, Final residual = 0.0071047527, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.17426867, Final residual = 0.0010439839, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.02697205, Final residual = 0.0002594569, No Iterations 4
time step continuity errors : sum local = 0.017789744, global = 0.0025942697, cumulative = 0.0025942697


--> FOAM FATAL ERROR:
Attempt to cast type calculated to type nutWallFunction at index 0

    From function To& Foam::refCast(From&, Foam::label) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>; Foam::label = int]
    in file /home/pawan/OpenFOAM/OpenFOAM-v1912/src/OpenFOAM/lnInclude/typeInfo.H at line 162.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::nutWallFunctionFvPatchScalarField::nutw(Foam::turbulenceModel const&, int) at ??:?
#3  Foam::omegaWallFunctionFvPatchScalarField::calculate(Foam::turbulenceModel const&, Foam::List<double> const&, Foam::fvPatch const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#4  Foam::omegaWallFunctionFvPatchScalarField::calculateTurbulenceFields(Foam::turbulenceModel const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#5  Foam::omegaWallFunctionFvPatchScalarField::updateCoeffs() at ??:?
#6  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
#7  Foam::kOmegaSSTBase<Foam::eddyViscosity<Foam::RASModel<Foam::IncompressibleTurbulenceModel<Foam::transportModel> > > >::correct() at ??:?
#8  ? at ??:?
#9  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#10  ? at ??:?
Aborted (core dumped)
farzadmech is offline   Reply With Quote

Reply


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
overshooting of Omega in SST komega using simpleFoam cm_jubayer OpenFOAM 2 June 7, 2020 12:52
Weird result by k omega SST bingo641 OpenFOAM 3 May 27, 2018 23:05
Setting change from k omega to k omega SST bingo641 OpenFOAM Programming & Development 0 May 22, 2018 05:15
k-omega SST simpleFoam asks for nut kodexys OpenFOAM Running, Solving & CFD 2 October 17, 2017 09:17
simplefoam omega convergence problem simplefoam OpenFOAM Running, Solving & CFD 4 August 13, 2013 05:31


All times are GMT -4. The time now is 10:35.