|
[Sponsors] |
February 26, 2013, 20:31 |
Error while solving channel flow using RAS
|
#1 |
New Member
Karthik Venkatesh
Join Date: Feb 2013
Posts: 2
Rep Power: 0 |
Hey there,
I have a task of solving a basic channel flow problem using RAS Model (kEpsilon model). First I started with channelFoam which is an LES solver, I edited the solver code file channelFoam.C, createFields.H, Make/files and Make/options. In channelFoam.C, I did the following changes, 1. I commented out #Include "LESModel.H" and added #Include "RASModel.H" 2. I added #Include "turbulenceModel.H" 3. Changed the parameter inside the while loop from runtime.loop() to runtime.run(). 4. Added #Include "setDeltaT.H" and runtime++ inside the loop. 5. After that in line 79, I changed divDevBeff(U) to divDevReff() In createFields.H, I replaced LESModel with RASModel in lines 42 and 40. Similarly I did all the changes required to be done in Make/files and Make/options. I compiled the solver and it worked. Now, in my case file, I edited the input values in 0 folder accordingly. That is, I edited epsilon k nut nuTilda p R U accordingly. blockMesh didn't give me any problem. Then, when I used my solver, I got the following errors, #0 Foam::error:: printStack(Foam::Ostream&) at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/OSspecific/POSIX/printStack.C:201 #1 Foam::sigFpe::sigHandler(int) at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/OSspecific/POSIX/signals/sigFpe.C:117 #2 __restore_rt at sigaction.c:0 #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/fields/Fields/scalarField/scalarField.C:95 #4 void Foam::divide<Foam::fvPatchField>(Foam::FieldField< Foam::fvPatchField, double>&, Foam::FieldField<Foam::fvPatchField, double> const&, Foam::FieldField<Foam::fvPatchField, double> const&) at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/scalarFieldField.C:89 #5 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricScalarField.C:114 #6 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:: operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/OpenFOAM/lnInclude/GeometricScalarField.C:114 #7 Foam::incompressible::RASModels::kEpsilon::correct () at /usr/apps1/openfoam-2.1.1/OpenFOAM-2.1.1/src/turbulenceModels/incompressible/RAS/kEpsilon/kEpsilon.C:237 #8 main at ~/OpenFOAM/kmani-2.1.1/applications/solvers/incompressible/channelRASFoam/channelFoam.C:83 #9 __libc_start_main in "/lib64/libc.so.6" #10 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/usr/erc/people/kmani/OpenFOAM/kmani-2.1.1/platforms/linux64Gcc44DPDebug/bin/channelRASFoam" Could anyone suggest me what to do? |
|
March 4, 2013, 07:33 |
|
#2 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 17 |
Why not using another solver ?
|
|
March 4, 2013, 11:10 |
|
#3 |
Senior Member
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0 |
I think this is a good suggestion. if you are using 2.1.x, why not try to use simpleFoam with the appropriate source addition? Take a look at the case
Code:
$FOAM_TUTORIALS/incompressible/simpleFoam/turbineSiting Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object sourcesProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pressureGradientDriven { type pressureGradientExplicitSource; active on; //on/off switch timeStart 0.0; //start time duration 1e10; //duration selectionMode all; //cellSet // points //cellZone pressureGradientExplicitSourceCoeffs { UName U; // name of velocity field Ubar (10.0 0 0); // desired average velocity related to Re gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient flowDir (1 0 0); // flow direction } } // ************************************************************************* // This was found on this page and this page. I have not tested this particular bit of code i have pasted here so you may have to debug it. Good luck. Last edited by chegdan; March 4, 2013 at 19:18. Reason: being a little clearer |
|
Tags |
channel flow, channelfoam, incompressible, ras, turbulent |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Forces in OF15 | richard | OpenFOAM Running, Solving & CFD | 180 | July 9, 2018 11:54 |
alphaEqn.H in twoPhaseEulerFoam | cheng1988sjtu | OpenFOAM Bugs | 15 | May 1, 2016 17:12 |
Interfoam blows on parallel run | danvica | OpenFOAM Running, Solving & CFD | 16 | December 22, 2012 03:09 |
ForcesCoeffs | ronaldo | OpenFOAM | 4 | September 14, 2009 08:11 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 12:16 |