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

Electric Car [simpleFoam] Case does not converge

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By linnemann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2012, 01:29
Default Electric Car [simpleFoam] Case does not converge
  #1
New Member
 
Serena
Join Date: Aug 2012
Location: Tokyo
Posts: 7
Rep Power: 13
serena is on a distinguished road
Hello,
This is my first post! I have the model of an electric motor that is mounted right next to the wheel of a car.

My final objective is to model the heat generation of the motor and to see if the incoming airflow is sufficient to dissipate the heat. Having little experience with OpenFOAM, I decided as a first step, to obtain just the pressure and velocities of the air around the motor and the wheel. But the case diverges. Very high velocities, unrealistic pressures...
All the data [original mesh file (261front10side5fin.Valentino.ccm), files of system, 0, constant, directories] are saved in DROPBOX
https://www.dropbox.com/sh/gg1ypj0c1sftemx/Ct7derbpHh
in the OpenFOAM directory.
Please open the file Output.console to see the full list of outputs and iterations.
feel free to share and inspect them, hope you'll find the error.

Here I just summarize the principal steps followed:
1) CONVERSION OF THE MESH USING ccm26ToFoam
the mesh was generated in Star CCM+. In StarCCM+ I checked the mesh and no error was found. Ccm26ToFoam converts the mesh with no major problem.
2) CHECKING THE MESH
CheckMesh find 3 errors:

***Number of non-orthogonality errors: 4.
<<Writing 1788 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 48 faces are incorrectly oriented.
<<Writing 48 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 115.832, 84 highly skew faces detected which may impair the quality of the results
<<Writing 84 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 3 mesh checks.

End[/CODE]From another thread (http://www.cfd-online.com/Forums/ope...ted-faces.html), I read that the wrong oriented faces can be one reason of the non convergence . But I have no idea how to repair the wrong elements. Within Paraview? or with some OpenFOAM mesh utilities? I don't understand if the cause of no convergence is caused by those failed mesh checks or if the reason resides in the some wrong choices of the following steps (setting boundaries conditions and turbulent model)

3) PREPARATION OF the CASE DIRECTORIES [System, Constant, 0]
I took the tutorial motor bike as guideline and copied all the files and substitute in them my new geometry:

inwheel_BODY
inwheel_TIRE
inwheel_MOTOR
inwheel_BRACKET
inwheel_SUS
inwheel_ARM
zeroleft
zerobottom
zeroinlet
zerooutlet
zeroright
zerotop
inwheel_WHEEL_MAIN
inwheel_FIN

the six "zero*" are the surfaces of boundary condition (the external box), the "inwheel_*" are the surfaces surrounding the internal components (the tire, the motor, the SUS =suspension, ect). I applied to my "inwheel_*" the same types and values of "motorBike_.*" found in the motorbike tutorial ( -> /home/serena/OpenFOAM/serena-2.1.x/run/tutorials/incompressible/simpleFoam/motorBike/)

4) Launch of the ANALYSIS with simpleFOAM
the iterations seem to go smooth, but after clearly diverges.

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kOmegaSST
kOmegaSSTCoeffs
{
    alphaK1         0.85034;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.85616;
    gamma1          0.5532;
    gamma2          0.4403;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    c1              10;
}

No field sources present


SIMPLE: no convergence criteria found. Calculations will run for 500 steps.


Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0934226, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0946569, No Iterations 3
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.0943101, No Iterations 3
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0671126, No Iterations 3
time step continuity errors : sum local = 0.317996, global = 0.0441847, cumulative = 0.0441847
smoothSolver:  Solving for omega, Initial residual = 0.198648, Final residual = 0.0150328, No Iterations 2
bounding omega, min: -4.21225e+06 max: 1.01861e+09 average: 17688.8
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.0992753, No Iterations 67
ExecutionTime = 8.88 s  ClockTime = 9 s

.....

....

Time = 500

smoothSolver:  Solving for Ux, Initial residual = 0.739258, Final residual = 0.0543138, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.689198, Final residual = 0.0452885, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.749222, Final residual = 0.0557543, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.000150562, Final residual = 5.88119e-06, No Iterations 2
time step continuity errors : sum local = 1.51389e+24, global = 7.6719e+21, cumulative = 4.16417e+22
smoothSolver:  Solving for omega, Initial residual = 0.261228, Final residual = 0.0235003, No Iterations 6
smoothSolver:  Solving for k, Initial residual = 0.636562, Final residual = 0.0634246, No Iterations 7
bounding k, min: -2.14769e+45 max: 3.1141e+55 average: 1.11945e+52
ExecutionTime = 1032.31 s  ClockTime = 1034 s

End
:-(

5) Paraview post-processing
The results are poor. Is it a mesh problem, or my boundaries conditions are wrong, or is my turbulent model or something else?

Observations: I have noticed that if I put "turbulence off;" in the constant\RasProperties file, at least in the first iterations results don't seem so bad. But still after velocities are too high, not realistic.

Code:
Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0934226, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0946569, No Iterations 3
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.0943101, No Iterations 3
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0671126, No Iterations 3
time step continuity errors : sum local = 0.317996, global = 0.0441847, cumulative = 0.0441847
ExecutionTime = 7.12 s  ClockTime = 7 s

Time = 2

smoothSolver:  Solving for Ux, Initial residual = 0.440356, Final residual = 0.0357597, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.555957, Final residual = 0.0404236, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.579449, Final residual = 0.0440795, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.345033, Final residual = 0.0144896, No Iterations 2
time step continuity errors : sum local = 0.17027, global = 0.0219908, cumulative = 0.0661755
ExecutionTime = 8.37 s  ClockTime = 9 s

...
Time = 9

smoothSolver:  Solving for Ux, Initial residual = 0.0512727, Final residual = 0.00394622, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.129337, Final residual = 0.00857934, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.127992, Final residual = 0.00912636, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.69351, Final residual = 0.0459734, No Iterations 2
time step continuity errors : sum local = 0.182883, global = 0.023035, cumulative = 0.0058053
ExecutionTime = 17.07 s  ClockTime = 17 s

Time = 10

smoothSolver:  Solving for Ux, Initial residual = 0.0278722, Final residual = 0.00182727, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.0781596, Final residual = 0.00476132, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.0742209, Final residual = 0.00448103, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.558621, Final residual = 0.0504483, No Iterations 2
time step continuity errors : sum local = 0.200628, global = 0.00653344, cumulative = 0.0123387
ExecutionTime = 18.3 s  ClockTime = 18 s

...
Time = 500

smoothSolver:  Solving for Ux, Initial residual = 0.0026294, Final residual = 0.000257185, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 0.0989776, Final residual = 0.00675909, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.0245168, Final residual = 0.0023348, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.273924, Final residual = 0.00853, No Iterations 2
time step continuity errors : sum local = 0.0532629, global = 0.00939804, cumulative = -0.111357
ExecutionTime = 625.82 s  ClockTime = 627 s
Thank you in advance!

With regards,
Serena
Attached Images
File Type: jpg electric.wheel.jpg (92.2 KB, 57 views)
serena is offline   Reply With Quote

Old   September 4, 2012, 02:09
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
Hi

Quote:
2) CHECKING THE MESH
CheckMesh find 3 errors:

***Number of non-orthogonality errors: 4.
<<Writing 1788 non-orthogonal faces to set nonOrthoFaces
***Error in face pyramids: 48 faces are incorrectly oriented.
<<Writing 48 faces with incorrect orientation to set wrongOrientedFaces
***Max skewness = 115.832, 84 highly skew faces detected which may impair the quality of the results
<<Writing 84 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 3 mesh checks.
Your mesh is by 99% certainty the culprit here.
If I were you I would remake the mesh using snappyHexMesh.

Best
serena likes this.
__________________
Linnemann

PS. I do not do personal support, so please post in the forums.
linnemann is offline   Reply With Quote

Old   September 5, 2012, 00:16
Default
  #3
New Member
 
Serena
Join Date: Aug 2012
Location: Tokyo
Posts: 7
Rep Power: 13
serena is on a distinguished road
Thank you very much for your reply.

I'm trying to recreate the mesh with snappyHexMesh as you adviced me.
My problem now is that in the help guide I read I should insert the STL inside a box created with blockMesh.
In my case, the STL file comes already with the surrounding box. The 6 external surfaces (Top Bottom inlet outlet right left) are connected with the surfaces of the model. Is it possible to use those external surfaces for creating the background hex mesh? or do I have to cancel them, leave just the model surfaces and recreate a new box from scratch? I was trying to import the STL file in Engrid and try to find some tools to cancel what I don't need. Does it make sense to you or am I on the wrong road?
serena is offline   Reply With Quote

Old   September 7, 2012, 04:44
Default
  #4
New Member
 
Serena
Join Date: Aug 2012
Location: Tokyo
Posts: 7
Rep Power: 13
serena is on a distinguished road
You were right, the mesh was the culprit.

I have still problem getting the new mesh using snappyhexmesh, but I managed to get a mesh with no errors using the tetrahedral mesher of Star CCM+ instead of the polyhedral. I loose the prism boundary layer, so I tried to compensate that using smaller tetrahedral elements near the wall surface (4million cells in total).
The pressure and velocities given by simpleFoam seem reasonable. I used a delta T quite small, the iterations weren't quick. Not knowing too much about CFD, maybe I have mistaken some parameters. Do you see any not so reasonable settings in my files or anything that can be changed in order to get results quicker?

> k: internalField uniform $turbulentKE;
> nut : internalField uniform 0;
> omega : internalField uniform $turbulentOmega;
> pressure : internalField uniform 0;
> RASModel kOmegaSST;
> transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 1.5e-05;

> ControlDict
startTime 0;
stopAt endTime;
endTime 10;
deltaT 0.005;
writeControl timeStep;
writeInterval 5;

----------------------
ddtSchemes
{
default steadyState;
}

gradSchemes
{
default cellLimited Gauss linear 1; //default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}
--------------------
solvers
{
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.1;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}

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

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

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

SIMPLE
{
nNonOrthogonalCorrectors 0;
}

potentialFlow
{
nNonOrthogonalCorrectors 10;
}

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
k 0.0:// 0.7;
omega 0.0; // 0.7;
}
}

cache
{
grad(U);
}


--------------------
last step :
Time = 10

smoothSolver: Solving for Ux, Initial residual = 0.0007681, Final residual = 4.04672e-05, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.00634906, Final residual = 0.000340722, No Iterations 4
smoothSolver: Solving for Uz, Initial residual = 0.00681167, Final residual = 0.000369204, No Iterations 4
GAMG: Solving for p, Initial residual = 0.0418852, Final residual = 0.0040769, No Iterations 1
time step continuity errors : sum local = 0.00021217, global = -1.0422e-06, cumulative = -0.0308522
smoothSolver: Solving for omega, Initial residual = 0.00115887, Final residual = 0.000114091, No Iterations 15
smoothSolver: Solving for k, Initial residual = 0.0117018, Final residual = 0.00115757, No Iterations 30
ExecutionTime = 52168.6 s ClockTime = 52529 s

End
serena is offline   Reply With Quote

Reply


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
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05
Car park ventilation and impulse fans guillaume Main CFD Forum 12 June 27, 2011 11:16
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24
Turbulent Flat Plate Validation Case Jonas Larsson Main CFD Forum 0 April 2, 2004 10:25
Body force - Does it work? Jan Rusås CFX 5 August 27, 2002 09:50


All times are GMT -4. The time now is 06:44.