CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Editing RSTM Turbulence Model (

sven August 5, 2009 11:39

Editing RSTM Turbulence Model
Hi everyone,

I want to edit the LaunderGibsonRSTM turbulence model which comes with OpenFOAM. More exactly I want to change the equation for the Reynolds Stresses in this model, so that it becomes a new modelling approach. I copied the Folder with the model and renamed it with the name of the new model and I also renamed the files within this copied folder. Then I began to edit the .C and .H file and it seemed to work. But unfortunately I get an error while compiling the edited file. The eror tells me that LHS and RHS (Left- and right Handside) of the equation I edited no longer have the same Dimensions. I think this is because I deleted some Coefficients in this equation and added some new ones. Sadly I cant find where the dimensions of these constants are implemented. Did anyone encounter this problem too or does anyone know how to solve it?
Thanls a lot

sven August 5, 2009 12:09

I thought the posted error message might probably help:


LHS and RHS of - have different dimensions
    dimensions : [0 0 0 0 0 0 0] - [0 0 -1 0 0 0 0]
#0  Foam::error::printStack(Foam::Ostream&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#1  Foam::error::abort() in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#2  Foam::operator-(Foam::dimensionSet const&, Foam::dimensionSet const&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#3  Foam::tmp<Foam::GeometricField<Foam::typeOfSum<Foam::SymmTensor<double>, Foam::SphericalTensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::operator-<Foam::SymmTensor<double>, Foam::SphericalTensor<double>, Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<Foam::SphericalTensor<double>, Foam::fvPatchField, Foam::volMesh> > const&) in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#4  Foam::incompressible::RASModels::LaunderGibsonModified::correct() in "/home/sven/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/"
#5  main in "/home/sven/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/turbFoam"
#6  __libc_start_main in "/lib/tls/i686/cmov/"
#7  _start in "/home/sven/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/turbFoam"

    From function operator-(const dimensionSet& ds1, const dimensionSet& ds2)
    in file dimensionSet/dimensionSet.C at line 423.

FOAM aborting

makaveli_lcf September 18, 2009 05:29

from your error out put you have some mismatch of dimensions in substraction of two values in Foam::incompressible::RASModels::LaunderGibsonModi fied::correct() method.
Analyze it if all parts have the same dimensions.
As a hint: it is better first to analyze equations on paper if they are correctly stated before transitioning them to source code.
Good luck!

All times are GMT -4. The time now is 09:45.