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

Switching Turbulence Model

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

Like Tree1Likes
  • 1 Post By Francisco Barbosa

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 12, 2024, 21:37
Default Switching Turbulence Model
  #1
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hi All!
I need to run a cyclone separator to evaluate particle emission. So I got cyclone incompressibleDenseParticleFluid tutorial to start from. However I've not been succesful when switching turbulence model from LES to k-epsilon. Once I have already updated 0 folder files and fvSolution and fvSchemes files, following message has been showed when running decompsePar for parallel run:

Decomposing FV fields

Decomposing volScalarFields

p


--> FOAM FATAL IO ERROR:
Cannot find patchField entry for internalFaces

file: /home/francisco/Documentos/OFtutorials/cyclone/cycloneKEpslon/0/p/boundaryField from line 26 to line 18.

From function void Foam::GeometricBoundaryField<Type, PatchField, GeoMesh>::readField(const Foam:imensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
in file /home/ubuntu/OpenFOAM/OpenFOAM-12/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 158.

FOAM exiting


Can anyone support me with this error?
Thanks
Francisco Barbosa is offline   Reply With Quote

Old   November 13, 2024, 04:08
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Hello,

Code:
--> FOAM FATAL IO ERROR:
Cannot find patchField entry for internalFaces

file: /home/francisco/Documentos/OFtutorials/cyclone/cycloneKEpslon/0/p/boundaryField from line 26 to line 18.
Your mesh seems to have a patch named "internalFaces", but there is no boundary condition for the patch internalFaces in 0/p file.

Have a look there: "Cannot find patchField entry for allBoundary" - when setting two inlets in interFoam

Yann
Yann is offline   Reply With Quote

Old   November 13, 2024, 22:33
Default
  #3
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hello Yann!
Thank you so much. Indeed, this patch was not defined in 0 folder, because at original tutorial it was not either. I have set this BC and it decomposed correctly.

Thank you!
Yann likes this.
Francisco Barbosa is offline   Reply With Quote

Old   November 20, 2024, 20:53
Default
  #4
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hi!

Working the same case (cyclone from tutorial), I have faced following error:

Selecting thermodynamics package
{
type hePsiThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleInternalEnergy;
}

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/usr/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::species::thermo<Foam::hConstThermo<Foam:er fectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::he(double, double) const at ??:?

...

I have already tried the following troubleshooting:

- change BC types;
- refine delta_T at controlDict;
- change hf value at phisicalProperties file, from 0 to 2.544e+06;

Can someone give me an insight on how to go forward?
Thanks
Francisco Barbosa is offline   Reply With Quote

Old   November 21, 2024, 04:29
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Hello,

The solver is crashing during initialization, so there must be something wrong somewhere in the case setup.
Playing around with deltaT is useless as the solver crashes way before starting time loop.

It's hard to say without more information, but the solver is crashing after loading the thermo package, when it is supposed to read the velocity field.

How is your 0/p file defined? Are you using relative or absolute pressure? (since you are using perfect gas, I think you should use an absolute pressure in order to be able to properly compute density)
Yann is offline   Reply With Quote

Old   November 21, 2024, 21:55
Default
  #6
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hi Yann! Thanks for your support.

Below is my 0/p file. Any observation? How do I define absolute pressure?

FoamFile
{
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet
{
type fixedFluxPressure;
value $internalField;
}

outlet
{
type fixedValue;
value uniform 0;
}

walls
{
type fixedFluxPressure;
value $internalField;
}

internalFaces
{
type internal;

}

defaultFaces
{
type fixedFluxPressure; //patch;
value $internalField;

}
}


// ************************************************** *********************** //

Best regards
Francisco Barbosa is offline   Reply With Quote

Old   November 22, 2024, 04:17
Default
  #7
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Hello Francisco,

Here for initialization inside the domain:

Code:
internalField uniform 0;
And here to fix the pressure at outlet:

Code:
outlet
{
type fixedValue;
value uniform 0;
}
Currently, everything is set to 0, and I think this could be why your solver cannot start. Try setting 1e5, or whatever is your absolute pressure at outlet.

Regards,
Yann
Yann is offline   Reply With Quote

Old   November 26, 2024, 21:28
Default
  #8
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hi Yann!

It worked. Thanks. Next step I've faced following error:

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon


--> FOAM FATAL ERROR:
Invalid wall function specification
Patch type for patch defaultFaces must be wall
Current patch type is patch



From function virtual void Foam::nutWallFunctionFvPatchScalarField::checkType ()
in file derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C at line 45.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::nutWallFunctionFvPatchScalarField::nutWallFu nctionFvPatchScalarField(Foam::fvPatch const&, Foam:imensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?


I have made some trials at 0/nut file, changing defaultFaces types, internalField value, but no success. Below I share 0/nut file:

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet
{
type calculated;
value $internalField;
}

outlet
{
type calculated;
value $internalField;
}

walls
{
type nutkWallFunction;
value $internalField;
}

internalFaces
{
type internal;

}

defaultFaces
{
type nutkWallFunction;
value $internalField;

}
}

Can you support again?
Thanks
Francisco Barbosa is offline   Reply With Quote

Old   November 27, 2024, 04:23
Default
  #9
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Hello,

Check the boundary type for defaultFaces in the constant/polymesh/boundary file. I guess it is not defined as wall there, and wall functions can only be applied on walls.

Cheers,
Yann
Yann is offline   Reply With Quote

Old   November 27, 2024, 22:16
Default
  #10
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hi Yann! Thanks again for you support.

I got a step forward. Now I got this error:

--> FOAM FATAL ERROR:
Arguments of max have different dimensions
dimensions : [length^2 time^-3] and [mass^-1 length^5 time^-3]


From function Foam::dimensionSet Foam::max(const dimensionSet&, const dimensionSet&)
in file dimensionSet/dimensionSet.C at line 252.

FOAM aborting

I followed some troubleshooting I search on google and in this portal, but could not move on.

Can you support with this again? I hope, with your support, get this case run soon.

Thank you so much.
Cheers!
Francisco Barbosa is offline   Reply With Quote

Old   November 28, 2024, 04:53
Default
  #11
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Hello Francisco,

Can you post the full log to have some context and see when this error happens?
Yann is offline   Reply With Quote

Old   December 2, 2024, 20:56
Default
  #12
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hi Yann!

Below, I send you the complete log, when run the solver (foamRun):

/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 12
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
Build : 12-6aa359dae696
Exec : foamRun
Date : Dec 02 2024
Time : 21:58:38
Host : "WORKSTATION"
PID : 6328
I/O : uncollated
Case : /home/francisco/Documentos/OFtutorials/cyclone/cycloneKEpsilon
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Selecting solver fluid
Selecting thermodynamics package
{
type hePsiThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleInternalEnergy;
}

Selecting turbulence model type RAS
Selecting RAS turbulence model kEpsilon


--> FOAM FATAL ERROR:
Arguments of max have different dimensions
dimensions : [length^2 time^-3] and [mass^-1 length^5 time^-3]


From function Foam::dimensionSet Foam::max(const dimensionSet&, const dimensionSet&)
in file dimensionSet/dimensionSet.C at line 252.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::max(Foam::dimensionSet const&, Foam::dimensionSet const&) at ??:?
#3 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::max<double, Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#4 Foam::RASModels::kEpsilon<Foam::compressibleMoment umTransportModel>::boundEpsilon() at ??:?
#5 Foam::RASModels::kEpsilon<Foam::compressibleMoment umTransportModel>::kEpsilon(Foam::geometricOneFiel d const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::viscosity const&, Foam::word const&) at ??:?
#6 Foam::RASModel<Foam::compressibleMomentumTransport Model>::adddictionaryConstructorToTable<Foam::RASM odels::kEpsilon<Foam::compressibleMomentumTranspor tModel> >::New(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::viscosity const&) at ??:?
#7 Foam::RASModel<Foam::compressibleMomentumTransport Model>::New(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::viscosity const&) at ??:?
#8 Foam::compressibleMomentumTransportModel::adddicti onaryConstructorToTable<Foam::RASModel<Foam::compr essibleMomentumTransportModel> >::NewcompressibleMomentumTransportModel(Foam::geo metricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::viscosity const&) at ??:?
#9 Foam::autoPtr<Foam::compressibleMomentumTransportM odel> Foam::momentumTransportModel::New<Foam::compressib leMomentumTransportModel>(Foam::compressibleMoment umTransportModel::alphaField const&, Foam::compressibleMomentumTransportModel::rhoField const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::viscosity const&) at ??:?
#10 Foam::compressibleMomentumTransportModel::New(Foam ::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::viscosity const&) at ??:?
#11 Foam::solvers::isothermalFluid::isothermalFluid(Fo am::fvMesh&, Foam::autoPtr<Foam::fluidThermo>) at ??:?
#12 Foam::solvers::isothermalFluid::isothermalFluid(Fo am::fvMesh&) at ??:?
#13 Foam::solvers::fluid::fluid(Foam::fvMesh&) at ??:?
#14 Foam::solver::addfvMeshConstructorToTable<Foam::so lvers::fluid>::New(Foam::fvMesh&) at ??:?
#15 Foam::solver::New(Foam::word const&, Foam::fvMesh&) at ??:?
#16 ? in "/opt/openfoam12/platforms/linux64GccDPInt32Opt/bin/foamRun"
#17 ? in "/usr/lib/x86_64-linux-gnu/libc.so.6"
#18 __libc_start_main in "/usr/lib/x86_64-linux-gnu/libc.so.6"
#19 ? in "/opt/openfoam12/platforms/linux64GccDPInt32Opt/bin/foamRun"

Any question, let me know.

Thanks again!

Last edited by Francisco Barbosa; December 2, 2024 at 21:00. Reason: Mistake in log pasting.
Francisco Barbosa is offline   Reply With Quote

Old   December 3, 2024, 13:00
Default
  #13
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Hello Francisco,

I'm not sure what is the exact problem, but it seems to crash when the solver is loading the turbulence model.

The error message itself refers to dimensions error, so maybe you can first check your boundary conditions to see if you have the proper dimensions specified for each turbulent variables.
Yann is offline   Reply With Quote

Old   December 3, 2024, 22:13
Default
  #14
New Member
 
fevbfilho
Join Date: Nov 2024
Posts: 8
Rep Power: 2
Francisco Barbosa is on a distinguished road
Hello Yann!

Thank you so much. The prblem was in the pressure dimensions. When I changed from relative to absolute pressure I had not updated its dimension. Then, it worked.

Now I got this error:

--> FOAM FATAL ERROR:

request for surfaceScalarField phi.air from objectRegistry region0 failed
available objects of type surfaceScalarField are

2
(
phi
magSf
)

Can you give any insight about this?

Thanks.
Cheers!
Francisco Barbosa is offline   Reply With Quote

Old   December 4, 2024, 04:43
Default
  #15
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,223
Rep Power: 28
Yann will become famous soon enough
Quote:
Originally Posted by Francisco Barbosa View Post
Hello Yann!

Thank you so much. The prblem was in the pressure dimensions. When I changed from relative to absolute pressure I had not updated its dimension. Then, it worked.
For you information, the pressure dimension depends on the solver you are using, rather than the usage or absolute/relative pressure.

Quote:
Originally Posted by Francisco Barbosa View Post
--> FOAM FATAL ERROR:

request for surfaceScalarField phi.air from objectRegistry region0 failed
available objects of type surfaceScalarField are

2
(
phi
magSf
)

Can you give any insight about this?

Thanks.
Cheers!
Something in your case setup is trying to access phi.air but it does not exist. There is probably a mismatch between your case setup (boundary condition, function object, ...) and the variables computed by your solver.

Cheers,
Yann
Yann is offline   Reply With Quote

Reply

Tags
cyclone, internalfaces, turbulece models

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
[GUIDE] Switching turbulence model to SpalartAllmaras gabrielfelix OpenFOAM Running, Solving & CFD 1 March 24, 2022 21:19
Error in Two phase (condensation) modeling adilsyyed CFX 15 June 24, 2015 20:42
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 10:02


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