CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [Other] Laminar simpelFOAM in Openfoam (https://www.cfd-online.com/Forums/openfoam-community-contributions/206049-laminar-simpelfoam-openfoam.html)

ianjikar August 28, 2018 16:19

Laminar simpelFOAM in Openfoam
 
Hi all,

I am trying to run a laminar simpleFoam simulation, but the simulation stops after running for the first time step. I get something like this when running the simulation:


Timestep 1
<runs simulation>

Timestep 2


Simulation STOPS without error



I have set the following in the turbulenceProperties file
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

simulationType laminar;

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



and my controlDict setting are as follows:
application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 1;
deltaT 0.001;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 7;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep yes;
maxCo 0.5;
maxalphaCo 0.5;
maxDeltaT 1;




Please help me to solve this problem.

tomf August 29, 2018 06:07

Quote:

Code:

application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 1;
deltaT 0.001;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 7;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep        yes;
maxCo        0.5;
maxalphaCo        0.5;
maxDeltaT        1;


I am not entirely sure if your deltaT of 0.001 show up, but for simpleFoam I would suggest to use deltaT of 1. You also do not need adjusting of the time step. I suggest using this:

Code:

application          simpleFoam;
startFrom            latestTime;
startTime            0;
stopAt                endTime;
endTime              1000;
deltaT                1;
writeControl          timeStep;
writeInterval        100;
purgeWrite            0;
writeFormat          ascii;
writePrecision        7;
writeCompression      off;
timeFormat            general;
timePrecision        6;
runTimeModifiable    true;

Regards,
Tom

ianjikar August 30, 2018 11:26

Quote:

Originally Posted by tomf (Post 704451)
I am not entirely sure if your deltaT of 0.001 show up, but for simpleFoam I would suggest to use deltaT of 1. You also do not need adjusting of the time step. I suggest using this:

Code:

application          simpleFoam;
startFrom            latestTime;
startTime            0;
stopAt                endTime;
endTime              1000;
deltaT                1;
writeControl          timeStep;
writeInterval        100;
purgeWrite            0;
writeFormat          ascii;
writePrecision        7;
writeCompression      off;
timeFormat            general;
timePrecision        6;
runTimeModifiable    true;

Regards,
Tom

Thank you for your reply, sir. I tried using the settings you mentioned and i am getting the same results:

Create time

Create mesh for time = 0


SIMPLE: convergence criteria
field p tolerance 0.01
field U tolerance 0.001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

No finite volume options present


Starting time loop

Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0005283607, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0002620547, No Iterations 1000
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.01638241, No Iterations 1000
GAMG: Solving for p, Initial residual = 1, Final residual = 0.3576139, No Iterations 1
time step continuity errors : sum local = 79.94304, global = -51.76968, cumulative = -51.76968
ExecutionTime = 2254.25 s ClockTime = 2256 s

Time = 2

tomf August 31, 2018 04:35

Quote:

Originally Posted by ianjikar (Post 704727)
Starting time loop

Time = 1

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0005283607, No Iterations 1000
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0002620547, No Iterations 1000
smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.01638241, No Iterations 1000
GAMG: Solving for p, Initial residual = 1, Final residual = 0.3576139, No Iterations 1
time step continuity errors : sum local = 79.94304, global = -51.76968, cumulative = -51.76968
ExecutionTime = 2254.25 s ClockTime = 2256 s

Time = 2

This tells me something is wrong in your setup. You should not need 1000 iterations for U. Also you probably need more iterations for p. I guess you should check mesh quality, boundary conditions, but specifically the settings in fvSolution and then compare to some of the tutorials.

Regards,
Tom

ianjikar August 31, 2018 12:29

Quote:

Originally Posted by tomf (Post 704802)
This tells me something is wrong in your setup. You should not need 1000 iterations for U. Also you probably need more iterations for p. I guess you should check mesh quality, boundary conditions, but specifically the settings in fvSolution and then compare to some of the tutorials.

Regards,
Tom

Thank you for your help Tom. I will look into the settings.


All times are GMT -4. The time now is 08:03.