CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Coupled solver, computational cost (https://www.cfd-online.com/Forums/fluent/115147-coupled-solver-computational-cost.html)

Bollonga March 25, 2013 04:39

Coupled solver, computational cost
 
Hi everybody guys,

I'm solving a wind turbine starting with the steady laminar case and using a pressure-based coupled algorithm.

I have a few questions about the setup. I've looked at the theory guide but I don't know how the Courant number (the solver one, no the regular one) affects convergence. The only thing theory guide says is 1/CFL=(1-alpha)/alpha.

I increased CFL from default 200 to 200000 but then I reduced it to 200 as it seemed to increase computational cost. Residuals went up so I had to reduce uder-relaxation factor (URF) to half of its value for momentum and pressure (0.75 to 0.375 each).
Now that residuals are starting to go down I would like to increase computational speed as it is way too slow.
I know increasing URF will improve that, but what about CFL?

For a 1.7 Gb mesh, 8 cores parallel, 12 Gb RAM it's taking 45 min for each step.

Also, I will have to do a transient laminar case and steady/transient k-omega SST, which solver setup should I use? SIMPLEC? PISO?

Thanks in advance!

Bollonga March 26, 2013 06:25

I've increased URF to 0.75 and it obviously takes less to calculate each iteration, but it's still slow (30 min/iteration). Can I increase URF over default values? What about Courant number, how does it affect the simulation?
Also there's reverse flow at pressure outlet, and it's increasing.

Any suggestion? Thanks!

flotus1 March 26, 2013 06:31

30 minutes for one iteration sounds like the simulation is running out of core.
Check the RAM usage while running the case.

Far March 26, 2013 06:38

Quote:

Originally Posted by Bollonga (Post 416156)
For a 1.7 Gb mesh, 8 cores parallel, 12 Gb RAM it's taking 45 min for each step.

Also, I will have to do a transient laminar case and steady/transient k-omega SST, which solver setup should I use? SIMPLEC? PISO?

Thanks in advance!

You need to add more resources to run 8 million mesh.

For transient case PISO and coupled are good option as they can accommodate larger time steps... And I would prefer coupled. Still not checked the results, accuracy and speed of these two schemes...

Bollonga March 26, 2013 06:51

Quote:

Originally Posted by flotus1 (Post 416456)
30 minutes for one iteration sounds like the simulation is running out of core.
Check the RAM usage while running the case.

Memory usage is 99%
I have 16 Gb RAM

My mesh size is:
Total elements : 8250475
Total nodes : 8118741

flotus1 March 26, 2013 07:05

Quote:

Originally Posted by Bollonga (Post 416459)
Memory usage is 99%

This clearly indicates that you need more RAM. Are you running the case in double precision? If this is not necessay, switch to single precision.

Bollonga March 26, 2013 07:08

Quote:

Originally Posted by flotus1 (Post 416464)
This clearly indicates that you need more RAM. Are you running the case in double precision? If this is not necessay, switch to single precision.

Well, I need to calculate the blade power. I've always used double precision but I don't know if it's strictly necessary here. Can I switch to single precision without risking accuracy?

As suggested by Far I'm going to coarsen my mesh a bit more. 8 millions cells seem too much.

flotus1 March 26, 2013 07:14

Double precision usually is only necessary if there are cells with really high aspect ratio in the boundary layer to achieve Yplus<1.
In most cases, the other errors in the simulation are several magnitudes higher than the roundoff error in single precision.
The thing with double precision is that it doubles memory usage.

oj.bulmer March 26, 2013 07:15

Courant number is proportional to the time step and velocity and inversely proportional to grid size at local cell conditions. The fact that how much sensetive the solution is to Courant number, depends on whether the solution method is explicit or implicit.

With explicit method, there are obvious limitations on timestep, and hence Courant number. For implicit method, typically it should be helpful to increase the Courant number in accelerating convergence.

However, you should be careful here since the Courant number should be ramped gradually over say 50-100 iterations. This interval should be smaller, and the increase in Courant number should be smaller, at the initial phase of solution, where the transient instabilities have a strong influence on solution. A sudden increase in Courant number may not achieve the steady convergence goal.

OJ

Far March 26, 2013 07:20

Quote:

Originally Posted by oj.bulmer (Post 416470)
Courant number is proportional to the time step and velocity and inversely proportional to grid size at local cell conditions. The fact that how much sensetive the solution is to Courant number, depends on whether the solution method is explicit or implicit.

OJ


OJ: This cournt number is different. It is for pressure based couple solver only. Recommended value is 200,000

Try SIMPLE , it will cost you less along with single precision.

Bollonga March 26, 2013 07:21

Quote:

Originally Posted by Far (Post 416474)
OJ: This cournt number is different. It is for pressure based couple solver only. Recommended value is 200,000

Exactly, so what does this Courant number means? There's not too much info in Fluent theory guide.

Far March 26, 2013 07:27

Quote:

Originally Posted by Bollonga (Post 416477)
Exactly, so what does this Courant number means? There's not too much info in Fluent theory guide.

No idea. Never studied in MS (CFD) even :o

diamondx March 26, 2013 09:48

i don't want to sound pessimist:for an 8 million nodes, i'm not surprised. you need to take that case to a cluster. no matter what you change, it will always take too much time...
is it the mesh about the blade ?

oj.bulmer March 26, 2013 09:52

Quote:

Exactly, so what does this Courant number means? There's not too much info in Fluent theory guide.
A bit of theory:

The algebraic approaximation of integral balance for any control volume is given as:

a_P \phi_P = \Sigma a_{nb} \phi_{nb} +b

Patankar (1980,1981) proposed the underrelaxation factor \alpha as

\frac{a_P}{\alpha} \phi_P = \Sigma a_{nb} \phi_{nb} +b + \frac{1-\alpha}{\alpha} a_P \phi_P

This is same as equation 20-60 in ANSYS Help documentation of FLUENT.

The implementation of CFL in this context is:

\alpha = \frac{CFL}{1+CFL} or, CFL=\frac{\alpha}{1-\alpha}

Consequently the governing equation for the control volume becomes:

a_P \left(1+\frac{1}{CFL}\right) \phi_P = \Sigma a_{nb} \phi_{nb} +b + \frac{a_P}{CFL} \phi_P^{old}

One may wonder why bother using CFL instead of \alpha, when the governing equation is same. But a little observation will bring clarity such that the equation advances in time \Delta t = CFL * \Delta t^*, where \Delta t^*= \frac{\rho \Delta V}{a_P}. In case of steady state, this formulation can be used in with pseudo transient solver. Thus CFL represents a more intuitive definition of implicit underrelaxation.

Essentially, use of CFL helps advance the solution by multiples of timesteps defined by cell Courant number (the original one, not solver). Essentially, for smaller timestep, the coefficient a_P = \frac{\rho \Delta V} {\Delta t} will be large and solution will be slow, universally. The multiple of CFL helps in keeping timesteps different in different regions of the domain, with different values of a_P, instead of employing a singular timescale over whole domain. Thus timestep becomes location specific and is different throughout the domain. This helps in convergence, because in case of single universal timestep, its value may be too small somewhere (in case of higher velocities) so the solution in this region will progress slow in time or too large elsewhere (in regions of small velocities) so the solution in this region may just diverge inducing instability.

One of the most important aspect of using this formulation instead of under relaxation factor \alpha is that with CFL you have a wider range of advancement factors. Under relaxation factors of 0.9,0.95 and 0.99 imply CFL values of 9, 19, 99 respectively. Thus use of CFL gives a wider (or refined) range of pace-change than URF. Higher values of CFL will advance the solution with larger timesteps, increasing pace of solution. But it is wise to do it gradually than suddenly.

OJ

Bollonga March 26, 2013 10:04

2 Attachment(s)
Quote:

Originally Posted by diamondx (Post 416527)
i don't want to sound pessimist:for an 8 million nodes, i'm not surprised. you need to take that case to a cluster. no matter what you change, it will always take too much time...
is it the mesh about the blade ?

Yes, it's the mesh around a blade for a 120º cylindrical sector (see picture). Blade radius is 29m, blade chord around 1m at the tip, domain extents from 5R in radial direction, 5R upwind and 15 downwind.
I'm working on reducing the mesh density, but what max cell size can I use in the farfield?

Thanks!

diamondx March 26, 2013 10:54

have you tried the block refinement tab, see if you could bring the blocks in far field to 1/2 the others...

diamondx March 26, 2013 10:58

i have the same machine as you , 16gb of ram, i don't go beyond 1 500 000 nodes. i know my machine can't handle them. how much of the extra minutes could you get after inputting the right adequate CFL ??

Bollonga March 26, 2013 13:56

Quote:

Originally Posted by diamondx (Post 416555)
have you tried the block refinement tab, see if you could bring the blocks in far field to 1/2 the others...

No, I have not. You mean the refinement tool in pre-mesh params tab? Gonna check it in the help manual. Now I'm using hyperbolic bunching from 5m at the inlet to 0.25m near the blade and 10m at the outlet.

Quote:

Originally Posted by diamondx (Post 416555)
i have the same machine as you , 16gb of ram, i don't go beyond 1 500 000 nodes. i know my machine can't handle them.

Okay, I'll try to keep the mesh under 1.5 million nodes.

Quote:

Originally Posted by diamondx (Post 416555)
how much of the extra minutes could you get after inputting the right adequate CFL ??

I think I haven't understood your question. You mean how long it takes the solution to converge so I could increase CFL?
I don't know which is the adequate CFL, I've just started with the 200 default value. I guess the higher the faster so the better for me.

Thanks a lot!

Bollonga March 27, 2013 11:37

5 Attachment(s)
I've reduced the mesh from 8 to 2 million elements without changing the y+. Quality>0.2, min angle>18º and volume change <50 (most elements vol change<30)
Then I've run the steady laminar case with single precision, SIMPLE and 2nd order pressure and momentum. inlet velocity is 5m/s, rotational velocity is 1.034 rad/s.
It has reached residuals 1e-4 for 2700 iteratons, computation time was 1h30 using 8 cores, which seems okay to me.
Reverse flow at outlet started in 15,000 cells then it reduced to 0 and started raising up to 6,000 when convergence was reached.

The issue is force and moment coefficients for the blade surface are very low: CD=0.04 (x-axis), CL=0.48 (z-axis) and CM=0.0032 (around z-axis)
I've checked the flow pattern around the airfoil and it looks good, I think there's some recirculation in the leeward face, which is strange for an angle of attack of 12º (see pictures)

What can be wrong? Bad mesh near the airfoil? Bad mesh in the farfield? Wrong solver setup? Is it possible to have stall in the airfoil that early?

Another question, could anybody tell me how to meassure lift or drag force over a line (airfoil perimeter) of the blade surface?

Any suggestion is welcome! Thank you guys!

flotus1 March 27, 2013 11:51

Quote:

Originally Posted by Bollonga (Post 416787)
Reverse flow at outlet raising up to 6,000 when convergence was reached.

What can be wrong?

Maybe you answered the question yourself. The backflow entering from the outlet is causing a disturbance of the flow upstream.
Have a closer look at the region where backflow occurs and consider moving the outlet further downstream.


All times are GMT -4. The time now is 11:39.