|
[Sponsors] |
July 14, 2011, 06:24 |
zeta - F turbulence model
|
#1 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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? |
|
July 14, 2011, 06:53 |
|
#2 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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. |
|
July 14, 2011, 08:32 |
|
#3 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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. |
|
July 14, 2011, 08:42 |
|
#4 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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. |
|
July 14, 2011, 09:14 |
|
#5 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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? |
|
July 14, 2011, 09:42 |
|
#6 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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. |
|
July 14, 2011, 10:19 |
|
#7 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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. |
|
July 14, 2011, 10:55 |
|
#8 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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.
|
|
July 14, 2011, 11:18 |
|
#9 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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? |
|
July 14, 2011, 11:39 |
|
#10 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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) |
|
July 15, 2011, 08:48 |
|
#11 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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? |
|
July 15, 2011, 08:54 |
|
#12 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
||
August 18, 2011, 15:11 |
|
#13 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
Thanks for the correction.
|
|
August 18, 2011, 15:17 |
BCs
|
#14 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
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 |
|
August 18, 2011, 15:50 |
|
#15 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
I think Hanjalic proposes a transformation on f which reduces it's boundary condion to f=0. Did you try that?
|
|
August 18, 2011, 16:31 |
|
#16 |
New Member
Enrico Boesso
Join Date: Mar 2011
Location: Padova, Italy
Posts: 16
Rep Power: 15 |
I understand that transformation is valid only for the wall BC.
But for inlet and outlet? I'm also unable to manage zeta BCs. |
|
|
|
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 10:02 |
Low Reynolds k-epsilon model | YJZ | ANSYS | 1 | August 20, 2010 14:57 |
KOmega Turbulence model from wwwopenFOAMWikinet | philippose | OpenFOAM Running, Solving & CFD | 30 | August 4, 2010 11:26 |
SSG Reynolds Turbulence Model | Georges | CFX | 1 | February 28, 2007 17:15 |