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

Problem in recompiling a turbulence model in OpenFoam 2.1.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 1, 2012, 17:14
Default Problem in recompiling a turbulence model in OpenFoam 2.1.1
  #1
New Member
 
Join Date: Oct 2012
Posts: 16
Rep Power: 13
pascool is on a distinguished road
Dear all,

I'am new to OpenFoam and have to compile a turbulence model which was programmed for OpenFoam 1.6 into the current version OpenFoam 2.1.1.
I tried it according to the manual by chalmers, however without any success.

The error log states:

Code:
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file example/example.C
SOURCE=example/example.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/meshTools/lnInclude -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/transportModels -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude -IlnInclude -I. -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude -I/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/example.o
example/example.C: In constructor ‘Foam::incompressible::RASModels::YWV_DY::YWV_DY(const volVectorField&, const surfaceScalarField&, Foam::transportModel&)’:
example/example.C:299:37: error: ‘epsilonSmall_’ was not declared in this scope
example/example.C: In member function ‘virtual void Foam::incompressible::RASModels::YWV_DY::correct()’:
example/example.C:447:21: error: ‘epsilon0_’ was not declared in this scope
example/example.C:482:35: error: conversion from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ to non-scalar type ‘Foam::volSymmTensorField {aka Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>}’ requested
example/example.C:490:35: error: conversion from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ to non-scalar type ‘Foam::volSymmTensorField {aka Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>}’ requested
example/example.C:492:35: error: conversion from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ to non-scalar type ‘Foam::volSymmTensorField {aka Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>}’ requested
example/example.C:540:17: error: ‘k0_’ was not declared in this scope
In file included from example/YWV_DY.H:35:0,
                 from example/example.C:29:
/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H: In static member function ‘static Foam::autoPtr<Foam::incompressible::RASModel> Foam::incompressible::RASModel::adddictionaryConstructorToTable<RASModelType>::New(const volVectorField&, const surfaceScalarField&, Foam::transportModel&, const Foam::word&) [with RASModelType = Foam::incompressible::RASModels::YWV_DY, Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>, Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]’:
/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:138:1:   instantiated from ‘Foam::incompressible::RASModel::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::incompressible::RASModels::YWV_DY]’
example/example.C:48:1:   instantiated from here
/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:126:9: error: no matching function for call to ‘Foam::incompressible::RASModels::YWV_DY::YWV_DY(const volVectorField&, const surfaceScalarField&, Foam::transportModel&, const Foam::word&)’
/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:126:9: note: candidates are:
example/example.C:52:1: note: Foam::incompressible::RASModels::YWV_DY::YWV_DY(const volVectorField&, const surfaceScalarField&, Foam::transportModel&)
example/example.C:52:1: note:   candidate expects 3 arguments, 4 provided
example/YWV_DY.H:51:7: note: Foam::incompressible::RASModels::YWV_DY::YWV_DY(const Foam::incompressible::RASModels::YWV_DY&)
example/YWV_DY.H:51:7: note:   candidate expects 1 argument, 4 provided
/home/pascal/OpenFOAM/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/lnInclude/RASModel.H:126:9: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [Make/linux64GccDPOpt/example.o] Error 1
Any help to fix that problem appreciated!
Many thanks, Pascal

pascool is offline   Reply With Quote

Old   October 2, 2012, 00:38
Default
  #2
New Member
 
Join Date: Oct 2012
Posts: 16
Rep Power: 13
pascool is on a distinguished road
I hope that I almost fixed it. However, one error is still there:

Code:
example/example.C:482:35: error: conversion from ‘Foam::tmp<Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> >’ to non-scalar type ‘Foam::volSymmTensorField {aka Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh>}’ requested
The corresponding line in the code is:

Code:
volSymmTensorField bb = (b & b);
where b is a volSymmTensorField as well.

Does anybody have an idea how to get it work?

Pascal
pascool is offline   Reply With Quote

Old   October 2, 2012, 02:35
Default
  #3
Member
 
Join Date: Mar 2012
Location: Munich, Germany
Posts: 67
Rep Power: 14
treima is on a distinguished road
Hi,

are you sure, that b & b is a symmetric tensor?


regards
treima
treima is offline   Reply With Quote

Old   October 2, 2012, 11:52
Default
  #4
New Member
 
Join Date: Oct 2012
Posts: 16
Rep Power: 13
pascool is on a distinguished road
I'm not sure but it should since b is just a modification of the Reynoldsstress tensor
pascool is offline   Reply With Quote

Old   October 2, 2012, 13:22
Default
  #5
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Counterexample: http://www.wolframalpha.com/input/?i...%7D%7D&x=2&y=6

Edit: Hmm, this is probably not the definition of the dot product of tensorfields?
Bernhard is offline   Reply With Quote

Old   October 2, 2012, 16:17
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Quote:
Originally Posted by treima View Post
are you sure, that b & b is a symmetric tensor?
This comment of Treima triggered my attention! This was a bug that was fixed in OpenFOAM 2.1.x back in December: The dot-product operator for two SymmTensor's returns a SymmTensor instead of a Tensor
This is also fixed in 1.6-ext since around the same time.

If by any chance you guys do need the result of "b & b" to be symmetric, you can do it with this:
Code:
symm(b & b)
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 3, 2012, 12:03
Default
  #7
New Member
 
Join Date: Oct 2012
Posts: 16
Rep Power: 13
pascool is on a distinguished road
Hi,

with the suggestion of Bruno to include

Code:
symm(b & b)
the compilation and the turbulent model runs without any errors.
I think the problem was that in OpenFoam 1.5 for which the model was writeen (b & b) automatically returned a symmetric tensor, since b is symmetric. With the mentioned bugfix this is no longer automatically valid.

The post processing will show whether the model computes reasonable results.

Thanks,

Pascal
pascool is offline   Reply With Quote

Reply

Tags
compile, openfoam, turbulence model


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
multiphaseInterFoam for RAS turbulence model chiven OpenFOAM Bugs 8 December 6, 2017 02:08
Water subcooled boiling Attesz CFX 7 January 5, 2013 03:32
SAS Turbulence model in OpenFOAM Steven85 OpenFOAM 0 July 22, 2011 04:36
KOmega Turbulence model from wwwopenFOAMWikinet philippose OpenFOAM Running, Solving & CFD 30 August 4, 2010 10:26
Rotta's k-kL Turbulence model in OpenFOAM?? barath.ezhilan OpenFOAM 1 August 14, 2009 05:55


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