Turbulent Flow Simulations with Elmer - A Request

Numerical methods and mathematical models of Elmer
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

Thank you for all your efforts, Peter.

For the sake of illustrations, comparisons and evaluations w.r.t. the new solver, I am starting with the "old" KESolver as it is implemented (without FCT) in Elmer v8.4. The rest of the post concerns the results obtained from this version (v 8.4) without FCT.

Finding a steady state through transient simulations was the preferred option for complicated cases, I suppose, even with the old KESolver. This used to take more time (than running in steady state), but the convergence used to be more gradual and better in my experience. So we are not at all at a disadvantage when it comes to FCT based solvers.

I have done the Step_ke problem in both steady and transient modes and the results are attached.

The first set of pictures show the velocity profiles from both; the transient result (time 500) eventually approaches the steady solution.
Velocity_KESolver_v8.4_Steady.png
(17.3 KiB) Not downloaded yet
Velocity_KESolver_v8.4_Transient.png
(17.47 KiB) Not downloaded yet
The second set of pictures show the Residual behavior in both cases. Interesting to note that in the transient case, the residual fall (esp. for k-epsilon) is softer and gradual as compared to the residual behavior in steady state. The convergence, although slower, is a bit more monotonic in this case. I have noted the same behavior in an enhanced way for more complex cases.

Pl. note that the residual in the plots refers to the quantity "..Solver: Relative Change :" printed in the output after the Result Norm.

Also note that I've employed a low Nonlinear system relaxation factor to make the convergence smoother.

Now I will do the same analysis with the new FCT-based KESolver and post the results.

-Kumar
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

Here are the second set of pictures that show the residual behavior in both cases.
Residuals_KESolver_v8.4_Steady.png
Residuals_KESolver_v8.4_Steady.png (22.55 KiB) Viewed 4974 times
Residuals_KESolver_v8.4_Transient.png
Residuals_KESolver_v8.4_Transient.png (23.9 KiB) Viewed 4974 times
Also attached is the case file.

-Kumar
Attachments
Step_transient.sif
(2.81 KiB) Downloaded 260 times
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

Hi Peter,

Attached please find the results from the new KESolver of the RevisitBranch.

The only changes I made in the sif were: (1) just used 1 Nonlinear System Max Iterations per timestep for both solvers (2) Linear system and steady state convergence tolerances were retained as in the previous sif (used to test ver 8.4) (3) used ILU0 for linear system preconditioning in both cases (as this may be the practical option for larger cases) and (4) deactivated Mesh Levels = 2. So the parameters are more or less consistent in both sifs.
Velocity_KESolverRevisit.png
(16.08 KiB) Not downloaded yet
Residuals_KESolverRevisit.png
Residuals_KESolverRevisit.png (21.17 KiB) Viewed 4946 times
As you can see, the convergence with the new solver is vastly improved, reaching there fast and almost monotonous!!

I am testing another case with a larger mesh and will be back with further results. Thanks again,

-Kumar
Attachments
Step_keNew.sif
(3.82 KiB) Downloaded 277 times
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by annier »

mika wrote: 09 Apr 2020, 13:46 If the mesh contains prisms or pyramids, at the moment the value of the keyword "Stabilization Method" must be defined to be some other string than "bubbles". If bubble functions were wanted for stabilization purposes, one could try to use for example

Stabilization Method = String "p-bubbles"
Element = "p:1 -tetra b:1 -pyramid b:1 -prism b:1 -brick b:1"

A basic p-element definition without additional bubble functions could be

Stabilization Method = String "none"
Element = "p:2"

-- Mika
Dear Mika,
Thank you for explaining about p-element and bubble functions. In addition to the K-epsilon solver and navier-stokes equation, the understanding on the usage of

Code: Select all

Element =  "p:2" 
is also quite useful in obtaining good solutions for displacement variable in context of Elasticity Solver.


Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
annier
Posts: 1168
Joined: 27 Aug 2013, 13:51
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by annier »

Hi All,
With the following updates in the kepsilon solver,
  • Usage of Logical k/epsilon ratio

Code: Select all

Use KE ratio = Logical True
  • Need for mentioning of transient convergence tolerance

Code: Select all

Transient Convergence Measure = String "solution"
  Transient Convergence Tolerance = 5.0e-4


it is good to know that the flow solution converges quite well.


Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

Hi All,

I did a few more tests of the modified solver in more complicated geometries and have to report that the results have not been very promising. The tests worked well with the backward step as we saw before, but as the flow gets a bit more complex (including backflow and circulation), we run into serious convergence issues. To illustrate, I am referring back to a previous example that was discussed in these forums earlier:

http://www.elmerfem.org/forum/viewtopic ... lon#p18243

This one and some other cases I tested with the new solver (activating Use KE ratio = Logical True) show the same pattern of behavior :

(1) After the first few time steps, the number of iterations to convergence of the Navier Stokes solver progressively increases

(2) Eventually reaches the iteration limit and the solver stalls.

In the attached log file of the above test case we can see this behavior (Navier Stokes stalls at 14th time step).

The only way I have been able to bring the flow system to convergence is by:

(1) Activating Stabilize = True in the Navier-Stokes solver (i.e, remove Bubble Stabilization) and

(2) Deactivating Use KE ratio = Logical True

However, this is no real improvement as I think I am merely recovering the behavior of the old KESolver by this measure.

-Kumar
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

The attachment didn't work. So here they are.
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

Sorry, the attachment is still not there.
Attachments
2DJetMixingTank.zip
(154.35 KiB) Downloaded 250 times
ElmerSolver_log.txt
(133.53 KiB) Downloaded 230 times
julien givernaud
Posts: 86
Joined: 18 Nov 2014, 18:18
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by julien givernaud »

Hello,

Is there someone in the Elmer team working on the CFD topic again?
Elmer is a very complete multiphysic software, lot of users would be added if Elmer has a powerfull CFD capabilities, as me :) .

Thank you for your work.

Best regards

Julien
kishpishar
Posts: 54
Joined: 17 Jun 2015, 10:04
Antispam: Yes

Re: Turbulent Flow Simulations with Elmer - A Request

Post by kishpishar »

Hi All,

I'm back with some more encouraging results! I am not really into Elmer programming and my involvement with FEM is even lesser, so it took a while for me to get a feel of what's going on at the solver level. Actually the modified solver using the E/K ratio as the auxiliary variable does indeed have some favourable numerical properties in the segregated mode (using KE Component = 1 or 2), as opposed to the coupled mode with 2 DOFs. My observations are the following (Reference: the same case discussed above):
  • The solver in the modified form (enabling Use KE ratio) will still need the LimitKEfields() function right after the call to DefaultSolve(). The nodal values have to be set positive before the next call to LocalMatrix( .. ), otherwise implausible values may again result at the assembly level through the statements

K = SUM( LocalKinEnergy(1:n) * Basis(1:n) )
E = SUM( LocalDissipation(1:n) * Basis(1:n) )
  • The solver in segregated mode results in a relatively smoother convergence behavior as shown in the following figures. However, needless to say that the assembly takes a bit more time in the former.
  • Actually the numerical behaviour is spoiled almost entirely due to an extremely small number of nodes (in a case with thousands of nodes), at the corners or on some boundaries, getting negative k or eps values during the solution while minimizing the L2 norm. I used the simple strategy of replacing the absurd values with the field average :
KAvg = SUM(KEkin % Values(1:n))/n
EAvg = SUM(KEdis % Values(1:n))/n

IF (Kval < 1.0d-6) Kval = KAvg
IF (Eval < 1.0d-6) Eval = EAvg

This is not perfect, but found to work, the only reasoning is that the average values are far sensbile than absurd values on those few nodes. This aids the convergence but has no noticeable effect on the final solution.

I think we are on the right track and there is a lot of room for further improvement. Thanks everyone!

Kumar
Residuals_KESolver_SegregatedMode.png
(71.46 KiB) Not downloaded yet
Residuals_KESolver_CoupledMode.png
(62.24 KiB) Not downloaded yet
Post Reply