CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

zeta - F turbulence model

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 14, 2011, 05:24
Default zeta - F turbulence model
  #1
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
Hi,
I'm trying to implement zeta-F turbulence model by Popovac in openfoam ver. 2.0.0.
After compiling a run time selectable library I'm trying to use it in a tutorial (incompressible/pisofoam/ras/cavity) but when I run the executable this error message appear:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.0.0-d79727c3fca7
Exec : pisoFoam
Date : Jul 14 2011
Time : 11:05:03
Host : ubuntu
PID : 2354
Case : /home/enrico/OpenFOAM/enrico-2.0.0/run/tutorials/incompressible/pisoFoam/ras/cavity
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RASModel
Selecting RAS turbulence model zetaF
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam200/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam200/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) in "/opt/openfoam200/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in "/opt/openfoam200/platforms/linux64GccDPOpt/bin/pisoFoam"
#5 Foam::incompressible::RASModels::zetaF::Tau() const in "/home/enrico/OpenFOAM/enrico-2.0.0/platforms/linux64GccDPOpt/lib/libzetaF.so"
#6 Foam::incompressible::RASModels::zetaF::zetaF(Foam ::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&, Foam::word const&) in "/home/enrico/OpenFOAM/enrico-2.0.0/platforms/linux64GccDPOpt/lib/libzetaF.so"
#7 Foam::incompressible::RASModel::adddictionaryConst ructorToTable<Foam::incompressible::RASModels::zet aF>::New(Foam::GeometricField<Foam::Vector<double> , Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/home/enrico/OpenFOAM/enrico-2.0.0/platforms/linux64GccDPOpt/lib/libzetaF.so"
#8 Foam::incompressible::RASModel::New(Foam::Geometri cField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam200/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#9 Foam::incompressible::turbulenceModel::addturbulen ceModelConstructorToTable<Foam::incompressible::RA SModel>::NewturbulenceModel(Foam::GeometricField<F oam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam200/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#10 Foam::incompressible::turbulenceModel::New(Foam::G eometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&) in "/opt/openfoam200/platforms/linux64GccDPOpt/lib/libincompressibleTurbulenceModel.so"
#11
in "/opt/openfoam200/platforms/linux64GccDPOpt/bin/pisoFoam"
#12 __libc_start_main in "/lib/libc.so.6"
#13
in "/opt/openfoam200/platforms/linux64GccDPOpt/bin/pisoFoam"
Floating point exception


I've no experience in c++ programming but I think the initial/boundary conditions are not correctly set: in "0" directory I copy the k file contents in f and zeta file and then change the dimensionset (1/dimTime for f and dimless for zeta).
Where is the error?
Attached Files
File Type: c zetaF.C (9.3 KB, 53 views)
File Type: h zetaF.H (6.6 KB, 26 views)
e_boesso is offline   Reply With Quote

Old   July 14, 2011, 05:53
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
I am not able to compile your code without errors. Which version of OpenFOAM are you using?

How do you initialize the other fields? I can imagine that the floating point exception is caused by a division by zero somewhere.
Bernhard is offline   Reply With Quote

Old   July 14, 2011, 07:32
Default
  #3
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
Thanks for reply,
the other fields are initialized in the same manner as the tutorial do ("0" directory in the tutorial directory).
For compiling the library I use the command "wmake libso" from within the zetaF directory in $PROJECT_USER_DIR environment and no error appear. My version is 2.0.0.
e_boesso is offline   Reply With Quote

Old   July 14, 2011, 07:42
Default
  #4
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
I follow the development of the kEpsilon turbulence model as implemented in version 2.0.0 and modify it. If I try to compile my preceding version of zetaF turbulence model set up for openfoam 1.7.1 does not work in release 2.0.0.
I think this is caused by the different implementation of the RASModel base class from 1.7.1 to 2.0.0.
e_boesso is offline   Reply With Quote

Old   July 14, 2011, 08:14
Default
  #5
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
So it's obvious that your 2.0 version does not compile in my 1.7
But do I understand correctly that it did work with 1.7?

I understand you initialize with the 0 folder, but with what values?
Bernhard is offline   Reply With Quote

Old   July 14, 2011, 08:42
Default
  #6
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
In version 1.7 I compile the code... now I have to test it...right.. but... before do it... openCFD release the 2.0 version! So I change the code to fit into the new version. No tests has been made on this implementation of the turbulence model.
You find "0" case directory below.
Attached Files
File Type: gz 0.tar.gz (983 Bytes, 24 views)
e_boesso is offline   Reply With Quote

Old   July 14, 2011, 09:19
Default
  #7
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
I find the division by zero error. It's in zetaF.C in the function Tau() (line 52).
The velocity tensor at the denominator has all the components set to 0 because of the initial conditions. There are many other errors I'm trying to resolve.
e_boesso is offline   Reply With Quote

Old   July 14, 2011, 09:55
Default
  #8
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
Maybe you can start from a converged k-epsilon solution, so that you won't encounter problems with these kind of issues. An alternative is to add VSMALL or something like that to the denominator.
Bernhard is offline   Reply With Quote

Old   July 14, 2011, 10:18
Default
  #9
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
Thanks, it works now. I add fMin_ to the denominator (the same dimensionset is needed in the LHS and RHS of + operator), that is the lower limit value for volScalarField f_.
But I don't understand: the denominator in evaluating the time scale ( Tau() ) is the same that appear in the length scale ( L() ) but only in Tau() function the floating point exception is present.
Why?
e_boesso is offline   Reply With Quote

Old   July 14, 2011, 10:39
Default
  #10
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
Maybe because you call Tau() before L()?

By the way, be sure to check the correct implementatation for |S|, I think Hanjalic defines it as (2*S_ij*S_ij)^(1/2)
Bernhard is offline   Reply With Quote

Old   July 15, 2011, 07:48
Default
  #11
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
No, excluding the min part of Tau() function from the code, recompiling and running the case the floating point exception is not present.

I write |S| in openfoam as mag(symm(fvc::grad(U_))). Is it correct?
e_boesso is offline   Reply With Quote

Old   July 15, 2011, 07:54
Default
  #12
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
First thing: I have no idea.

Second, in your case.
|S|=\left(S_{ij} S_{ij}\right)^{1/2}
But I think in the zeta-f model, it should be defined as

|S|=\left(2 S_{ij} S_{ij}\right)^{1/2}
Bernhard is offline   Reply With Quote

Old   August 18, 2011, 14:11
Default
  #13
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
Thanks for the correction.
e_boesso is offline   Reply With Quote

Old   August 18, 2011, 14:17
Default BCs
  #14
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
I'm trying to resolve channel flow or backward facing step to validate the model but I've no ideas on how to apply boundary conditions (inlet, outlet and wall) for zeta and f scalar variables.
Suggestions or references to the matter?
Thanks
e_boesso is offline   Reply With Quote

Old   August 18, 2011, 14:50
Default
  #15
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 12
Bernhard is on a distinguished road
I think Hanjalic proposes a transformation on f which reduces it's boundary condion to f=0. Did you try that?
Bernhard is offline   Reply With Quote

Old   August 18, 2011, 15:31
Default
  #16
New Member
 
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 6
e_boesso is on a distinguished road
I understand that transformation is valid only for the wall BC.
But for inlet and outlet?
I'm also unable to manage zeta BCs.
e_boesso is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam case with SpalartAllmaras turbulence model implemented nedved OpenFOAM Running, Solving & CFD 2 November 30, 2014 23:43
Wrong calculation of nut in the kOmegaSST turbulence model FelixL OpenFOAM Bugs 27 March 27, 2012 09:02
Low Reynolds k-epsilon model YJZ ANSYS 1 August 20, 2010 13:57
KOmega Turbulence model from wwwopenFOAMWikinet philippose OpenFOAM Running, Solving & CFD 30 August 4, 2010 10:26
SSG Reynolds Turbulence Model Georges CFX 1 February 28, 2007 17:15


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