|
[Sponsors] |
Problem in recompiling a turbulence model in OpenFoam 2.1.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 1, 2012, 18:14 |
Problem in recompiling a turbulence model in OpenFoam 2.1.1
|
#1 |
New Member
Join Date: Oct 2012
Posts: 16
Rep Power: 14 |
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 Many thanks, Pascal |
|
October 2, 2012, 01:38 |
|
#2 |
New Member
Join Date: Oct 2012
Posts: 16
Rep Power: 14 |
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 Code:
volSymmTensorField bb = (b & b); Does anybody have an idea how to get it work? Pascal |
|
October 2, 2012, 03:35 |
|
#3 |
Member
Join Date: Mar 2012
Location: Munich, Germany
Posts: 67
Rep Power: 14 |
Hi,
are you sure, that b & b is a symmetric tensor? regards treima |
|
October 2, 2012, 12:52 |
|
#4 |
New Member
Join Date: Oct 2012
Posts: 16
Rep Power: 14 |
I'm not sure but it should since b is just a modification of the Reynoldsstress tensor
|
|
October 2, 2012, 14:22 |
|
#5 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
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? |
|
October 2, 2012, 17:17 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
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) Bruno
__________________
|
|
October 3, 2012, 13:03 |
|
#7 |
New Member
Join Date: Oct 2012
Posts: 16
Rep Power: 14 |
Hi,
with the suggestion of Bruno to include Code:
symm(b & b) 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 |
|
Tags |
compile, openfoam, turbulence model |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
multiphaseInterFoam for RAS turbulence model | chiven | OpenFOAM Bugs | 8 | December 6, 2017 03:08 |
Water subcooled boiling | Attesz | CFX | 7 | January 5, 2013 04:32 |
SAS Turbulence model in OpenFOAM | Steven85 | OpenFOAM | 0 | July 22, 2011 05:36 |
KOmega Turbulence model from wwwopenFOAMWikinet | philippose | OpenFOAM Running, Solving & CFD | 30 | August 4, 2010 11:26 |
Rotta's k-kL Turbulence model in OpenFOAM?? | barath.ezhilan | OpenFOAM | 1 | August 14, 2009 06:55 |