|
[Sponsors] |
September 17, 2013, 07:07 |
Compressible turbulence model issues
|
#1 |
New Member
Dominic
Join Date: Jan 2011
Location: Leeds, UK
Posts: 25
Rep Power: 15 |
Hello forum,
I've been trying to compile my my own compressible RAS-based turbulence model, based upon compressible k-epsilon for use with rhoSimpleFoam in ver 2.2.0 but have been having a number of issues. The root of the problems seems to be a mismatch between units within the model centered around the mut term. Although the model does compile correctly with no errors, I've had to copy the turbulenceModel/compressible directory to my run directory to compile the model. The only addition to the files in Make/ has been the new .C file and the write directory set to user library. The options file remains unchanged. Copying the dimensions from the tutorial case located in : /opt/openfoam/220/tutorials/compressible/rhoSimpleFoam/angledExplicitDuctFixedCoeffs; give the units for mut as being [1 -1 -1 0 0 0 0], however when attempting to run with my new model, the mut term only calculates as [0 2 -1 0 0 0 0], obviously missing the unit change for rho [1 -3 0 0 0 0 0] despite its inclusion in the equations. Although this model was written using the incompressible kEpsilon model originally, all terms and files have been updated to match compressible kEpsilon. Code:
mut_ = (Cmu_*rho_*sqr(k_)/epsilon_); mut_.correctBoundaryConditions(); Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::compressible::mutkWallFunctionFvPatchScalarField::calcMut() const in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so" #4 Foam::compressible::mutWallFunctionFvPatchScalarField::updateCoeffs() in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so" #5 Foam::fvPatchField<double>::evaluate(Foam::UPstream::commsTypes) in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/rhoSimpleFoam" #6 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/rhoSimpleFoam" #7 Foam::compressible::RASModels::yliqcomp::yliqcomp(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&, Foam::word const&) in "/home/moffat/OpenFOAM/moffat-2.2.0/platforms/linux64GccDPOpt/lib/libuserRAScomp.so" #8 Foam::compressible::RASModel::adddictionaryConstructorToTable<Foam::compressible::RASModels::yliqcomp>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) in "/home/moffat/OpenFOAM/moffat-2.2.0/platforms/linux64GccDPOpt/lib/libuserRAScomp.so" #9 Foam::compressible::RASModel::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libcompressibleRASModels.so" #10 in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/rhoSimpleFoam" #11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #12 in "/opt/openfoam220/platforms/linux64GccDPOpt/bin/rhoSimpleFoam" Floating point exception (core dumped) Does anyone have any pointers as to why the units for density are seemingly being missed out? Or is there a specific way in which the rho term is handled during the compressible solver use? Thanks. Dom. |
|
September 18, 2013, 04:34 |
|
#2 | |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Hi Dom,
can you be more specific on Quote:
in src/turbulenceModels/compressible/RAS/kEpsilon. Are you sure you didn't miss an occurance of the mut_ equation and have you adapted. Is the namespace correct ? May be you are not missing rho units when you compute mut but when muEff=mut+mu is done. Gregor |
||
September 18, 2013, 05:48 |
|
#3 |
New Member
Dominic
Join Date: Jan 2011
Location: Leeds, UK
Posts: 25
Rep Power: 15 |
Hi Gregor,
the only reason I used the incompressible model as a basis for the compressible version was that I had fully implemented all additional equations in that version and was hoping for a quick, easy transition. Not so much You were quite right, the fault lay with the units for muEff rather than the mut calculation with the turbulence model .C file; I took your advice and started again with the compressible model as a basis and now seems to work - additions pending. Thank you very much for the assistance. Cheers. Dom. |
|
October 23, 2013, 15:43 |
|
#4 |
New Member
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 13 |
Hello,
I'm just starting to learn the openfoam turbulence models. Regarding kEpsilon model for compressible flows, I'm not clear about the of's formulations. Namely rho is included in the first unsteady term in the equation, say for epsilon, correspondingly the convection term also needs to include the rho contribution. But as seen the code below, phi_ is just function of Sf and U; where is rho's contribution? Does it appear in the RHS as - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*rho_*divU, epsilon_). fvm::ddt(rho_, epsilon_) + fvm::div(phi_, epsilon_)... 290 // Dissipation equation 291 tmp<fvScalarMatrix> epsEqn 292 ( 293 fvm::ddt(rho_, epsilon_) 294 + fvm::div(phi_, epsilon_) 295 - fvm::laplacian(DepsilonEff(), epsilon_) 296 == 297 C1_*G*epsilon_/k_ 298 - fvm::SuSp(((2.0/3.0)*C1_ + C3_)*rho_*divU, epsilon_) 299 - fvm::Sp(C2_*rho_*epsilon_/k_, epsilon_) 300 ); Many thanks. Regards, Jason |
|
October 24, 2013, 06:57 |
|
#5 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 17 |
Hi Jason,
please double check the definition of phi it should contain rho*U e.g. in compressibleCreatePhi.H Code:
linearInterpolate(rho*U) & mesh.Sf() Cheers Gregor |
|
October 24, 2013, 15:41 |
|
#6 |
New Member
Hf
Join Date: Nov 2012
Posts: 29
Rep Power: 13 |
Hi Gregor,
Exactly you are right. I just found definition of phi is different for incompressible and compressible flow. Regards, Jason |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implement an les turbulence model | pante | OpenFOAM Programming & Development | 19 | December 5, 2014 16:16 |
How to decide to Turbulence model | shipman | OpenFOAM | 2 | August 18, 2013 03:00 |
compressible low-Re turbulence model | immortality | OpenFOAM Running, Solving & CFD | 8 | June 11, 2013 04:58 |
turbulence model equation | Andy Chen | FLOW-3D | 4 | January 1, 2010 21:45 |
Problem calculate Y in compressible turbulence model | luca | OpenFOAM Running, Solving & CFD | 5 | June 1, 2006 05:53 |