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

Error while solving channel flow using RAS

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2013, 20:31
Exclamation Error while solving channel flow using RAS
  #1
New Member
 
Karthik Venkatesh
Join Date: Feb 2013
Posts: 2
Rep Power: 0
inpepwetrust is on a distinguished road
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?
inpepwetrust is offline   Reply With Quote

Old   March 4, 2013, 07:33
Default
  #2
Senior Member
 
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16
fredo490 is on a distinguished road
Why not using another solver ?
fredo490 is offline   Reply With Quote

Old   March 4, 2013, 11:10
Default
  #3
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Quote:
Originally Posted by fredo490 View Post
Why not using another solver ?
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
and look at the constant/sourcesProperties file. Copy the sourcesProperties to your case and replace the contents with something like:

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
      }
}

// ************************************************************************* //
Note: Currently only handles kinematic pressure

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
chegdan is offline   Reply With Quote

Reply

Tags
channel flow, channelfoam, incompressible, ras, turbulent

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
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


All times are GMT -4. The time now is 04:40.