CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Adaptive timestepping

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 4, 2010, 03:51
Default Adaptive timestepping
  #1
New Member
 
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 7
Jochem is on a distinguished road
Hi,

I've read a lot about time stepping on this forum. I've followed the steps from the discussion, ( Adaptive timestepping ) stil there is something going wrong.

I want to use this adaptive timestepping in the simpleFoam solver. I've included the 3 files (readTimeControls.H, CourantNo.H and setDeltaT.H) in the solver and 2 files( CourantNo.H and setDeltaT.H ) in the time loop.

When I then give the command "wmake", the following error appears :

cpp: Internal error: Floating point exception (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [linux64GccDPOpt/options] Error 1
cpp: Internal error: Floating point exception (program cc1)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [linux64GccDPOpt/files] Error 1
wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created


For clarity I also post the simpleFoam.C file :

#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "RASModel.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;


while (runTime.run())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

#include "readSIMPLEControls.H"
#include "initConvergenceCheck.H"
#include "CourantNo.H"
#include "setDeltaT.H"

runTime++;

p.storePrevIter();

// Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"
#include "pEqn.H"
}

turbulence->correct();

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;

#include "convergenceCheck.H"
}

Info<< "End\n" << endl;

return 0;
}


Can someone tell my what i am doing wrong?

Regards,

Jochem
Jochem is offline   Reply With Quote

Old   August 8, 2010, 21:38
Default
  #2
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Simply use pimpleFoam. The simpleFoam solver is for steady state calculations.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   August 25, 2010, 10:31
Default PimpleFoam Solver
  #3
New Member
 
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 7
Jochem is on a distinguished road
Hi Alberto,

Sorry for the late reaction but i was abroad for 2 weeks. I've been trying to adjust the pimpleFoam tutorial to my case but i've experienced some problems.

I've now been able to run a case but the solver doesn't calculate the wind velocity and this is the main purpose of my simulation. I've tried to "include initial conditions" in 0/epsilon and 0/nuTilda but still this does not seems to work.

Maybe there is something wrong with my fvSchemes or fvSolution. This files look like this :

- fvSchemes


ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV Gauss linear;;
div(phi,k) Gauss upwind;;
div(phi,omega) Gauss upwind;
div(phi,epsilon)Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}


- fvSolution

solvers
{
p
{
solver GAMG;
tolerance 1e-06;
relTol 0.01;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}

pFinal
{
solver GAMG;
tolerance 1e-06;
relTol 0;
smoother GaussSeidel;
cacheAgglomeration true;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}

U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}

UFinal
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

k
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}

epsilon
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
omega
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0.1;
};

}

PIMPLE
{
nOuterCorrectors 2;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}

relaxationFactors
{
U 1;
k 1;
epsilon 1;
}




Can u help me solve this problem?

Regards,

Jochem
Jochem is offline   Reply With Quote

Old   August 25, 2010, 10:40
Default
  #4
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by Jochem View Post
Hi Alberto,

Sorry for the late reaction but i was abroad for 2 weeks. I've been trying to adjust the pimpleFoam tutorial to my case but i've experienced some problems.

I've now been able to run a case but the solver doesn't calculate the wind velocity and this is the main purpose of my simulation. I've tried to "include initial conditions" in 0/epsilon and 0/nuTilda but still this does not seems to work.
Could you provide a description of the problem you are trying to solve?

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   August 26, 2010, 03:11
Default
  #5
New Member
 
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 7
Jochem is on a distinguished road
Hi Alberto,

I am trying to simulate the airflow past the different building of our campus.
I have added a triSurface in the constant-directory, because I am working with an .stl file of our campus.

I have used one inlet and one outlet. I've been abled to run the case, but in every timestep I see omega and k changing but Ux,Uy,UZ stays zero. Altough i've included 'initial conditions' in the U file in the 0-directory and give an input of 3 m/s in the initial conditions file.

Regards,

Jochem
Jochem is offline   Reply With Quote

Old   August 26, 2010, 14:40
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Is the equation for U solved during the iterations?

Do you specify a value of U at the inlet? Or simply patch the initial condition?

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   August 27, 2010, 04:08
Default Problem solved
  #7
New Member
 
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 7
Jochem is on a distinguished road
Alberto,

Thanks for the tip. I think I now know what the problem was. Indeed I've patched the "initial conditions" in the U-file. The problem was that I run the case in parallel.

So the case was divided into 6 processors and OpenFoam didn't copy the hole 0-directory. The "initial conditions" file wasn't in the 0-directory of every processor. I've copied this file and pasted in every processor*/0-directory and the problem was solved.

Thanks a lot for the help,

Regards,

Jochem
Jochem is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adaptive meshing clifford bradford Main CFD Forum 13 August 11, 2014 09:10
Adaptive timestepping olwi OpenFOAM Running, Solving & CFD 7 August 3, 2010 09:51
adaptive timestepping techniques Sharks Main CFD Forum 0 April 21, 2003 09:25
Oscillation of adaptive time step--please help Sisiya Main CFD Forum 2 February 11, 2003 16:19
unstructured grid sreekanth Main CFD Forum 1 August 6, 2001 15:09


All times are GMT -4. The time now is 15:05.