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

invalid wall function specifications

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2019, 05:49
Default invalid wall function specifications
  #1
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Hello everyone,


I made a small geometry in salome. (figure attached below).


In this geometry, I made three groups (inlet, outlet and sideWalls).


And then I meshed this geometry in Salome and imported as a UNV file in Openfoam.


But when I model a kEpsilon Turbulence model through this region, It gives me the following error:


Code:
--> FOAM FATAL ERROR: 
Invalid wall function specification
    Patch type for patch sideWalls must be wall
    Current patch type is patch
After this error, I went to constant/polymesh/boundary, and changed the type of sideWalls from patch to wall.


But I don't know, that is it right to do like this manually OR is it possible to group the sideWalls as a wall type in salome itself?


because my solver is not converging after doing this and the values of k and Epsilon are going very very high. But I don't know the error is because of this patch type that I changed to wall manually OR I am making some mistake in modelling the Turbulent flow?


Can someone please help me out in this. I shall ve very thankful to you.


Thank you
Attached Images
File Type: png fluid.png (5.0 KB, 12 views)
Raza Javed is offline   Reply With Quote

Old   June 16, 2019, 06:41
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

Just edit the file constant/polyMesh/boundary and for the relevant patches change the type to wall.

Regards,
Tom
tomf is offline   Reply With Quote

Old   June 16, 2019, 08:42
Default
  #3
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Quote:
Originally Posted by tomf View Post
Hi,

Just edit the file constant/polyMesh/boundary and for the relevant patches change the type to wall.

Regards,
Tom



Thank you so much for your helpful response. it worked.



Thank you




I have one more question here, what is the time step continuity error and what could be the possible reasons for it? I am running my simulation but it stops after some iterations with the following error:


Code:
--> FOAM FATAL ERROR: 
Maximum number of iterations exceeded

    From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hConstThermo<Foam::rhoConst<Foam::specie> >; Type = Foam::sensibleEnthalpy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>]
    in file /home/ubuntu/OpenFOAM/OpenFOAM-4.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 66.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() at ??:?
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() at ??:?
#4  ? at ??:?
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  ? at ??:?
Aborted (core dumped)

And when I see the log file, the time step continuity error is very high, as you can see below:


Code:
Time = 0.1


Solving for fluid region fluid
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.06453224, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 0.06697346, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 0.0204871, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.9999976, Final residual = 0.02059655, No Iterations 2
Min/max T:300 300
GAMG:  Solving for p_rgh, Initial residual = 1, Final residual = 0.007092764, No Iterations 8
time step continuity errors : sum local = 0.01886675, global = -0.001468588, cumulative = -0.001468588
Min/max rho:2 2
DILUPBiCG:  Solving for epsilon, Initial residual = 0.4395933, Final residual = 6.211001e-05, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 1, Final residual = 0.02989314, No Iterations 2

Solving for solid region box
DICPCG:  Solving for h, Initial residual = 0.9655932, Final residual = 0.05007531, No Iterations 2
Min/max T:300 300

Solving for solid region plate1
DICPCG:  Solving for h, Initial residual = 0.5559331, Final residual = 0.04337605, No Iterations 1
Min/max T:300 300

Solving for solid region plate2
DICPCG:  Solving for h, Initial residual = 0.5630651, Final residual = 0.04835675, No Iterations 1
Min/max T:300 300

Solving for solid region plate3
DICPCG:  Solving for h, Initial residual = 0.5485297, Final residual = 0.04496288, No Iterations 1
Min/max T:300 300

Solving for solid region hot1
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.006312796, No Iterations 2
Min/max T:300 300.0017

Solving for solid region hot2
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.006366066, No Iterations 2
Min/max T:300 300.0017

Solving for solid region hot3
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.006641834, No Iterations 2
Min/max T:300 300.0016
ExecutionTime = 0.38 s  ClockTime = 1 s

Time = 0.2


Solving for fluid region fluid
DILUPBiCG:  Solving for Ux, Initial residual = 0.9997316, Final residual = 0.08241705, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.9999182, Final residual = 0.07499477, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.999995, Final residual = 0.05218458, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.04574217, No Iterations 2
Min/max T:-2937356 1666931
GAMG:  Solving for p_rgh, Initial residual = 0.1649963, Final residual = 0.0009814857, No Iterations 6
time step continuity errors : sum local = 19514.56, global = 1518.633, cumulative = 1518.632
Min/max rho:2 2
DILUPBiCG:  Solving for epsilon, Initial residual = 0.9999722, Final residual = 2.410651e-09, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 0.9999915, Final residual = 0.06704835, No Iterations 2

Solving for solid region box
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.03970744, No Iterations 2
Min/max T:-263707.7 90866.11

Solving for solid region plate1
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.02564906, No Iterations 2
Min/max T:299.996 300.0009

Solving for solid region plate2
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.03224829, No Iterations 2
Min/max T:299.9911 300.0009

Solving for solid region plate3
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.02419874, No Iterations 2
Min/max T:299.9997 300.0009

Solving for solid region hot1
DICPCG:  Solving for h, Initial residual = 0.8450844, Final residual = 0.005572691, No Iterations 2
Min/max T:300.0004 300.0031

Solving for solid region hot2
DICPCG:  Solving for h, Initial residual = 0.8459708, Final residual = 0.005387616, No Iterations 2
Min/max T:300.0005 300.003

Solving for solid region hot3
DICPCG:  Solving for h, Initial residual = 0.8490342, Final residual = 0.005782191, No Iterations 2
Min/max T:300.0005 300.003
ExecutionTime = 0.45 s  ClockTime = 1 s

Time = 0.3


Solving for fluid region fluid
DILUPBiCG:  Solving for Ux, Initial residual = 0.9484502, Final residual = 0.04230773, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.9291604, Final residual = 0.02407606, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.8690145, Final residual = 0.02865172, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.9721585, Final residual = 0.01466686, No Iterations 2

I am not able to understand what is the problem? and this problem only comes when I change the fluid flow from laminar to Turbulent.


Any help would be highly appreciated.


Thank you
Raza Javed is offline   Reply With Quote

Old   June 17, 2019, 03:29
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

Time step continuity error is the mass unbalance after your iteration/time step, which is known after the pressure equation is solved. It should be much lower than 1. There are many posts already on this forum about it.

Your problem is with the heat enthalpy equation:

Code:
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.04574217, No Iterations 2
Min/max T:-2937356 1666931
This can be due to many things. No way for me to help you with this limited amount of information.

Please check this thread.
tomf is offline   Reply With Quote

Old   June 17, 2019, 04:21
Default
  #5
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Thank you for your reply.


I try to explain my problem.


I am using chtMultiRegionSimpleFoam. My Openfoam version is 4.1.


I made my geometry in salome, and then imported to OpenFoam as a UNV file.


I have multiple regions in my geometry, (heaters, box, and fluid).


Both heaters and fluid are in the box.


Now, I want to simulate the turbulent flow in the fluid region. I am using kEpsilon Model.


I am trying to model incompressible flow.


I put boundary conditions for alphat, k, epsilon, nut etc in system/fluid/changeDictionaryDict file. This file is shown below:


Code:
boundary
{
    inlet
    {
        type            patch;
    }
    outlet
    {
        type            patch;
    }
}

T
{
    internalField   uniform 300;

    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           $internalField;
            
        }

        outlet
        {
            type            zeroGradient;
            value           $internalField;

        }

        "fluid_to_box"
        {
            type            zeroGradient;
        }
    }
}

U
{
    internalField   uniform (0 0 0);

    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform (0 0 -1.33);
        }

        outlet
        {
            type            zeroGradient;
        }
        "fluid_to_box"
        {
            type            noSlip;
        }
    }
}

epsilon
{
    internalField   uniform 0.01;

    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 0.01;
        }

        outlet
        {
            type            zeroGradient;
            //value           uniform 0;
        }

        ".*"
        {
            type            epsilonWallFunction;
            value           uniform 0.01;
        }
    }
}

k
{
    internalField   uniform 0.1;

    boundaryField
    {
        inlet
        {
            type            fixedValue;
            value           uniform 0.1;
        }

        outlet
        {
            type            zeroGradient;
            //value           uniform 0;
        }

        "fluid_to_box"
        {
            type            kqRWallFunction;
            value           uniform 0.1;
        }
    }
}


p_rgh
{
    internalField   uniform 0;

    boundaryField
    {
        inlet
        {
            type            zeroGradient;
            value           uniform 0;
        }

        outlet
        {
            type            fixedValue;
            value           uniform 0;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value           uniform 0;
        }
    }
}

p
{
    internalField   uniform 0;

    boundaryField
    {
        ".*"
        {
            type            calculated;
            value           uniform 0;
        }
    }
}

alphat
{
    internalField   uniform 0;

    boundaryField
    {
        inlet
        {
            type            calculated;//fixedValue;
            value           uniform 0;
        }

        outlet
        {
            type            calculated;
            value           uniform 0;
        }

        "fluid_to_box"
        {
            type            alphatJayatillekeWallFunction;
            value           uniform 0;
        }

    }
}

nut
{
    internalField   uniform 0;

    boundaryField
    {
        inlet
        {
            type            calculated;
            value           uniform 0;
        }

        outlet
        {
            type            calculated;
            value           uniform 0;
        }

        "fluid_to_box"
        {
            type            nutkWallFunction;
            value           uniform 0;
        }
    }
}

// ************************************************************************* //
The error I posted before, I started getting when I shifted from laminar to Turbulent.


Now, I have the following doubts:


1. How and where actually we define that out flow would be incompressible?
2. As you can see in the file above, in the alphat portion, for the boundary fluid_to_box, I have put the wall function. before it was compressible written before the wall function, but I removed it because I am trying to simulate incompressible. But it gave error that:


Code:
--> FOAM FATAL IO ERROR: 
Unknown patchField type alphatJayatillekeWallFunction for patch type mappedWall

Valid patchField types are :

112
(
MarshakRadiation
MarshakRadiationFixedTemperature
advective
atmBoundaryLayerInletEpsilon
atmBoundaryLayerInletK
calculated
codedFixedValue
codedMixed
compressible::alphatJayatillekeWallFunction
compressible::alphatWallFunction
compressible::thermalBaffle1D<hConstSolidThermoPhysics>
compressible::thermalBaffle1D<hPowerSolidThermoPhysics>
compressible::turbulentHeatFluxTemperature
compressible::turbulentTemperatureCoupledBaffleMixed
compressible::turbulentTemperatureRadCoupledMixed
convectiveHeatTransfer
cyclic
cyclicACMI
cyclicAMI
cyclicSlip
directionMixed
empty
energyJump
energyJumpAMI
epsilonLowReWallFunction
epsilonWallFunction
externalCoupled
externalCoupledTemperature
externalWallHeatFluxTemperature
extrapolatedCalculated
fWallFunction
fan
fanPressure
fixedEnergy
fixedFluxExtrapolatedPressure
fixedFluxPressure
fixedGradient
fixedInternalValue
fixedJump
fixedJumpAMI
fixedMean
fixedPressureCompressibleDensity
fixedProfile
fixedUnburntEnthalpy
fixedValue
freestream
freestreamPressure
gradientEnergy
gradientUnburntEnthalpy
greyDiffusiveRadiation
greyDiffusiveRadiationViewFactor
inletOutlet
inletOutletTotalTemperature
kLowReWallFunction
kqRWallFunction
mapped
mappedField
mappedFixedInternalValue
mappedFixedPushedInternalValue
mixed
mixedEnergy
mixedUnburntEnthalpy
nonuniformTransformCyclic
nutLowReWallFunction
nutTabulatedWallFunction
nutURoughWallFunction
nutUSpaldingWallFunction
nutUWallFunction
nutkAtmRoughWallFunction
nutkRoughWallFunction
nutkWallFunction
omegaWallFunction
outletInlet
outletMappedUniformInlet
partialSlip
phaseHydrostaticPressure
plenumPressure
porousBafflePressure
prghPressure
prghTotalHydrostaticPressure
prghTotalPressure
processor
processorCyclic
rotatingTotalPressure
sliced
slip
symmetry
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
totalFlowRateAdvectiveDiffusive
totalPressure
totalTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
turbulentMixingLengthDissipationRateInlet
turbulentMixingLengthFrequencyInlet
uniformDensityHydrostaticPressure
uniformFixedGradient
uniformFixedValue
uniformInletOutlet
uniformJump
uniformJumpAMI
uniformTotalPressure
v2WallFunction
variableHeightFlowRate
wallHeatTransfer
waveSurfacePressure
waveTransmissive
wedge
wideBandDiffusiveRadiation
zeroGradient
)
3. In case of incompressible, which wall function shall I put here on the boundary fluid_to_box(mappedwall)?
4. Can I use other boundary conditions, other than wallfunctions on this boundary fluid_to_box(mappedwall)?


I tried to explain my problem, but if you need any other information, I would be happy to give.


Thank you
Raza Javed is offline   Reply With Quote

Old   June 17, 2019, 07:36
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

Answer to questions 1-3:
Your solver is compressible. I am not sure you can use an incompressible thermophysical model in version 4.1, but that may be the way to go. As far as I know you can only use the compressible:: version with that solver and OpenFOAM version. Not even sure if there is an incompressible variant in version 4.1.

4. You could use calculated, but that would require a resolution in your mesh that allows to fully resolve the (thermal) boundary layer (y⁺~1).

As you have not provided any information about the mesh (checkMesh output, mesh type, yplus) you are using I do not know if that is the case.

Also I now noticed you are asking questions in multiple topics about the same problem, so I think that you are going to get different answers and it will be difficult to get a clear picture. Furthermore other users will have problems getting a clear answer, this is not the best way forward.

Regards,
Tom
tomf is offline   Reply With Quote

Old   June 17, 2019, 08:36
Default
  #7
Senior Member
 
Raza Javed
Join Date: Apr 2019
Location: Germany
Posts: 183
Rep Power: 7
Raza Javed is on a distinguished road
Hi,


Thank you so much for your reply.


I got to know that I will use compressible flow in my simulation, and then I changed my thermophysical properties accordingly. and I am using wall function Now.


But, when I RUN the solver, after 3 4 iterations, the solver stops and the temperature of the fluid suddenly becomes very high.



When I change the rhomax and rhomin in my system/fluid/fvSolutions, then it runs a little bit longer and again stops saying "maximum number of iterations exceeded".


Actually before, I was using rhomax and rhomin equals to 1000, because I was using constant density of 1000 in thermoPhysicalProperties.



But now, I am using icoPolynomial for density, so I don't exactly know that what values to set for rhomax and rhomin?


I don't know exactly what information do you need to answer this question, but I tried, please let me know if you need any further information.


Thank you


And related to asking questions in many topics, I am sorry for that, I'll take care of it.


Thank you once again.
Raza Javed is offline   Reply With Quote

Reply

Tags
boundary, patch, turbulence modelling, wall, wall functions


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
[Other] mesh airfoil NACA0012 anand_30 OpenFOAM Meshing & Mesh Conversion 13 March 7, 2022 17:22
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
parallel simulations - error message: "OPT_ITERATIONS: invalid option name" v8areu SU2 5 July 23, 2015 02:57
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


All times are GMT -4. The time now is 07:27.