
[Sponsors] 
August 4, 2010, 03:51 
Adaptive timestepping

#1 
New Member
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 9 
Hi,
I've read a lot about time stepping on this forum. I've followed the steps from the discussion, ( http://www.cfdonline.com/Forums/ope...estepping.html ) 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(); // Pressurevelocity 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 

August 8, 2010, 21:38 

#2 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
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 in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

August 25, 2010, 10:31 
PimpleFoam Solver

#3 
New Member
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 9 
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 1e06; relTol 0.01; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } pFinal { solver GAMG; tolerance 1e06; relTol 0; smoother GaussSeidel; cacheAgglomeration true; nCellsInCoarsestLevel 10; agglomerator faceAreaPair; mergeLevels 1; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e8; relTol 0.1; nSweeps 1; } UFinal { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } k { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } epsilon { solver PBiCG; preconditioner DILU; tolerance 1e05; relTol 0; } omega { solver PBiCG; preconditioner DILU; tolerance 1e05; 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 

August 25, 2010, 10:40 

#4  
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
Quote:
Best,
__________________
Alberto Passalacqua GeekoCFD  A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

August 26, 2010, 03:11 

#5 
New Member
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 9 
Hi Alberto,
I am trying to simulate the airflow past the different building of our campus. I have added a triSurface in the constantdirectory, 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 0directory and give an input of 3 m/s in the initial conditions file. Regards, Jochem 

August 26, 2010, 14:40 

#6 
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28 
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 in both physical and virtual formats. OpenQBMM  An opensource implementation of quadraturebased moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. 

August 27, 2010, 04:08 
Problem solved

#7 
New Member
Jochem
Join Date: May 2010
Posts: 28
Rep Power: 9 
Alberto,
Thanks for the tip. I think I now know what the problem was. Indeed I've patched the "initial conditions" in the Ufile. 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 0directory. The "initial conditions" file wasn't in the 0directory of every processor. I've copied this file and pasted in every processor*/0directory and the problem was solved. Thanks a lot for the help, Regards, Jochem 

Thread Tools  
Display Modes  


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 stepplease help  Sisiya  Main CFD Forum  2  February 11, 2003 16:19 
unstructured grid  sreekanth  Main CFD Forum  1  August 6, 2001 15:09 